Skip to content

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

PropertyValue
graphSetNameclaims
itemEdgeNameclaim
defaultNumberPrefixCLM

Relations on ticket.claim

RelationNode typeCardinality
orderordersingle
pausedByidentitysingle (via pausedById field)

Items: ticket.claim.line

PropertyValue
graphSetNameclaimLines
Item edge nameclaimLines

Relations:

RelationNode typeCardinality
picturesfilemany
orderLineorderLinesingle

rma

Registry: /actors/ticket/types/rma

PropertyValue
graphSetNamermas
itemEdgeNamerma
defaultNumberPrefixRMA

Relations on ticket.rma

RelationNode typeCardinality
orderordersingle
claimticket.claimsingle

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

PropertyValue
graphSetNamermaLines
Item edge namermaLines

Relations:

RelationNode typeCardinality
claimLineticket.claim.linesingle
orderLineorderLinesingle
picturesfilemany

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

FieldTypeSource
rejectReasonenumdynamic->'rejectReason'
rejectMessagetextdynamic->'rejectMessage'
isPausedbooleandynamic->'isPaused'
pausedByIduuiddynamic->'pausedBy'

ticket.claim.line

FieldTypeSource
productNumbertextdynamic->'productNumber'
resolutionenumdynamic->'resolution'
quantitynumberdynamic->'quantity'
claimLineStateenumdynamic->'claimLineState'
tags[enum]dynamic->'tags'
rejectReasonenumdynamic->'rejectReason'
rejectMessagetextdynamic->'rejectMessage'
requireInspectionbooleandynamic->'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

FieldTypeSource
productNumbertextdynamic->'productNumber'
expectedQuantitynumberdynamic->'expectedQuantity'
receivedQuantitynumberdynamic->'receivedQuantity'
acceptedQuantitynumberdynamic->'acceptedQuantity'
refundFactornumberdynamic->'refundFactor'
tags[enum]dynamic->'tags'
inspectionNotestextdynamic->'inspectionNotes'
commenttextdynamic->'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 setPurpose
ticket.claim/tagsClaim-level tags
ticket.claim.line/tagsLine-level tags
ticket.claim.line/resolutionResolution types. Entries carry requireInspection / requireInspectionEditable properties — see Resolution Types.
ticket.rma.line/tagsRMA line tags
ticket.rma/tagsRMA 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 pathPurpose
/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:

ValueDescription
openThe line is still being decided on.
rejectedThe line was rejected — no resolution effect is emitted.
completedThe 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.

© 2024 Hantera AB. All rights reserved.