Skip to content

Order Edit

The Order Edit push adds to an existing order: shipping charges, custom items, variants and discounts on its lines. Each record makes one edit to one order, and Shopify applies all its lines together or none of them.

On a push connector, select Order Edit as the Shopify Import Type. The push opens an edit with Shopify's orderEditBegin mutation, sends one mutation for each line, and commits the edit with orderEditCommit.

The push only adds. It cannot change or remove lines already on the order.

Records

Record Under One for each
Order edit to an order
Lines Order line to add, or discount to apply

Order

Field Rule
Order Id Required. The order to edit, as a numeric id or a gid
Notify Customer True emails the customer when Shopify commits the edit. Blank is False
Staff Note An internal note Shopify records against the edit

Lines

Line Type decides what each line does. It is required, and IMan accepts it in any letter case:

Line Type Adds Needs
Shipping A shipping charge Title and Amount
Custom A custom item with no product, such as a service charge Title and Amount, the unit price
Variant A product variant Variant Id
Discount A discount on a line already on the order Line Item Id, and Discount Amount or Discount Percent

The other fields:

  • Quantity (Custom, Variant): blank is 1.
  • Currency Code (Shipping, Custom, Discount): blank is the order's currency.
  • Taxable (Custom): blank leaves Shopify's default of True.
  • Requires Shipping (Custom): blank leaves Shopify's default of False.
  • Location Id (Custom, Variant): the location to fulfil the line from. Blank lets Shopify choose.
  • Allow Duplicates (Variant): True adds a variant that is already on the order.
  • Discount Amount or Discount Percent, and Discount Description: on a Discount line, the discount on the existing line. On a Custom or Variant line, a discount on the line just added. Give one of Discount Amount and Discount Percent, not both.

How an Edit Goes

IMan checks every line before it opens the edit, and a record that fails a check changes nothing. It then opens the edit and sends the lines in order. If Shopify refuses any line, IMan does not commit, and the order stays as it was:

Line 2 (Variant) was rejected, so the edit to order [1234567890] was abandoned and the order is unchanged.

Shopify allows edits to only some orders. When it refuses to open the edit, the message gives Shopify's reasons.

Running the same record twice adds its lines twice. Keep track of the edits a run has made.

The push writes nothing back. A record without Lines opens and commits an empty edit.

Access Scopes

The push needs write_order_edits. See Access Scopes.

Shopify Reference

Edit existing orders and orderEditBegin in Shopify's developer documentation.