Open an account for a business customer
Create the business buyer with its house terms and open its account with your organization — the customer that buys on invoice.
Customers · a play in 2 steps.
In the office
Where it starts: the office’s Corporate customers page.
Step 1. Create the business buyer with its house terms. Open Corporate customers.
Step 2. Open the customer’s account with your organization. Open Customer accounts.
For developers — the calls
The steps
- Create the business buyer with its house terms. — createCorporateCustomer
- Open the customer’s account with your organization. — createOrgCustomer
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
createCorporateCustomer
createCorporateCustomer — mutation · Create a new corporate customer — a business buyer with house terms at your organization.
Example request
mutation ExampleCreateCorporateCustomer($input: NewCorporateCustomerInput!) {
createCorporateCustomer(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
legalName
taxId
code
}
}Variables:
{
"input": {
"caption": "Blue jeans"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createCorporateCustomer": {
"id": "01900000-0000-7000-8000-1dc59f140000",
"sysId": "CU-EXMP-0000-000F",
"type": "CorporateCustomer",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 0,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"legalName": "Blue jeans",
"taxId": "<tax id>",
"code": "BJ-001"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}createOrgCustomer
createOrgCustomer — mutation · Create a new customer of your organization at your organization.
Example request
mutation ExampleCreateOrgCustomer($input: NewOrgCustomerInput!) {
createOrgCustomer(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
corporateCustomerId
accountNumber
paymentTerms
customerPriceGroupId
priceListId
billToContactId
shipToContactId
code
arBalanceMinor
arCurrency
}
}Variables:
{
"input": {
"caption": "Blue jeans",
"organizationId": "01900000-0000-7000-8000-1971e30a0000",
"corporateCustomerId": "01900000-0000-7000-8000-1dc59f140000"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createOrgCustomer": {
"id": "01900000-0000-7000-8000-7c3b96a50000",
"sysId": "EC-EXMP-0000-000F",
"type": "OrgCustomer",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 0,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"corporateCustomerId": "01900000-0000-7000-8000-1dc59f140000",
"accountNumber": "<account number>",
"paymentTerms": "<payment terms>",
"customerPriceGroupId": "01900000-0000-7000-8000-275385110000",
"priceListId": "01900000-0000-7000-8000-41fd9d260000",
"billToContactId": "01900000-0000-7000-8000-5a1394130000",
"shipToContactId": "01900000-0000-7000-8000-d0a992120000",
"code": "BJ-001",
"arBalanceMinor": 1250,
"arCurrency": "<ar currency>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}