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

# Testing Offers

> Learn how to test your discounts in the Atom Admin simulator, with AI assistance, or directly on your storefront.

Testing is a critical part of creating promotions. Atom Commerce provides three ways to verify that your offers work exactly as expected before they go live for all customers.

<CardGroup cols={3}>
  <Card title="Admin Simulator" icon="laptop-code">
    Test discounts manually in the built-in cart builder.
  </Card>

  <Card title="AI Agent" icon="robot">
    Let the AI Assistant build carts and verify results for you.
  </Card>

  <Card title="Storefront" icon="store">
    Preview offers on your actual live website in isolation.
  </Card>
</CardGroup>

## Admin Simulator (Local Testing)

The Admin Simulator allows you to build a test cart and see evaluation results instantly without affecting your live store.

### Using the Simulator

1. Navigate to **Test Offers** in the sidebar.
2. **Select Offers**: Choose the active or scheduled offers you want to test from the selection panel.
3. **Build your Cart**: Use the **Cart Builder** to add products from your catalog.
4. **Apply Coupons**: If your offer requires a coupon code, enter it in the coupon field.
5. **View Results**: The results panel shows:
   * **Total Savings**: The total discount amount applied.
   * **Applied Discounts**: A breakdown of which offers applied and how many times.
   * **Line Item Details**: Detailed pricing for each item in the cart.

### Test Modes

You can choose between two test modes to control how your selected offers interact with other discounts:

* **Test Together with Active Offers (`ALL`)**: This mode includes all currently active offers in your store. Use this to see how your new offer stacks or conflicts with existing promotions.
* **Test in Isolation (`ISOLATION`)**: This mode only evaluates the offers you have explicitly selected. Use this to verify a new offer's behavior without noise from other active discounts.

<Note>
  Free gifts (Gift with Purchase) are automatically added to your simulator cart if the qualifying conditions are met.
</Note>

## AI-Powered Testing

The **Test with Agent** feature leverages the Atom AI Assistant to automate and verify your testing workflows.

### How to use AI Testing

Click the **Test with Agent** button in the Test Offers scene to open the assistant with testing-specific instructions.

The AI Agent can:

* **Find Qualifying Products**: Ask "What products qualify for my 20% discount?" and the agent will list them.
* **Build Complex Carts**: Say "Add 3 shirts and 2 hats to my test cart."
* **Run and Explain Tests**: The agent will run the evaluation and explain why specific discounts applied (or why they didn't).
* **Verify Accuracy**: The agent automatically checks if the discount amount in the results matches your offer definition.

<Tip>
  If you have a tiered discount (e.g., "Spend $100, save $10; Spend $200, save $25"), the AI Agent is particularly helpful for verifying that the correct tier is triggered at each price point.
</Tip>

## Storefront Testing

For the most realistic verification, you can preview your offers directly on your Shopify storefront.

### Enabling Test Mode

If an offer is **Scheduled** but not yet live, you must enable **Test Mode** to see it on the storefront:

1. In the **Test Offers** page, select the scheduled offer.
2. If the offer doesn't have a test code, the AI Assistant or the UI will prompt you to **Enable Test Mode**.
3. Enabling Test Mode generates a private test code that allows you to trigger the offer via a special link.

### Previewing on Storefront

1. Switch to the **Test on Storefront** tab.
2. Click **Open Storefront Test View**.
3. Your store will open in a new tab with a special `?atom_test_offer=...` parameter.
4. Browse your store and add items to your cart as a customer would. The selected offer will be active only for your session.

<Warning>
  Storefront testing is for preview purposes only. While you can see the discounts, avoid completing actual transactions unless you are using a Shopify test payment gateway.
</Warning>

## Troubleshooting Conflicts

If an offer isn't applying as expected in the simulator, it might be due to a priority conflict.

### Offer Priority and Stacking

Atom Commerce evaluates discounts based on their **Rank** (Priority). If two offers cannot stack (e.g., two different 10% off coupons where stacking is disabled), only the higher priority offer will apply.

* **Higher Rank = Higher Priority**: An offer with Rank 10 will apply before an offer with Rank 0.
* **Qualifier Conflicts**: If a product is used as a "qualifier" for one offer, it may be unavailable for others depending on your [Discount Limits](/discount-limits/overview) settings.

### AI Troubleshooting

You can ask the AI Agent: "Why isn't my BOGO offer applying?" The agent will analyze the cart, check for priority conflicts, and can even help you **Change Offer Priority** directly through a confirmation dialog.

For more details on how priority works, see the [Offer Priority and Stacking](/offers/priority-and-stacking) guide.
