younifyd
Menu

createReturnFulfilmentItem

Creates a 'Return fulfilment item'.

Use it in a workflow

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

Query

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

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

Variables

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

inputobject
attributesarray<object>3 fields
productobject2 fields
refstringrequired
returnOrderFulfilmentobjectrequired2 fields
returnOrderItemobjectrequired2 fields
unitQuantityobjectrequired2 fields
json
{
  "input": {
    "ref": "string",
    "returnOrderFulfilment": {
      "ref": "string",
      "returnOrder": {
        "ref": "string",
        "retailer": "string"
      }
    },
    "returnOrderItem": {
      "ref": "string",
      "returnOrder": {
        "ref": "string",
        "retailer": "string"
      }
    },
    "unitQuantity": {
      "quantity": 0,
      "unit": "string"
    },
    "attributes": [
      {
        "name": "string",
        "type": "string",
        "value": "string"
      }
    ],
    "product": {
      "catalogue": {
        "ref": "string"
      },
      "ref": "string"
    }
  }
}

Response

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

attributesarray<object>
nameobject
typeobject
valueobject
createdOnstring
idstring
productobject
catalogueobject1 fields
refstring
refstring
returnOrderFulfilmentobject
attributesarray<object>
createdOnstring
destinationLocationobject1 fields
idstring
lodgedLocationobject1 fields
pickupAddressobject11 fields
refstring
returnOrderobject26 fields
statusstring
typestring
updatedOnstring
workflowobject2 fields
workflowRefstring
workflowVersionnumber
returnOrderItemobject
attributesarray<object>
createdOnstring
idstring
itemAmountobject3 fields
itemTaxAmountobject3 fields
orderItemobject2 fields
productobject2 fields
refstring
returnConditionobject2 fields
returnConditionCommentstring
returnDispositionActionobject2 fields
returnOrderobject26 fields
returnPaymentActionobject2 fields
returnReasonobject2 fields
returnReasonCommentstring
statusstring
unitAmountobject3 fields
unitQuantityobject2 fields
unitTaxTypeobject3 fields
updatedOnstring
unitQuantityobject
quantitynumber
unitstring
updatedOnstring

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