AlmondTill/G3N API

Rtv

object type

A return-to-vendor: goods ship BACK to an enabled vendor for credit. Parent = the OrgVendor. Lifecycle: draft compose (wholesale edits) - approve (authority:approve_rtv, a REAL maker/checker step from birth) - ship fires the FIRST rtv movements (sourceBucket relief at CURRENT WMA, lean 6 — the sell/ symmetry; present stock only, CONFLICT/INSUFFICIENT_STOCK else; resolvedReturnsContactId + the expectedCredit default stamp here) - record_credit closes it (actual!= expected refuses CONFLICT/CREDIT_MISMATCH retryable; acknowledgeVariance is the explicit cure — the variance stays reports-only, no AR/AP). Lines are EMBEDDED (max 24 — the 3N+1<=100 ship ceiling held, -m), each shipping from on_hand / damaged / held (the -mutable trio); cancel is pre-ship ONLY; credited is the immutable NON-doomed close; cancelled is the ONE doomed terminal (lists filter it).

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 (RV-…).
typeString String!The kind of record — always Rtv here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: draft | approved | shipped | credited | cancelled.
parentIdID ID!The parent OrgVendor enablement; for an Rtv 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.
organizationIdID ID!The returning org — spine-stamped from the parent OrgVendor at birth (the attribution symmetry).
purchaseOrderIdIDThe OPTIONAL originating PurchaseOrder (defective/wrong-item returns cite their PO; overstock/recall may not). Must belong to the SAME OrgVendor and be past-issue when named.
shipFromLogicalFacilityIdID ID!The LF the return ships FROM — IMMUTABLE at birth (the Transfer pair stance); SL-b: ACTIVE-gated at create, re-checked at ship.
expectedCreditMoneyEntryOptional expected vendor credit (in the vendor purchasingCurrency) — when absent, ship stamps the default: the sum of line quantity x CURRENT WMA over the relieved books.
actualCreditMoneyEntryThe credit the vendor actually issued — STAMPED by record_credit (absent until credited).
creditVarianceAcknowledgedBooleanTRUE when a mismatched credit was explicitly acknowledged at record_credit.
resolvedReturnsContactIdIDThe resolved returns-destination Contact — STAMPED at ship (the OrgVendor returnsToContactId?? the vendor host single live returns-role assignment; neither resolvable refuses NAMED).
linesRtvLine [RtvLine!]!The EMBEDDED lines (1..24 — the NAMED ceiling, -m; distinct variant x sourceBucket x bin keys) — draft-editable wholesale; junctions server-resolved + STAMPED at create (TR-f: the (variant x ship-from LF) InventoryItem must EXIST).

Used by