Add a reward tier
Needs a read and write connection. A reward tier is a goal on the reward bar: free shipping, an order discount, or a free gift once the cart reaches an amount.
Ask: "Add a free shipping tier at $75."
Step 1 — Read the current tiers
Call get_drawer_settings with sections: ["rewards"]. Each tier has a stable tierId. Tiers made
in the Cart Editor report a positional id such as tier_legacy_1 until a tier write saves them.
Also confirm the reward bar is switched on; if not, update_drawer_features turns it on.
Step 2 — Gather what the tier needs
| Reward type | Needs |
|---|---|
| Free shipping | A goal amount |
| Order off | A goal amount and an existing Shopify discount, by discountCode or discountId |
| Free gift | A goal amount and an existing Shopify buy-X-get-Y discount; the gift is the product that discount gives |
For discounts, search_discounts finds the existing one by title. The assistant should not invent a
code.
Step 3 — Add the tier
add_reward_tier appends one tier and returns its tierId. The goal is goalValue, in the store's
currency; goalBySpecificCurrency sets round goals for each currency the reward bar offers.
icon picks the discount, delivery or gift preset.
Step 4 — Reorder, edit, remove
update_reward_tierchanges fields on one tier, picked bytierIdortierName.reorder_reward_tierssets the full order from everytierId.remove_reward_tierneedsconfirm: true; the assistant should ask you first.
Every write returns the new revision. If the settings changed in the app after the assistant last
read them, the write is refused with "Cart drawer configuration changed from revision X to Y. Read
it again before retrying." That is the safeguard working: read again, then retry.
What you finish holding
A tier with a known id and goal, its place on the bar, and confirmation it is saved and published.