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

# Checkout Upsells

> Use a Strategy to dynamically choose the product shown in a Shopify Plus checkout upsell widget.

## Overview

When configuring a checkout upsell widget, you can fill the product slot in a few ways: hand-pick a specific product, let AI recommend one, or attach a **Strategy**. Each is a different tool for a different job.

Strategies are for **dynamic merchandising in real time** - pairing the right accessory with a parent product, suggesting a complementary item, or surfacing a different product depending on what's already in the cart. Where checkout **triggers** decide *which* widget appears for a given shopper, a Strategy decides *what product goes inside it*. Triggers are the gateway, Strategies are the brain behind the experience.

***

## Attaching a Strategy to a Checkout Widget

Strategies are attached **per widget**, not to the checkout as a whole. You can mix Strategy-driven widgets and static-product widgets in the same checkout.

1. Open the checkout widget you want to edit.
2. In the widget's product source, choose **Strategy**.
3. In the Strategy picker, search for and select the Strategy you want to use.
4. Click **Confirm**, then save the widget.

Once attached, the widget displays the Strategy's name in place of a specific product. Each time the checkout loads, the Strategy is evaluated and the returned product is rendered in the widget.

<Tip>
  Give your Strategies clear, descriptive names. The Strategy name is what shows up in the widget editor once attached, and it's the easiest way to know at a glance which Strategy is driving which widget.
</Tip>

***

## What the Strategy Sees

Checkout has a **narrower context** than post-purchase. The Strategy is evaluated as the checkout page loads, before the order is placed - so customer history and session attribution aren't available yet. The following is what gets sent automatically:

#### Product context

The line items currently in the cart are sent as the input products. Triggers like **product tags**, **product collections**, **product type**, **vendor**, **selling plan**, and **product metafields** all evaluate against these items.

#### Cart context

* **Subtotal** - the cart subtotal.
* **Item count** - total quantity across all lines.
* **Line count** - number of distinct line items.

<Warning>
  **Customer and session triggers won't match in checkout.** Customer tags, order count, country, locale, and UTM parameters are not part of the checkout payload. If a Strategy used in a checkout widget relies on these triggers, those rules will never fire, and only product- or cart-scoped rules (or the Catch all) will be able to return a product.
</Warning>

***

## What Happens When the Strategy Returns

The product(s) returned by the Strategy **replace** the placeholder in the widget - they don't add to it. The shopper sees the widget as if you had hand-picked that product yourself.

If the Strategy is configured to return more than one product, the first product is used to populate the slot.

***

## When No Product Is Returned

If no rules match and the Strategy returns no products, the widget is **not shown** to the shopper - the slot disappears entirely from the checkout.

To keep your widget firing, configure a **Catch all** in the Strategy so there is always a fallback product to return. See the [Building Strategies](/aftersell/strategies_building_in_app) page for how to set up a Catch all.

***

## Evaluation Timing

A Strategy on a checkout widget is evaluated **once, when the checkout page loads**. It is *not* re-evaluated if the shopper adds or removes items during checkout - the product chosen at page load remains the product shown.

Plan your rules around the cart state at checkout load. If you need a widget that reacts to mid-checkout cart changes, that flow isn't supported by Strategies in checkout today.

***

## Tips for Checkout Strategies

* **Design around products and cart only.** Customer- and session-scoped triggers will never match in checkout, so build Strategies around product attributes (tags, collections, metafields) and cart shape (subtotal, item count, line count).
* **Use Catch all as a safety net.** A Strategy without a Catch all will hide the widget if nothing matches. A simple Catch all keeps the slot showing *something*.
* **Mix dynamic and static widgets.** Not every widget has to be Strategy-driven. A common pattern is a Strategy on the primary upsell widget (most personalized) and a static product on a secondary widget (proven seller).
