# 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](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (RV-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Rtv` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: draft \| approved \| shipped \| credited \| cancelled. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent OrgVendor enablement; for an Rtv parentId!== rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/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](/types/#scalars) `ID!` | The returning org — spine-stamped from the parent OrgVendor at birth (the attribution symmetry). |
| `purchaseOrderId` | [ID](/types/#scalars) | 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](/types/#scalars) `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](/types/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](/types/MoneyEntry/) | The credit the vendor actually issued — STAMPED by record_credit (absent until credited). |
| `creditVarianceAcknowledged` | [Boolean](/types/#scalars) | TRUE when a mismatched credit was explicitly acknowledged at record_credit. |
| `resolvedReturnsContactId` | [ID](/types/#scalars) | 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](/types/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). |

## Used by

- [approveRtv](/reference/document-approvals/approveRtv/)
- [cancelRtv](/reference/purchasing/cancelRtv/)
- [createRtv](/reference/purchasing/createRtv/)
- [recordRtvCredit](/reference/purchasing/recordRtvCredit/)
- [rtv](/reference/rtv/rtv/)
- [shipRtv](/reference/purchasing/shipRtv/)
- [updateRtv](/reference/rtv/updateRtv/)
