Skip to main content
Replaces an existing discount’s rule in Shopify — and puts it back into test mode.
Tool name: shopify_discount_update · Writes to Shopify · Marked destructive, so most clients will ask before every call

When to use it

Only when the merchant has actually asked for an existing discount to be changed in Shopify, and understands that it goes back into test mode. Draft a discount with targetDiscountId proposes the same edit and changes nothing in Shopify. Create in test mode makes a new discount instead. This tool never creates one.

What overwriting really does

It replaces the discount’s rule in Shopify and re-creates it in test mode. AIOD attaches an email condition so it only ever applies to the store’s test email address — returned to you as testModeEmail. So a discount that was live for shoppers stops applying to them until a person opens it in the AIOD editor and switches it to active. No tool here can make that switch, activate a discount, or delete one.
This is why the tool is marked destructive. Confirm with the merchant, in words, before overwriting a discount that is live.

Parameters

Read the discount with Read a discount first. The patch is written against its current values, and the saved discount’s template cannot change. There is no mode parameter. Test mode is fixed in the server — nothing a caller sends can push a chat-authored discount live.

What comes back

When it works, the response has the same fields as Create in test mode: discountId, url, title, status, testModeEmail, warnings, and a message. If validation or simulation fails, or the patch would leave the rule unchanged (edit_changed_nothing), nothing is changed.

What it checks first

The same gate as drafting and creating — shape repair, field policy, empty tier check, then validation and cart simulation. The rejection codes are the same too.

Things people ask that land here

  • “Replace the tier ladder on my volume discount with these three tiers.”
  • “Change the free gift on my summer offer to the tote bag, and update it in Shopify.”
  • “Raise the spend threshold on my existing discount to $120.”

Getting it right

Report all three of these, every time:
  1. The discount’s rule was replaced in Shopify, and it is back in test mode.
  2. It only applies for testModeEmail. If it was live, real shoppers no longer get it.
  3. The merchant must open url and switch it to active themselves. No tool can do it for them.
And remember this only covers AIOD’s automatic discounts — not discount codes, and not discounts created directly in Shopify or by another app.