> ## Documentation Index
> Fetch the complete documentation index at: https://aiodapp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> Real requests to an AI agent connected to AIOD, and exactly what happens for each one.

What you say, and what the assistant actually does with it.

***

## "Spend \$100, get 10% off — but not sale items"

<CodeGroup>
  ```text You theme={null}
  Create a discount where customers spending $100 get 10% off,
  but exclude products in the Sale collection.
  ```
</CodeGroup>

**What happens**

<Steps>
  <Step title="It reads AIOD's rules">
    First the template contracts, then the condition syntax — it needs both to write a spend threshold and an exclusion.
  </Step>

  <Step title="It picks a template">
    There's a real eligibility rule, which rules out the simple one. There's a single reward, which rules out the multi-tier one. So: the custom rule builder.
  </Step>

  <Step title="It sets the spend condition">
    Cart subtotal of \$100.
  </Step>

  <Step title="It sets the reward">
    10% off, applied at product level.
  </Step>

  <Step title="It works out which exclusion you meant">
    "Excluding sale items" from a *spend threshold* means sale items shouldn't count toward the \$100 — not that they shouldn't be discounted. A good assistant will confirm this if it's ambiguous.
  </Step>

  <Step title="It drafts it">
    Validated, cart-simulated, and staged. You get a link.
  </Step>

  <Step title="It hands you the link">
    And tells you the discount isn't live until you open it and save.
  </Step>
</Steps>

***

## "Free tote over \$75"

<CodeGroup>
  ```text You theme={null}
  Give a free tote bag when someone spends over $75.
  ```
</CodeGroup>

**What happens**

1. It reads the free gift contract.
2. It confirms the tote is **added by the app**, not by the shopper. It is — so this is a gift, not a BOGO.
3. It works out which tote variant you mean, or asks. A gift has to be a specific item; "the Sale collection" can't be a gift because nothing could decide which one to add.
4. It sets the \$75 cart subtotal condition and a gift quantity of one.
5. It drafts it and hands you the link.

***

## "Buy 2 get 1 free"

<CodeGroup>
  ```text You theme={null}
  Buy 2 t-shirts, get the third one free.
  ```
</CodeGroup>

**What happens**

1. It reads the BOGO contract.
2. The shopper adds all three shirts themselves and the third is price-reduced — so BOGO, not a gift.
3. **It sets the quantity to 3, not 2.** The qualifying and rewarded items are the same thing, so the rule needs two paid plus the next one discounted.
4. It sets the reward: 100% off one t-shirt per qualification.
5. It asks whether the offer should repeat for every group of three, if you didn't say.
6. It drafts it and hands you the link.

<Warning>
  Miscounting is the most common mistake on this kind of offer. "Buy 2 get 1 free" on the same product needs a quantity of **3**.
</Warning>

***

## "Spend more, save more"

<CodeGroup>
  ```text You theme={null}
  Spend $50 get 10% off, spend $100 get 20% off, spend $200 get 20% off
  plus free shipping.
  ```
</CodeGroup>

**What happens**

1. It reads the tiered contract.
2. Every tier uses the same kind of condition — cart subtotal — with only the number rising. That makes it a straight ladder, not the multi-condition template. Different reward kinds per tier are fine here.
3. It writes all three tiers out in full, each with its own condition and reward.
4. It leaves stacking off: **the highest unlocked tier wins**. It only stacks every tier if you ask.
5. It drafts it and hands you the link.

***

## "Raise the threshold on my existing offer"

<CodeGroup>
  ```text You theme={null}
  Raise the free-shipping threshold on my summer offer from $50 to $75.
  ```
</CodeGroup>

**What happens**

<Steps>
  <Step title="It finds the discount">
    Usually by listing everything rather than searching — "my summer offer" rarely matches the stored name exactly. It'll confirm which one it means before touching anything.
  </Step>

  <Step title="It reads the current setup">
    Because the change is a patch onto what's there, not a replacement. It needs to know the current values.
  </Step>

  <Step title="It changes only the threshold">
    Everything else stays exactly as it was.
  </Step>

  <Step title="It hands you the link">
    Nothing is saved until you open it and save.
  </Step>
</Steps>

***

## When something is wrong with the request

Sometimes a draft gets rejected. That's the system working — AIOD checks the discount against a simulated cart before staging anything, so mistakes get caught before you ever see them.

The rejection names the exact field at fault and includes the correct syntax, so the assistant fixes that one field and tries again. Usually you never notice.

The one case worth knowing about: if you ask for a setting that a particular template genuinely doesn't support, the assistant should **tell you that** rather than keep retrying. If it does, the answer is usually a different template — ask it which one would work.

***

## "Create it so I can test it"

<CodeGroup>
  ```text You theme={null}
  Go ahead and create the BOGO so I can test it on the storefront.
  ```
</CodeGroup>

**What happens**

1. You explicitly asked for it to be created, so the assistant publishes rather than drafts. (A successful draft on its own is not a reason to publish.)
2. The same validation and cart simulation runs. If it fails, nothing is created.
3. A real Shopify discount is created — **in test mode**.
4. The assistant tells you three things:
   * The discount genuinely exists in Shopify.
   * It only applies to your test email address, which it gives you. Real shoppers see nothing.
   * You have to open it and switch it to active yourself. No tool can do that.

<Warning>
  If you ask it to *replace* an existing discount this way, that discount goes back into test mode — so one that was live for shoppers stops applying. The assistant should confirm before doing it, and most clients will ask you too.
</Warning>

***

## "How did it do?"

<CodeGroup>
  ```text You theme={null}
  How did my BOGO do last month, and is it worth re-running for Black Friday?
  ```
</CodeGroup>

**What happens**

1. It finds the discount.
2. It pulls the numbers for your date range: order count, revenue, margin given away, and average order value.
3. To compare against another offer, it looks that one up separately — there's no all-at-once report.
4. If a recent discount shows zero orders, it should say attribution lags checkout by a short while rather than telling you the discount is broken.
