How AI Shopping Agents Handle Out-of-Stock Products and Substitutions

How AI Shopping Agents Handle Out-of-Stock Products and Substitutions
AI shopping agent suggests an available blue rug as a same-size alternative to a sold-out green rug.

AI shopping agents handle out-of-stock products by checking the requested variant, identifying which requirements a replacement must meet, and offering available alternatives with clear trade-offs. They should act within the shopper's approval and the merchant's rules. When nothing suitable is available, the next step may be waiting or getting help.

A shopper has found a green, washable rug in exactly the right dimensions for a small apartment: 5 by 8 feet. That version is sold out.

The store has the same pattern in a larger size. It also has a blue rug that is washable and measures 5 by 8 feet. Both look like reasonable recommendations in a product carousel. Only one fits the room.

This is where out-of-stock handling becomes a judgment problem. An agent has to work out what the shopper needs to preserve, explain what would change, and help them choose without restarting the whole shopping journey.

For ecommerce, merchandising, and CX teams, that means defining a substitution policy before the next stockout. This playbook focuses on agents assisting shoppers on a brand's own storefront, from product selection through the cart. For the broader role of conversational shopping, see our complete guide to virtual shopping assistants.

What makes a product substitution acceptable?

A product substitution is an alternative offered because the requested item or variant is unavailable. It qualifies only if it can meet the shopper's essential requirements, or the shopper explicitly agrees to change those requirements.

Start by separating three kinds of information:

  • Must stay the same: Requirements such as dimensions, compatibility, material exclusions, quantity, or a firm spending limit.
  • May change with permission: Preferences such as color, finish, brand, or pack size, when the shopper is open to alternatives.
  • Still unknown: Details that have not been confirmed, including care instructions, compatibility, or an arrival estimate.

These categories depend on the shopper. A color may be flexible for someone furnishing a spare room and essential for someone completing a matching set. The agent should use what the shopper has already said and ask only for information that changes the decision.

Check eligibility before ranking the alternatives. A strong match on appearance cannot compensate for failing a required dimension.

For the rug shopper, assume machine washability and 5-by-8-foot dimensions are essential:

Available optionSubstitution decisionReason
Same green pattern, 8 by 10 feetExcludeFails the required dimensions
Blue pattern, washable, 5 by 8 feetAsk about color flexibilityMeets the confirmed requirements; changes the appearance
Green pattern, 5 by 8 feet, care instructions missingVerify before recommendingWashability is unconfirmed
Rug pad, 5 by 8 feetExclude as a replacementAn accessory does not perform the rug's role

Research offers a useful clue about why this matters. In two simulated online-grocery experiments, researchers studying substitution policies found that matching the category's dominant attribute improved acceptance, and that the important attribute varied by category. Those experiments concerned grocery replacements after ordering. For storefront agents, the practical lesson is to establish what matters in the current purchase before assuming which similarity counts.

Missing information also needs a firm rule. If washability is essential and the replacement has no verified care information, the agent cannot count that requirement as satisfied. Our guide to product data contracts for AI agents explains how to give attributes a clear meaning and an authoritative source.

Check the exact variant and buying options first

Before selecting a substitute, confirm which size, color, configuration, and quantity the shopper wants, and whether that combination can be purchased through the relevant storefront and fulfillment method.

Alhena's Shopify integration supports catalog, inventory, and pricing synchronization, product comparisons, and recommendations for in-stock alternatives. Variant Stock Refresh supplies the variant-level availability foundation through supported refresh mechanisms, including Shopify stock webhooks.

Inventory quantity alone does not describe every buying option. Shopify, for example, lets merchants continue selling selected products when stock reaches zero. An approved backorder path may therefore be available. The agent should explain that path accurately and check whether waiting suits the shopper.

With the availability state established, the substitution decision can begin.

Six out-of-stock scenarios an AI shopping agent should handle

The conversations below are illustrative examples of how to apply a merchant's substitution policy.

1. The requested size, color, or configuration is sold out

When another variant of the same product is available, preserve the requirements already established. Ask about the attribute that would change.

Shopper: I need the green rug in 5 by 8. It has to fit between the sofa and the door.

Agent: The green version is sold out in 5 by 8. The blue version is available in that size and has the same washable construction. Would blue work in your room?

This response uses the space constraint and asks one relevant question. Suggesting a larger rug would send the shopper back to explaining something they have already made clear.

Apply the same care to apparel. Another color in the requested size may be worth presenting. A different size needs a separate fit assessment and the shopper's agreement; availability alone cannot justify the change.

Record the answer precisely. Permission to change color does not automatically permit a different size or a higher price.

2. The entire product is unavailable

Moving to another product requires a fresh check of the features that made the original suitable. A shared category, similar name, or matching photograph is insufficient.

Agent: This other rug is also washable and measures 5 by 8 feet. It has a flatter weave and a geometric pattern, and it costs $10 less. Would you like to compare it?

