AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The group-scoped human-facing system id (CG-…).
typeString String!The kind of record — always CommissionConfig here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: active | inactive | doomed.
parentIdID ID!The parent org group; for a CommissionConfig parentId === rootId.
rootIdID ID!The org-group family root.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
appliesToAllSalesInScopeBooleanThe manager-on-all flag: every active holder earns on every in-scope line, additively.
agentRoleIdIDAgent axis (Role arm — roles are per-organization: matches agents holding it at the SALE’s org). SINGULAR with agentUserId; absent both = all agents.
agentUserIdIDAgent axis (User arm — the most specific agent level). SINGULAR with agentRoleId.
divisionIdIDMerchandise axis (Division arm). SINGULAR with categoryId/styleId; absent all three = all merchandise.
categoryIdIDMerchandise axis (Category arm — SUBTREE semantics; deeper beats shallower).
styleIdIDMerchandise axis (Style arm — the per-style override; outranks ANY category depth).
organizationIdIDLocation axis (Organization arm) — THE org scoping. SINGULAR with logicalFacilityId.
logicalFacilityIdIDLocation axis (LogicalFacility arm — the most specific location level).
channelOrderChannelChannel axis — the LIVE selling channels; absent = both.
rateCommissionRateThe earning formula (SPARSE — the most-specific SET cell wins the parameter; unresolved anywhere = NO entry, commission is config-opt-in).
enabledBooleanThe per-cell master switch (SPARSE) — false at the winning cell suppresses the entry.

Used by