# CommissionConfig

object type

A CommissionConfig — ONE cell of the multi-axis commission matrix (the ReplenishmentConfig SIBLING): 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.

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (CG-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `CommissionConfig` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| inactive \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent org group; for a CommissionConfig parentId === rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `appliesToAllSalesInScope` | [Boolean](/types/#scalars) | The manager-on-all flag: every active holder earns on every in-scope line, additively. |
| `agentRoleId` | [ID](/types/#scalars) | Agent axis (Role arm — roles are per-organization: matches agents holding it at the SALE’s org). SINGULAR with agentUserId; absent both = all agents. |
| `agentUserId` | [ID](/types/#scalars) | Agent axis (User arm — the most specific agent level). SINGULAR with agentRoleId. |
| `divisionId` | [ID](/types/#scalars) | Merchandise axis (Division arm). SINGULAR with categoryId/styleId; absent all three = all merchandise. |
| `categoryId` | [ID](/types/#scalars) | Merchandise axis (Category arm — SUBTREE semantics; deeper beats shallower). |
| `styleId` | [ID](/types/#scalars) | Merchandise axis (Style arm — the per-style override; outranks ANY category depth). |
| `organizationId` | [ID](/types/#scalars) | Location axis (Organization arm) — THE org scoping. SINGULAR with logicalFacilityId. |
| `logicalFacilityId` | [ID](/types/#scalars) | Location axis (LogicalFacility arm — the most specific location level). |
| `channel` | [OrderChannel](/types/OrderChannel/) | Channel axis — the LIVE selling channels; absent = both. |
| `rate` | [CommissionRate](/types/CommissionRate/) | The earning formula (SPARSE — the most-specific SET cell wins the parameter; unresolved anywhere = NO entry, commission is config-opt-in). |
| `enabled` | [Boolean](/types/#scalars) | The per-cell master switch (SPARSE) — false at the winning cell suppresses the entry. |

## Used by

- [commissionConfig](/reference/commission-config/commissionConfig/)
- [createCommissionConfig](/reference/commission-config/createCommissionConfig/)
- [deactivateCommissionConfig](/reference/commission-config/deactivateCommissionConfig/)
- [doomCommissionConfig](/reference/commission-config/doomCommissionConfig/)
- [reactivateCommissionConfig](/reference/commission-config/reactivateCommissionConfig/)
- [updateCommissionConfig](/reference/commission-config/updateCommissionConfig/)