A useful explanation covers what matches, what changes, the price, and the next choice. Avoid calling products "equivalent" when the differences could matter in use.

For replacement parts and electronics, check compatibility again for the proposed SKU. A printer cartridge from the same brand still needs to be listed for the shopper's exact printer model. Our guide to product compatibility errors covers the checks that similar-looking products can fail.

Quantity also matters. If a shopper needs six matching dining chairs and only four are available, those four do not satisfy the request. Offering a mixed set or a split order requires a new decision, including any effect on price and delivery.

3. The closest suitable alternative costs more

A stockout should not quietly reset the shopper's budget. State the difference and ask before widening the search.

Agent: The closest available option meets your size and material requirements, but it costs $119, which is $20 above your $99 limit. Would you like to see it, or should I keep the limit at $99?

If the shopper keeps the limit, retain it. Repeatedly presenting the same expensive option turns an availability problem into an argument about spending.

Check the commercial details around the replacement, too. The original discount may not apply. A different pack size changes the unit price. A lower product price may move the basket below the free-shipping threshold.

Explain known changes and identify anything the checkout still needs to calculate. For a budget stated as a total delivered cost, an item price alone cannot establish that the substitute fits.

When several eligible options remain, merchandising priorities can help determine their order. Strategic product boosting belongs within that eligible set. Margin or excess inventory should never override a requirement the shopper has made essential.

4. An alternative is available, but the shopper has a deadline

For a birthday gift or an outfit needed before a trip, arrival timing can decide whether a substitute is useful.

Shopper: I need it before Friday.

Agent: This option is in stock, but I can't confirm delivery before Friday from the information available. You can check the delivery estimate for your address at checkout.

If the connected system supplies an applicable estimate, the agent can share it as an estimate. If pickup is supported, it can offer the verified pickup option. An unverified fulfillment option should not enter the recommendation.

Shopify's delivery-date documentation illustrates the distinction: manual delivery dates depend on fulfillment and transit times, while automated dates use shipping performance. A stock status alone does not supply those inputs.

Treat a confirmed deadline as part of eligibility. When timing remains unknown, say so before the shopper selects the replacement.

5. The shopper wants to wait for the original item

Some shoppers want that exact product. Once they decline alternatives, move to the available waiting options.

Agent: I don't have a confirmed restock date for the green 5-by-8 rug. The product page has a back-in-stock alert if you'd like a notification when it returns.

Use that wording only when the alert exists. If there is no supported notification path, explain what information is available without promising to send an update.

Keep the commitments distinct:

  • Back-in-stock alert: A request for a notification. Do not describe it as a reserved item or a placed order.
  • Backorder: An order for an existing product that is currently unavailable and will ship later under the merchant's terms.
  • Preorder: An order ahead of a product's release.

Google Merchant Center distinguishes preorder from backorder and requires an availability date for both in its product data specification. The agent should preserve the meaning of the merchant's status and dates, including the difference between an estimated ship date and an arrival date.

For customers with an existing Purple Dot preorder, Alhena's Purple Dot integration can retrieve preorder status and estimated ship dates. That lookup should not be presented as restock forecasting or automatic enrollment in a waitlist.

An available recommendation can become unavailable while the shopper is deciding. Build the recovery into the cart handoff.

Shopify checks inventory during checkout and holds it when the customer submits payment information. Recommending a product or adding it to the cart does not itself reserve that stock.

If the next commerce action fails, the agent should acknowledge the result and keep the shopper's requirements:

Agent: The blue 5-by-8 rug became unavailable before it could be added. I still have your requirements: washable, 5 by 8, and under $99. Would you like me to check another pattern?

Do not report that an item was added because a button was clicked. Confirm the outcome from the commerce system. Likewise, an item successfully added to the cart is not a completed purchase.

This distinction matters for measurement as much as conversation design. A recommendation, a selection, a successful cart addition, and a paid order are separate events.

How to configure substitution conversations in Alhena

An operating policy connects the merchant's product knowledge to the agent's behavior. Give each part a clear owner:

  • Merchandising defines acceptable replacement families and meaningful differences between products.
  • Ecommerce operations owns availability, market eligibility, pricing, promotions, and supported fulfillment options.
  • CX defines how to explain disappointment, handle exceptions, and pass a conversation to a person.
  • The AI configuration owner translates those decisions into instructions and tests them against representative conversations.

Alhena's agent guidelines support triggers, actions, agent assignment, and channel scope. A merchant could use the following as a starting point for its Product Expert Agent:

Trigger: The shopper's requested product or variant is confirmed unavailable for the requested purchase.

Action: Preserve the shopper's explicit requirements. Identify available alternatives using verified product information. Explain the relevant differences and price. Ask before changing a stated requirement or spending limit. Treat missing information as unconfirmed. If no option qualifies, explain the available waiting or support path. Confirm the result of any action before reporting success.

This is a suggested configuration to adapt and test against the store's catalog, policies, and integrations.

