order Edit Add Line Item Discount
Requires access scope. Also: The user must have apply_discounts_to_orders permission.
Applies a discount to a during an order edit session. The discount can be either a fixed amount or percentage value.
To modify pricing on specific line items, use this mutation after starting an order edit with the mutation. The changes remain staged until you commit them with the mutation.
Learn more about editing existing orders.
Arguments
- discount (OrderEditAppliedDiscountInput!)
- id (ID!)
- lineItemId (ID!)
- Anchor to discountdiscount•Order
Edit Applied Discount Input! required The discount to add to the line item.
- •ID!required
The ID of the calculated order or the order edit session to edit.
- Anchor to lineItemIdline•ID!
Item Id required The ID of the calculated line item to add the discount to.
- addedDiscountStagedChange (OrderStagedChangeAddLineItemDiscount)
- calculatedLineItem (CalculatedLineItem)
- calculatedOrder (CalculatedOrder)
- orderEditSession (OrderEditSession)
- userErrors ([UserError!]!)
- Anchor to addedDiscountStagedChangeadded•Order
Discount Staged Change Staged Change Add Line Item Discount The discount applied to a line item during this order edit.
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.