How to set up Auto add-to-cart
Overview
Auto add-to-cart adds products to the cart by itself when the cart meets the conditions you set. For example, it can add a free gift when the cart value reaches $100, or a free sample on the shopper's first visit.
You set this up with rules. Each rule has conditions, the products to add with their price, how the products behave in the cart, and when the rule is available.
Before you start
- The rules run in the cart drawer of XB: AI Cart Upsell Cart Drawer. Turn on the cart drawer first. See Getting started with XB: AI Cart Upsell Cart Drawer.
- Auto add-to-cart needs a paid plan. On the free plan, rules stay Inactive.
- To sell the added products at a lower price, the Xboost Cart discount must be Active in Discounts in your Shopify admin. See Why is the cart discount not applied?
Steps
1. Create a rule
- In the app menu, click Auto add-to-cart.
- Click Create rule.
- The rule gets a name like "Auto add-to-cart 1". To rename it, click the pencil icon next to the name. Shoppers do not see this name.
A new rule is Active. Click the status badge next to the name to switch between Active and Inactive.

The Rule summary on the right describes the rule in plain words while you edit it.
2. Set the conditions
With no condition, the rule always applies. To add one:
- Under Conditions, click Add condition.
- Choose the Condition type and fill in its fields:
| Condition type | The rule applies when |
|---|---|
| Cart value | The cart value is at least Minimum cart value, and not more than Maximum cart value (optional) if you set one. |
| Item quantity | The number of items is at least Minimum items, and not more than Maximum items (optional) if you set one. |
| Specific products | The cart contains any of the products you select. |
| All products except products | The cart contains none of the products you select. |
| Customer tag | The logged-in customer has any of the Customer tags. Separate several tags with commas. Tags are not case-sensitive. |
| Logged-in customer | The shopper is logged in to a customer account. |
| First visit | It is the shopper's first visit to your store in this browser. |
To add more conditions, click Add condition again. Then choose When multiple conditions are set: All conditions must be met or Any condition can be met.
Use the switch on a condition to turn it off without deleting it. Click the trash icon to delete it.
Products that the rule adds do not count toward the conditions. Cart value uses the price before discounts.
3. Choose the products to add
- Under Products to add, click Select products and pick one or more products or variants. Each variant is one item. A rule can add up to 10 items.
- For each item, set the Quantity.
- Choose the Discount type and its Value:
| Discount type | Price in the cart |
|---|---|
| Default price | The product's normal price. |
| Fixed price ($) | The price you type, for each unit. |
| Bundle discount (%) | The normal price minus this percentage. Type 100 to make the product free. This is the default, with 100. |
| Bundle discount ($) | The normal price minus this amount, for each unit. |
To replace a product, click Change product. To remove it, click Remove product.

If a variant sells out, the rule skips it and adds the other items. The editor shows Sold out next to that variant. Restock it or choose another variant.
4. Set the behavior
Under Behavior:
- Remove the product when the conditions are no longer met: when the cart no longer meets the conditions, for example the shopper removes items and the cart value drops, the added product is removed. If off, the product stays in the cart once added.
- Let shoppers remove the product: shoppers can remove the added product from the cart drawer. If off, they cannot. When on, choose When a shopper removes the product:
- Add it again if the conditions are met again: the product comes back after the cart stops meeting the conditions and then meets them again.
- Do not add it again to that cart: the product is not added again to that cart.
- Prevent shoppers from changing the quantity: shoppers cannot change the quantity of the added product in the cart drawer.
All options are on by default, with Add it again if the conditions are met again.

5. Set the availability (optional)
Under Availability:
- Market: run the rule in All markets or in one market only.
- Start date and End date: run the rule only between these dates. Leave them empty to run it all the time.

6. Save and test
- Click Save at the top right.
- To check the rule on your store, click Test on storefront, then Open preview mode. Add products to the cart until it meets the conditions. The cart drawer adds the products of the rule.
What shoppers see
In this example, the rule adds a blanket for free when the cart value is at least $100. The shopper has two $45 blankets in the cart and changes the quantity to 3. The cart value is now $135, so the cart drawer adds the free blanket at once and shows the notification. With Prevent shoppers from changing the quantity on, the quantity buttons of the added blanket are grayed out.

Manage your rules
The Auto add-to-cart page lists your rules with their Status, number of Products and Priority.

- Click a rule name to edit it.
- Select one or more rules with the checkboxes to activate, deactivate, clone or delete them.
- When several rules match the cart, each rule adds its own products. Priority sets the order in which rules are checked. A higher Priority goes first.
Change the notification
When a rule adds a product, the cart drawer shows a short notification, by default "{{product_title}} was added to your cart". {{product_title}} is replaced with the product name.
- In the app menu, click Cart Drawer, then Design.
- Under Notifications, edit Notification when a product is added automatically. Leave it empty to turn the notification off.
- Click Save in the bar at the top of the page.
The same section sets the Notification position, Notification text size and colors.

Troubleshooting
- The product is not added: check that the cart drawer of XB: AI Cart Upsell Cart Drawer is on, the rule is Active, today is between the Start date and End date, and the shopper's market matches Market. The rules do not run in your theme's own cart drawer or cart page.
- The product is added at full price: check that the Xboost Cart discount is Active in Discounts. See Why is the cart discount not applied?