Alhena can present product recommendations as cards inside chat, with images, prices, and action buttons. Add-to-cart support is native on Shopify-hosted pages; other platforms require a configured custom handler. That makes the cart integration part of testing the experience.

Use deliberately difficult test conversations: the same product in the wrong size, a missing care attribute, a price above the agreed limit, a deadline without a delivery estimate, a declined substitute, and an item that becomes unavailable during the interaction. Check whether the agent preserves the shopper's conditions through the final action.

When should the agent stop or involve support?

Sometimes the right answer is that no current product meets the request. Explain which requirement prevents a match and give the shopper the available next step. Avoid filling the conversation with progressively less suitable products.

Involve support when required information conflicts, the shopper asks for an exception the agent cannot authorize, an existing order needs an unsupported change, or the shopper requests a person. A useful handoff carries the original item, essential requirements, alternatives discussed, and unresolved question.

An existing paid order needs its own workflow. Approval to view a different product does not authorize changing that order or charging a price difference.

Alhena's exchange management workflow uses the Return Management Agent to verify order details and eligibility, collect the replacement choice, and obtain confirmation before creating an exchange through a supported integration. Exchange creation requires the relevant capability and permissions to be enabled. A pre-fulfillment order change should follow the configured order-management process.

If the problem is that the agent cannot find suitable products that actually exist, investigate discovery separately. Our guide to fixing dead-end shopping conversations covers that diagnosis.

How to measure whether substitutions are helping

Start with a defined group of confirmed stockout conversations. Deduplicate conversations and orders, identify the original and replacement variants, and agree on the purchase-attribution window before comparing results.

Track these proposed measures:

MetricDefinition
Alternative offer rateConversations with an eligible substitute offered divided by all confirmed stockout conversations
Substitute acceptance rateConversations with an explicit substitute selection divided by conversations where an eligible substitute was offered
Substitute purchase rateConfirmed stockout conversations followed by a substitute purchase within the agreed window divided by all confirmed stockout conversations
Requirement violation rateReviewed substitution conversations with an essential requirement violated divided by all substitution conversations reviewed
Substitute return rateReturned substitute items divided by purchased substitute items, using a consistent return observation window

Keep availability failures at cart handoff separate. These are measurement definitions for the program; implementing them may require joining conversation, commerce, and returns data.

For example, if 100 confirmed stockout conversations produce 40 accepted alternatives and 18 completed substitute purchases, report those as different outcomes. The figures are illustrative; acceptance is not purchase.

Also record why a conversation ends without a replacement. The catalog may lack a suitable item, a required attribute may be missing, the shopper may prefer to wait, or the agent may have failed to retrieve a valid option. Each result calls for a different fix.

A higher acceptance rate is useful only alongside suitable purchases and subsequent return outcomes. Revenue associated with substitute orders is not automatically incremental recovered revenue; establishing that requires a controlled comparison.

Make the next choice easier

The shopper who encounters a stockout has already told you something valuable about what they want. A useful agent carries that information forward.

For the rug shopper, the conversation may end with a blue rug, a restock alert, or a clear explanation that no available option fits. The quality of the experience depends on whether the agent respected the room dimensions, explained the differences, and followed through accurately.

To explore this workflow with Alhena's AI Shopping Assistant, bring a few frequently unavailable products and difficult replacement scenarios to an Alhena demo. Test the decisions against the catalog your shoppers actually use.

Frequently asked questions

Can an AI shopping agent replace an item without asking?

It should act within the shopper's authorized substitution rules and the merchant's configured policy. If a replacement exceeds those limits or changes an essential requirement, obtain confirmation before acting. Permission to display an alternative does not authorize a purchase or a change to an existing order.

How does an AI agent choose between similar products?

First, exclude products that fail essential requirements such as size, compatibility, quantity, budget, or supported delivery timing. Then rank the eligible options using the shopper's preferences. Missing evidence for a required attribute should trigger verification before the product is described as suitable.

What happens if every suitable substitute is more expensive?

Explain the price difference and ask whether the shopper wants to raise the limit. If the budget is firm, retain it and offer a supported waiting option or explain that no current match is available. Do not assume a discount can be transferred or created.

What should the agent say when the restock date is unknown?

Say that no confirmed date is available. Offer an existing back-in-stock alert or other supported next step where appropriate. Do not invent a date from past replenishment patterns or imply that requesting a notification reserves inventory.

Does recommending a substitute reserve it?

A recommendation does not itself reserve inventory. Reservation depends on the commerce platform and the transaction stage. Shopify's standard checkout holds inventory when payment information is submitted, so a recommendation or cart addition alone is not a guarantee that the item will remain available.

Can Alhena recommend alternatives to sold-out products?

Alhena's Shopify integration supports product comparisons and recommendations for available alternatives, backed by catalog, inventory, and pricing synchronization. Merchants should configure and test the requirements, permissions, and exception handling appropriate to their store. Cart and post-purchase actions depend on the connected integration and enabled capabilities.

Power Up Your Store with Revenue-Driven AI