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