AlmondTill/G3N API

ProductRelation

object type

A product relation — a typed, directed, ranked suggestion edge between two Products (alternative | replacement | accessory | upsell | cross-sell — canned, AT-extensible). Parent = the source Product (relations die with their source); the target is gate-protected from doom while suggested. Directed by design — symmetric intent = create both directions. Relation identity (source x target x relationType) is unique (a live duplicate is CONFLICT/IDENTITY_TAKEN naming the holder; a doomed one is taken over). Variant-level matching is derived at read time — a later read-side slice.

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 PR-… — stable for the record’s life.
typeString String!The kind of record — always ProductRelation 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 source Product; for a ProductRelation 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.
targetProductIdID ID!The suggested target Product — set at creation, immutable thereafter.
relationTypeString String!The canned relation type — set at creation, immutable thereafter.
ordinalInt Int!The suggestion rank. Mutable — reordering is an ordinary edit.

Used by