Returns Graph Reference
The Returns app contributes two top-level ticket types via the actors/ticket/types/* registry namespace: claim and rma. Each defines its own item type (a "line") and a set of relations to other graph nodes.
This page is a reference for the resulting graph surface — node types, fields, edges, and enum value sets — that other apps, rules, and ingresses can query against.
Ticket Types
claim
Registry: /actors/ticket/types/claim
| Property | Value |
|---|---|
graphSetName | claims |
itemEdgeName | claim |
defaultNumberPrefix | CLM |
Relations on ticket.claim
| Relation | Node type | Cardinality |
|---|---|---|
order | order | single |
pausedBy | identity | single (via pausedById field) |
Items: ticket.claim.line
| Property | Value |
|---|---|
graphSetName | claimLines |
| Item edge name | claimLines |
Relations:
| Relation | Node type | Cardinality |
|---|---|---|
pictures | file | many |
orderLine | orderLine | single |
rma
Registry: /actors/ticket/types/rma
| Property | Value |
|---|---|
graphSetName | rmas |
itemEdgeName | rma |
defaultNumberPrefix | RMA |
Relations on ticket.rma
| Relation | Node type | Cardinality |
|---|---|---|
order | order | single |
claim | ticket.claim | single |
Stand-alone RMAs
The claim relation is optional. An RMA can exist without a connected claim; OnClaimResolve is only fired for RMAs that do have a connected claim.
Items: ticket.rma.line
| Property | Value |
|---|---|
graphSetName | rmaLines |
| Item edge name | rmaLines |
Relations:
| Relation | Node type | Cardinality |
|---|---|---|
claimLine | ticket.claim.line | single |
orderLine | orderLine | single |
pictures | file | many |
Graph Fields
All custom fields are sourced from each node's dynamic-field bag. The standard ticketId, ticketNumber, ticketState, tags, dynamic, createdAt, closedAt, channelKey fields are inherited from the ticket actor.
ticket.claim
| Field | Type | Source |
|---|---|---|
rejectReason | enum | dynamic->'rejectReason' |
rejectMessage | text | dynamic->'rejectMessage' |
isPaused | boolean | dynamic->'isPaused' |
pausedById | uuid | dynamic->'pausedBy' |
ticket.claim.line
| Field | Type | Source |
|---|---|---|
productNumber | text | dynamic->'productNumber' |
resolution | enum | dynamic->'resolution' |
quantity | number | dynamic->'quantity' |
claimLineState | enum | dynamic->'claimLineState' |
tags | [enum] | dynamic->'tags' |
rejectReason | enum | dynamic->'rejectReason' |
rejectMessage | text | dynamic->'rejectMessage' |
requireInspection | boolean | dynamic->'requireInspection' |
The proposedResolution and description values written by the createClaims ingress are also stored on the dynamic bag but are not exposed as graph fields by default — query them via dynamic->'proposedResolution' / dynamic->'description'.
ticket.rma.line
| Field | Type | Source |
|---|---|---|
productNumber | text | dynamic->'productNumber' |
expectedQuantity | number | dynamic->'expectedQuantity' |
receivedQuantity | number | dynamic->'receivedQuantity' |
acceptedQuantity | number | dynamic->'acceptedQuantity' |
refundFactor | number | dynamic->'refundFactor' |
tags | [enum] | dynamic->'tags' |
inspectionNotes | text | dynamic->'inspectionNotes' |
comment | text | dynamic->'comment' |
refundFactor is a decimal in the range 0..1. When the inspector accepts a partial refund (e.g. for wear), this is the multiplier the app applies when creating the return on the connected order.
Enum Value Sets
The Returns app declares the following enum value sets. The values themselves are not shipped by the app — they are intended to be populated by other apps (the demo apps include sample values) or by the merchant in the portal.
| Value set | Purpose |
|---|---|
ticket.claim/tags | Claim-level tags |
ticket.claim.line/tags | Line-level tags |
ticket.claim.line/resolution | Resolution types. Entries carry requireInspection / requireInspectionEditable properties — see Resolution Types. |
ticket.rma.line/tags | RMA line tags |
ticket.rma/tags | RMA ticket tags |
Reject reasons — global enum definition
rejectReason on both ticket.claim and ticket.claim.line is sourced from a single global enum definition rather than a per-node value set. Both graph fields declare enumDefinition: claimRejectReason and pick up their values from:
| Registry path | Purpose |
|---|---|
/enums/definitions/claimRejectReason/values/<reasonKey> | A selectable reject-reason value. |
/enums/definitions/claimRejectReason/categories/<categoryKey> | Optional grouping for the portal UI. |
The same reason keys apply whether the entire claim is rejected or only individual lines. See Resolution Types → Reject Reasons for the full schema and paired message templates.
ticket.claim.line/claimLineState
This value set is populated by the Returns app. The standard values are:
| Value | Description |
|---|---|
open | The line is still being decided on. |
rejected | The line was rejected — no resolution effect is emitted. |
completed | The line was accepted. OnClaimResolve is fired for this line (immediately if no inspection is required, or after the RMA is completed otherwise). |
Only lines in completed state are passed to the OnClaimResolve hook.