Skip to main content
Anchor to OrderEditAddCustomItemPayload

OrderEditAddCustomItemPayload

payload

Return type for orderEditAddCustomItem mutation.

•CalculatedLineItem

The custom line item that will be added to the order based on the current edits.

•CalculatedOrder

An order with the edits applied but not saved.

•OrderEditSession

The order edit session with the edits applied but not saved.

•[UserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?

Anchor to Mutations with this payloadMutations with this payload

•mutation

Adds a custom line item to an existing Order. Custom line items represent products or services not in your catalog, such as gift wrapping, installation fees, or one-off charges.

Creates a CalculatedLineItem with the specified title, price, and quantity. Changes remain in the edit session until you commit them with the orderEditCommit mutation.

Learn more about adding custom line items.

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit to which the custom item is added.

•String!
required

The name of the custom item to add.

•ID

The ID of the retail location (if applicable) from which the custom item is sold. Used for tax calculations. A default location will be chosen automatically if none is provided.

•MoneyInput!
required

The unit price of the custom item. This value can't be negative.

•Int!
required

The quantity of the custom item. This value must be greater than zero.

•Boolean

Whether the custom item is taxable. Defaults to true.

•Boolean

Whether the custom item requires shipping. Defaults to false.



Was this section helpful?