AlmondTill/G3N API

doomCustomerPriceGroup

mutation · in the family Customer price group

What it does

Permanently retire a customer price group — named customers who get special pricing.

Doom (terminal) a CustomerPriceGroup by id, within the caller's org group; requires the unrestricted capability + the record's current revision. -GATED by non-doomed LoyaltyMembers carrying the group. Deactivate is the free pause — a paused group's scoped promotions simply stop matching at the next evaluation.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Pricing — Prices, price schedules, promotions, coupons and the money rules of selling.

Roles that may call it:

Careful

Doom is forever — a doomed record never comes back into use (its history remains readable). Anything still referencing it live will block the doom.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringno

Concurrency

Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.

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; 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. 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

graphql
mutation ExampleDoomCustomerPriceGroup($id: ID!, $revision: ID!, $reason: String) {
  doomCustomerPriceGroup(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationIds
    priceListId
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-275385110000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "doomCustomerPriceGroup": {
      "id": "01900000-0000-7000-8000-275385110000",
      "sysId": "PG-EXMP-0000-000F",
      "type": "CustomerPriceGroup",
      "caption": "Blue jeans",
      "status": "doomed",
      "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": 1,
      "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
        }
      }
    }
  }
}

Errors this call can answer