AlmondTill/G3N API

doomCommissionConfig

mutation · in the family Commission config

What it does

Permanently retire the commission settings — how staff sales commission is computed.

Doom (terminal) a CommissionConfig by id; requires the unrestricted capability + the record's current revision. Deny-by-default + the referential_integrity / authority / occ guards; a doomed CG is immutable + never deleted. The optional reason rides the transition events.

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

CommissionConfig CommissionConfig! — A CommissionConfig — ONE cell of the multi-axis commission matrix: the axes scope where it applies (each singular, absent = all, immutable at birth — re-target = create + doom): Agent (a Role the agent holds at the sale's org ⊕ a specific User) · Merchandise (Division ⊕ Category-SUBTREE ⊕ Style — a style outranks any category depth) · Location (Organization ⊕ LogicalFacility — **the Location axis IS the org scoping; this construct is NOT org-selected**) · Channel. The sparse parameters (≥1 required): rate (percent_net = the line's final post-position-5 discounted net · percent_margin = max(net − landed COGS, 0), COGS-absent ⇒ 0 · fixed_per_unit — a currency-mismatched fixed rate is NON-matching) + enabled (false at the winning cell suppresses the entry). At place, per (line × attributed agent): candidates = active cells matching every axis; the winner per parameter is the most specific (set-axis count, tie-break Agent ≻ Merchandise ≻ Location ≻ Channel). appliesToAllSalesInScope=true + Agent=Role is the manager-on-all override: every active holder of the Role at the sale's org earns additively (entryClass manager_on_all; bounded ≤ 32 holders — the write refuses over, the place mint skips over [the sale never blocks]). the collision rule: an active same-normalized-tuple sibling with an intersecting SET-parameter set refuses CONFLICT/IDENTITY_TAKEN naming the holder(s) + the intersection (create, param-GROWING edits, reactivate; same-tuple disjoint-parameter cells are legal — the flag rides IN the tuple, so flagged/unflagged never compete). At most 128 active per org group (the per-place resolution bound). NOT searchable (the config non-joiner stance — configs are axis-addressed, not name-found); NO uniq marker.

Example request

graphql
mutation ExampleDoomCommissionConfig($id: ID!, $revision: ID!, $reason: String) {
  doomCommissionConfig(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    appliesToAllSalesInScope
    agentRoleId
    agentUserId
    divisionId
    categoryId
    styleId
    organizationId
    logicalFacilityId
    channel
    enabled
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-d7015f3e0000",
  "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": {
    "doomCommissionConfig": {
      "id": "01900000-0000-7000-8000-d7015f3e0000",
      "sysId": "CG-EXMP-0000-000F",
      "type": "CommissionConfig",
      "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",
      "appliesToAllSalesInScope": true,
      "agentRoleId": "01900000-0000-7000-8000-a95bae4e0000",
      "agentUserId": "01900000-0000-7000-8000-d9a011190000",
      "divisionId": "01900000-0000-7000-8000-a5e990060000",
      "categoryId": "01900000-0000-7000-8000-afb3e5910000",
      "styleId": "01900000-0000-7000-8000-5467ec760000",
      "organizationId": "01900000-0000-7000-8000-1971e30a0000",
      "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
      "channel": "pos",
      "enabled": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer