younifyd
Menu

returnOrderItem

Find a ReturnOrderItem entity.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the returnOrderItem action (under Return).
  3. Fill in the fields below, then reference the result from later steps as {{returnorderitem.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query ReturnOrderItem($ref: String!, $returnOrder: ReturnOrderKey!) {
  returnOrderItem(ref: $ref, returnOrder: $returnOrder) {
    attributes {
      name
      type
      value
    }
    createdOn
    id
    itemAmount {
      amount
      scale
      unscaledValue
    }
    itemTaxAmount {
      amount
      scale
      unscaledValue
    }
    orderItem {
      order {
        ref
        retailer
      }
      ref
    }
    product {
      catalogue {
        ref
      }
      ref
    }
    ref
    returnCondition {
      label
      value
    }
    returnConditionComment
    returnDispositionAction {
      label
      value
    }
    returnOrder {
      attributes {
        name
        type
        value
      }
      createdOn
      creditMemo {
        ref
      }
      currency {
        alphabeticCode
      }
      customer {
        ref
      }
      defaultTaxType {
        country
        group
        tariff
      }
      destinationLocation {
        ref
      }
      exchangeOrder {
        ref
        retailer
      }
      id
      lodgedLocation {
        ref
      }
      order {
        ref
        retailer
      }
      pickupAddress {
        city
        companyName
        country
        latitude
        longitude
        name
        postcode
        region
        state
        street
        timeZone
      }
      ref
      retailer {
        id
      }
      returnAuthorisationDisposition {
        label
        value
      }
      returnAuthorisationKey
      returnAuthorisationKeyExpiry
      status
      subTotalAmount {
        amount
        scale
        unscaledValue
      }
      totalAmount {
        amount
        scale
        unscaledValue
      }
      totalTax {
        amount
        scale
        unscaledValue
      }
      type
      updatedOn
      workflow {
        ref
        version
      }
      workflowRef
      workflowVersion
    }
    returnPaymentAction {
      label
      value
    }
    returnReason {
      label
      value
    }
    returnReasonComment
    status
    unitAmount {
      amount
      scale
      unscaledValue
    }
    unitQuantity {
      quantity
      unit
    }
    unitTaxType {
      country
      group
      tariff
    }
    updatedOn
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

refstringrequired

Max character limit: 100.

returnOrderobjectrequired
refstringrequired
retailerobjectrequired1 fields
json
{
  "ref": "string",
  "returnOrder": {
    "ref": "string",
    "retailer": {
      "id": "string"
    }
  }
}

Response

Read the result with {{returnorderitem.response.data.data.returnOrderItem}}. If the API returns errors, the step fails and they are at {{returnorderitem.response.data.errors}}.

attributesarray<object>
nameobject
typeobject
valueobject
createdOnstring
idstring
itemAmountobject
amountnumber
scalenumber
unscaledValuenumber
itemTaxAmountobject
amountnumber
scalenumber
unscaledValuenumber
orderItemobject
orderobject2 fields
refstring
productobject
catalogueobject1 fields
refstring
refstring
returnConditionobject
labelstring
valuestring
returnConditionCommentstring
returnDispositionActionobject
labelstring
valuestring
returnOrderobject
attributesarray<object>
createdOnstring
creditMemoobject1 fields
currencyobject1 fields
customerobject1 fields
defaultTaxTypeobject3 fields
destinationLocationobject1 fields
exchangeOrderobject2 fields
idstring
lodgedLocationobject1 fields
orderobject2 fields
pickupAddressobject11 fields
refstring
retailerobject1 fields
returnAuthorisationDispositionobject2 fields
returnAuthorisationKeystring
returnAuthorisationKeyExpirystring
statusstring
subTotalAmountobject3 fields
totalAmountobject3 fields
totalTaxobject3 fields
typestring
updatedOnstring
workflowobject2 fields
workflowRefstring
workflowVersionnumber
returnPaymentActionobject
labelstring
valuestring
returnReasonobject
labelstring
valuestring
returnReasonCommentstring
statusstring
unitAmountobject
amountnumber
scalenumber
unscaledValuenumber
unitQuantityobject
quantitynumber
unitstring
unitTaxTypeobject
countrystring
groupstring
tariffstring
updatedOnstring

Need more? See the Fluent Commerce guide for connection setup and behaviour shared by every action.

Was this page helpful?