Skip to main content

appUpdateSalesOrderLines

Requires permission sales:sales_order:update.

Change a sales order's lines from an installed app, while the order is unpaid and nothing has shipped or been invoiced. Added and changed lines are priced by the server; a line no change names keeps its price. Needs write_orders.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation AppUpdateSalesOrderLines($input: AppUpdateSalesOrderLinesInput!) {
appUpdateSalesOrderLines(input: $input) {
id
customerPoNumber
orderNumber
sourceQuoteNumber
trackingNumber
creatorName
billingAddress {
postalCode
city
country
state
street1
street2
}
}
}

Variables:

{
"input": {
"lineChanges": [
{
"op": "ADD"
}
],
"salesOrderId": "id"
}
}

Response:

{
"data": {
"appUpdateSalesOrderLines": {
"id": "id",
"customerPoNumber": "string",
"orderNumber": "string",
"sourceQuoteNumber": "string",
"trackingNumber": "string",
"creatorName": "string",
"billingAddress": {
"postalCode": "string",
"city": "string",
"country": "string",
"state": "string",
"street1": "string",
"street2": "string"
}
}
}
}
appUpdateSalesOrderLines(
input: AppUpdateSalesOrderLinesInput!
): SalesOrder!

Arguments​

appUpdateSalesOrderLines.input ● AppUpdateSalesOrderLinesInput! non-null input​

The order and its line changes.

Type​

SalesOrder object​

A confirmed demand from a customer to ship goods, usually converted from a quote. Moves through confirmation, shipment, invoicing and payment.