Menu
createCreditMemoItem
Creates a 'Credit memo item'.
Use it in a workflow
- Add a step and choose the Fluent Commerce connector.
- Pick the createCreditMemoItem action (under Create).
- Fill in the fields below, then reference the result from later steps as
{{createcreditmemoitem.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.
mutation CreateCreditMemoItem($input: CreateCreditMemoItemInput) {
createCreditMemoItem(input: $input) {
amount {
amount
scale
unscaledValue
}
createdOn
creditMemo {
attributes {
name
type
value
}
billingAccount {
address
attributes
createdOn
customer
id
name
ref
retailer
status
type
updatedOn
workflow
workflowRef
workflowVersion
}
createdOn
currency {
alphabeticCode
}
defaultTaxType {
country
group
tariff
}
id
invoice {
attributes
billingAccount
createdOn
creditMemos
currency
defaultTaxType
dueDate
fulfilment
id
issueDate
order
ref
status
subTotalAmount
totalAmount
totalBalance
totalTax
type
updatedOn
workflow
workflowRef
workflowVersion
}
issueDate
order {
ref
retailer
}
ref
returnOrder {
ref
retailer
}
status
subTotalAmount {
amount
scale
unscaledValue
}
totalAmount {
amount
scale
unscaledValue
}
totalBalance {
amount
scale
unscaledValue
}
totalTax {
amount
scale
unscaledValue
}
type
updatedOn
workflow {
ref
version
}
workflowRef
workflowVersion
}
creditReasonCode {
label
value
}
description
id
orderItem {
order {
ref
retailer
}
ref
}
product {
catalogue {
ref
}
ref
}
ref
returnOrderItem {
ref
returnOrder {
ref
retailer
}
}
taxAmount {
amount
scale
unscaledValue
}
type
unitAmount {
amount
scale
unscaledValue
}
unitCostAmount {
amount
scale
unscaledValue
}
unitQuantity {
quantity
unit
}
unitTaxType {
country
group
tariff
}
updatedOn
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"input": {
"amount": {
"amount": 0,
"scale": 0,
"unscaledValue": 0
},
"creditMemo": {
"ref": "string"
},
"ref": "string",
"taxAmount": {
"amount": 0,
"scale": 0,
"unscaledValue": 0
},
"type": "string",
"unitAmount": {
"amount": 0,
"scale": 0,
"unscaledValue": 0
},
"unitQuantity": {
"quantity": 0,
"unit": "string"
},
"creditReasonCode": {
"value": "string",
"label": "string"
},
"description": "string",
"orderItem": {
"order": {
"ref": "string",
"retailer": "string"
},
"ref": "string"
},
"product": {
"catalogue": {
"ref": "string"
},
"ref": "string"
},
"returnOrderItem": {
"ref": "string",
"returnOrder": {
"ref": "string",
"retailer": "string"
}
}
}
}
Response
Read the result with {{createcreditmemoitem.response.data.data.createCreditMemoItem}}. If the API returns errors, the step fails and they are at {{createcreditmemoitem.response.data.errors}}.
Need more? See the Fluent Commerce guide for connection setup and behaviour shared by every action.
Was this page helpful?