AlmondTill/G3N API

Segment

object type

A Segment: a merchant-authored CONSUMER grouping for marketing. segmentType is IMMUTABLE at birth — static (explicit membership: batched adds/removes of ≤48 consumers per call, the one-transaction law; the pair key dedupes structurally) or dynamic (membership DERIVED from the stored predicate — the member ops refuse; edit the predicate/exclusions and call refreshSegment to re-materialize; evaluatedAt shows the staleness honestly, refreshProblem words a queued refresh that could not complete, and a scheduled sweep re-refreshes stale ACTIVE dynamics ~daily). memberCount meters live membership (bounded ≤100000 — the add/refresh refuses past it naming the figure). MARKETING-ONLY-OVER-CONSENTED is the CONSUMING lane's law when campaigns/exports arrive — the definition stores membership only. NOT searchable (a membership register); inactive = staging (membership edits stay legal while building).

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 (SE-…).
typeString String!The kind of record — always Segment 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 Segment 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.
segmentTypeSegmentType SegmentType!static | dynamic — IMMUTABLE at birth (a different kind is a NEW segment).
memberCountIntThe live membership meter (the counter twin of the member rows); absent = never added.
predicateSegmentPredicateThe dynamic rule (dynamic-only; AND across supplied axes, OR within one) — membership re-materializes at refreshSegment.
excludedConsumerIdsID [ID!]Manual exclusions (dynamic-only; at most 256, unique, write-time-validated Consumer refs) — subtracted AFTER matching at every refresh.
evaluatedAtStringThe last refresh instant (dynamic-only; absent = never refreshed — honest staleness).
refreshProblemStringThe async lane’s honest-failure word: why the last QUEUED refresh could not complete (figures named); cleared by any successful refresh; absent = clean.

Used by