CHATBOTS

Reorder Assistant: Out-of-Stock Substitute Finder

When a reorder request hits an out-of-stock SKU, the assistant searches the catalog for the closest in-stock alternative and proposes the swap in the Intercom chat before…

CategoryChatbots
Enginepaperclip
Difficultyintermediate
Triggerchat
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerReorder message received in IntercomIntercomIntercom
  • ActionResolve requested item against Postgres inventoryPostgreSQLPostgres
  • LogicBranch on in-stock vs. out-of-stock
  • ActionQuery Postgres for attribute-matched substitute SKUsPostgreSQLPostgres
  • ActionDraft substitute explanation with the modelOpenAI
  • OutputPropose in-stock alternative in IntercomIntercomIntercom

What it does

Handles the awkward case where a customer's usual item is sold out. Instead of dead-ending the conversation, the assistant finds the nearest equivalent SKU by attributes (size, flavor, formula), explains the difference, and offers the substitute for one-tap acceptance.

When to use it

For catalogs with frequent stockouts or seasonal rotation, where keeping the reorder moving with a smart substitute protects revenue and customer goodwill.

How it works

  1. 1A reorder message in Intercom triggers the flow.
  2. 2The flow resolves the requested item against inventory in Postgres.
  3. 3Logic checks stock; in-stock items pass straight through to a normal reorder summary.
  4. 4For out-of-stock items, the assistant queries Postgres for candidate SKUs sharing key attributes and ranks them by closeness.
  5. 5It uses the model to draft a clear explanation of why the substitute fits and how it differs.
  6. 6The bot replies in Intercom proposing the in-stock alternative with price and a confirm prompt.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect IntercomConversations, contacts, articles.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect OpenAIModels, embeddings, files.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.