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
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The group-scoped human-facing system id (RV-…). |
type | String String! | The kind of record — always Rtv here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: draft | approved | shipped | credited | cancelled. |
parentId | ID ID! | The parent OrgVendor enablement; for an Rtv parentId!== rootId. |
rootId | ID ID! | The org-group family root. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
organizationId | ID ID! | The returning org — spine-stamped from the parent OrgVendor at birth (the attribution symmetry). |
purchaseOrderId | ID | The 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. |
shipFromLogicalFacilityId | ID ID! | The LF the return ships FROM — IMMUTABLE at birth (the Transfer pair stance); SL-b: ACTIVE-gated at create, re-checked at ship. |
expectedCredit | MoneyEntry | Optional 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. |
actualCredit | MoneyEntry | The credit the vendor actually issued — STAMPED by record_credit (absent until credited). |
creditVarianceAcknowledged | Boolean | TRUE when a mismatched credit was explicitly acknowledged at record_credit. |
resolvedReturnsContactId | ID | The resolved returns-destination Contact — STAMPED at ship (the OrgVendor returnsToContactId?? the vendor host single live returns-role assignment; neither resolvable refuses NAMED). |
lines | RtvLine [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). |