Skip to main content
Anchor to orderEditAddManualOrderDiscount

orderEditAddManualOrderDiscount

mutation

Requires write_order_edits access scope. Also: The user must have apply_discounts_to_orders permission.

Adds a manual order-level discount during an order edit session.

The discount is allocated across all line items. The changes remain staged until committed with the orderEditCommit mutation.

If the edit already has a staged manual order-level discount, this replaces it. If the order already has an active manual order-level discount, remove it with orderEditRemoveDiscount first.

To change or remove the discount later in the edit, use orderEditUpdateDiscount or orderEditRemoveDiscount.

•OrderEditAppliedDiscountInput!
required

The manual order-level discount to add.

Show input fields
•ID!
required

The ID of the calculated order or the order edit session to edit.


Was this section helpful?

Anchor to OrderEditAddManualOrderDiscountPayload returnsOrderEditAddManualOrderDiscountPayload returns

Anchor to addedManualDiscountStagedChangeaddedManualDiscountStagedChange
•OrderStagedChangeAddManualDiscount

The staged change recording the manual order-level discount.

Show fields
•CalculatedOrder

An order with the edits applied but not saved.

Show fields
•OrderEditSession

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

Show fields
•[UserError!]!
non-null

The list of errors that occurred from executing the mutation.

Show fields

Was this section helpful?