Tool name:
shopify_discount_publish · Previously: publish_discount · Writes to Shopify · Marked destructive, so most clients will ask before every callWhen to use it
Only when the merchant has actually asked for the discount to be created, or wants to try it on the live storefront before opening it to shoppers. Draft a discount covers everything up to that point and touches nothing. A successful draft is not a reason to publish.What “test mode” really means
It is not a dry run. The discount genuinely exists in Shopify, and Shopify genuinely evaluates it at checkout. What makes it safe is that AIOD attaches an email condition when creating it, so it only ever applies to the store’s test email address — returned to you astestModeEmail. Real shoppers are unaffected.
It stays that way 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.
Parameters
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
When it’s rejected
What it checks first
Exactly the same gate as drafting — shape repair, field policy, empty tier check, then validation and cart simulation. An unverified configuration is never published. The rejection codes are the same too.Things people ask that land here
- “Create it — I want to test the BOGO on the storefront.”
- “Go ahead and publish the free gift offer in test mode.”
- “Replace the tier ladder on my volume discount with these three tiers.”
Getting it right
Report all three of these, every time:- The discount is genuinely created in Shopify, in test mode.
- It only applies for
testModeEmail. Real shoppers see nothing. - The merchant must open
urland switch it to active themselves. No tool can do it for them.

