AlmondTill/G3N API

CommissionConfig

object type

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.

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 human-readable id, shaped like CG-… — stable for the record’s life.
typeString String!The kind of record — always CommissionConfig here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of active, inactive or doomed.
parentIdID ID!The parent org group; for a CommissionConfig parentId === rootId.
rootIdID ID!The id of your organization group — every record of yours carries the same one.
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 id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
appliesToAllSalesInScopeBooleanThe manager-on-all flag: every active holder earns on every in-scope line, additively.
agentRoleIdIDAgent axis. 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