On this page
createCustomerPriceGroup
mutation · in the family Customer price group
What it does
Create a new customer price group — named customers who get special pricing at your organization.
Create a CustomerPriceGroup in the caller's org group.
Who may call it
Capability area: Pricing — Prices, price schedules, promotions, coupons and the money rules of selling.
- Owner
- Manager
- An API key whose scope allows
api:createCustomerPriceGroup
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | NewCustomerPriceGroupInput NewCustomerPriceGroupInput! | yes | No further notes. |
Returns
CustomerPriceGroup CustomerPriceGroup! — A CustomerPriceGroup — the customer-classification / pricing-ELIGIBILITY axis (retail tiers: standard · member · vip · wholesale_lite — merchant-defined, the registry's roster is illustrative). An eligibility KEY, NOT a price store: the group carries NO rate fields — its benefits are expressed EXCLUSIVELY promotions scoped to it (PromotionScope.priceGroupIds); the priceListId CARRIER is live while the group itself stays rate-field-FREE (the anti-price-plane guard's letter: the PLANE is the PriceList's, the group is the eligibility KEY + the carrier). The axis law: CustomerPriceGroup = pricing eligibility · Segment = marketing audience · CorporateCustomer = B2B identity — three distinct axes a customer may carry independently. Assignment v1 rides the LoyaltyMember carrier (member.priceGroupId, the PRE- home; OrgCustomer and Consumer bind per their locks, the Consumer binding SUPERSEDES). Resolution DEGRADES: anonymous / no member / no group / group non-ACTIVE-or-deselected ⇒ no eligibility — a lapsed group NEVER kills a cart. Org participation is the canned-pool selection (≤ 32; ABSENT = every org). At most 32 ACTIVE per org group. Doom is -gated by non-doomed LoyaltyMembers carrying the group; deactivate stays FREE (a paused group's scoped promotions simply stop matching). NO code/identity — no UNIQ marker (nothing bearer-resolvable rides a group).
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-37386ae00000",
"sysId": "PG-EXMP-0000-000F",
"type": "CustomerPriceGroup",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"organizationIds": [
"01900000-0000-7000-8000-60e064dc0000"
],
"priceListId": "01900000-0000-7000-8000-7844e9fb0000"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. (VALIDATION)
Dry run
Add dryRun: true to the request envelope (extensions.at) to rehearse this call: every check runs, the write is rehearsed against the current records and nothing is stored; the answer is the refusal a real call would give, or the record it would create. Every response to a rehearsal carries dryRun: true, so a rehearsed record is never mistaken for a saved one.