Price differently for a customer group
Name the customers who get special pricing, give them a price list, and put the prices on it — the till and the storefront pick the right price by who is buying.
Pricing & money · a play in 3 steps.
In the office
Where it starts: the office’s Customer price groups page.
Step 1. Name the group of customers who get the special prices. Open Customer price groups.
Step 2. Create the price list the group buys from. Open Price lists.
Step 3. Put each variant’s price, in its currency, on the list. Open Price lists.
For developers — the calls
The steps
- Name the group of customers who get the special prices. — createCustomerPriceGroup
- Create the price list the group buys from. — createPriceList
- Put each variant’s price, in its currency, on the list. — createPriceListEntry
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
createCustomerPriceGroup
createCustomerPriceGroup — mutation · Create a new customer price group — named customers who get special pricing at your organization.
Example request
mutation ExampleCreateCustomerPriceGroup($input: NewCustomerPriceGroupInput!) {
createCustomerPriceGroup(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
organizationIds
priceListId
}
}Variables:
{
"input": {
"caption": "Blue jeans"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createCustomerPriceGroup": {
"id": "01900000-0000-7000-8000-275385110000",
"sysId": "PG-EXMP-0000-000F",
"type": "CustomerPriceGroup",
"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",
"organizationIds": [
"01900000-0000-7000-8000-1971e30a0000"
],
"priceListId": "01900000-0000-7000-8000-41fd9d260000"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}createPriceList
createPriceList — mutation · Create a new price list — a named set of prices at your organization.
Example request
mutation ExampleCreatePriceList($input: NewPriceListInput!) {
createPriceList(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
organizationIds
startAt
endAt
orgCustomerId
}
}Variables:
{
"input": {
"caption": "Blue jeans"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createPriceList": {
"id": "01900000-0000-7000-8000-41fd9d260000",
"sysId": "PB-EXMP-0000-000F",
"type": "PriceList",
"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",
"organizationIds": [
"01900000-0000-7000-8000-1971e30a0000"
],
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z",
"orgCustomerId": "01900000-0000-7000-8000-7c3b96a50000"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}createPriceListEntry
createPriceListEntry — mutation · Create a new one price on a price list — a variant’s price in a currency at your organization.
Example request
mutation ExampleCreatePriceListEntry($input: NewPriceListEntryInput!) {
createPriceListEntry(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
startAt
endAt
}
}Variables:
{
"input": {
"caption": "Blue jeans",
"priceListId": "01900000-0000-7000-8000-41fd9d260000",
"target": {
"kind": "variant",
"variantId": "01900000-0000-7000-8000-8433b0260000"
},
"value": {
"kind": "fixed",
"price": {
"currency": "USD",
"amount": "10.00"
}
},
"endAt": "2027-01-31T00:00:00.000Z"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createPriceListEntry": {
"id": "01900000-0000-7000-8000-4a29a29e0000",
"sysId": "PE-EXMP-0000-000F",
"type": "PriceListEntry",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-41fd9d260000",
"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",
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}