10/31/2026, 12:00:30 AM
The API now supports adding a manual order‑level discount during an order‑edit session via the new orderEditAddManualOrderDiscount mutation. This mutation stages the discount, creating an OrderStagedChangeAddManualDiscount record that is committed only when orderEditCommit is called. The payload includes the staged change, a preview of the CalculatedOrder, and the updated OrderEditSession, plus any field‑level user errors. Several calculated discount application objects (Automatic, Code, Manual, Script) now expose a discountClass enum to identify whether the discount applies to the order, a product, or shipping, returning null for non‑classified (manual) discounts. Additionally, CalculatedOrder receives a discountApplications connection that reflects all staged changes, allowing clients to preview which discounts will be added or removed before committing. Developers should update client code to handle the new mutation, process the staged change object, and consider the new discountClass field when filtering or displaying discounts, and use the discountApplications connection to view the current edit’s discount state.
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 theorderEditCommit 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 withorderEditRemoveDiscount first.
To change or remove the discount later in the edit, useorderEditUpdateDiscount ororderEditRemoveDiscount.
Return type for orderEditAddManualOrderDiscount mutation.
A manual order-level discount staged during the current order edit.
discountClassThe class of the discount application: order, product or shipping. Returns null when the discount has no class, such as a manual discount.
discountClassThe class of the discount application: order, product or shipping. Returns null when the discount has no class, such as a manual discount.
discountClassThe class of the discount application: order, product or shipping. Returns null when the discount has no class, such as a manual discount.
discountClassThe class of the discount application: order, product or shipping. Returns null when the discount has no class, such as a manual discount.
discountApplicationsThe order's discount applications with the current edit's staged changes applied: discounts being removed
are left out and discounts being added are included.
discountClassThe class of the discount application: order, product or shipping. Returns null when the discount has no class, such as a manual discount.