Scope Wiser

Building an AI Sales Agent for eCommerce on WhatsApp

Build an AI agent that helps people buy on WhatsApp: knowledge, a short sales prompt, Shopify and WooCommerce actions, routing, and human handover.

Last updated Nov 15, 2026

What you'll do: build an AI agent that helps buyers choose and order on WhatsApp, with a support agent beside it and a person behind both.

Time: 45–60 minutes.

A sales agent is an ordinary Scope Wiser AI agent with a sales prompt, product knowledge attached, and a clear rule about where it must stop. This guide builds one on WhatsApp, the only channel with a Commerce tab.

Before you start

  • ☐ A connected WhatsApp Business Account. See How to Connect WhatsApp to Scope Wiser.

  • ☐ A product catalogue, if you want to show products in chat. Chatbot Manager β†’ Commerce has Store Automation and Product Catalog on WhatsApp bots only.

  • ☐ Product information the AI can read. A catalogue in Meta is what gets displayed; knowledge in the agent's knowledge set is what lets it answer "is this suitable for a small office".

  • ☐ Somebody watching the Shared Inbox for handovers.

1. Decide what the agent is for

Give the sales agent one job: help buyers choose and order. Put problems and returns in a separate support agent. Agent Routing (step 5) lets you run both.

2. Create the agent and its knowledge

  1. Open Chatbot Manager and select the WhatsApp bot.

  2. Click AI β†’ Agents β†’ + Create Agent.

  3. Fill in NAME, DESCRIPTION and STATUS.

  4. Under Knowledge Sources, open Knowledge Set, choose Create New and name it (for example Products).

  5. Attach your sources: Q&A pairs (Content), spec sheets (File), your pricing page (URL), product photos (Media), stock sheet (Google Sheet).

Each source type is explained in Training Your AI: Knowledge Sets, URLs, Files and Live Data.

The Create AI Agent form with a knowledge set selected and sources attached

3. Write the system prompt

In SYSTEM PROMPT, cover five things:

  1. A role.

  2. A scope.

  3. A length limit.

  4. What to do when unsure.

  5. When to hand over.

Example for a fictional business:

You are the sales assistant for Acme Trading, which sells commercial coffee equipment.

Help customers choose the right machine and place an order. Answer questions about products, pricing, delivery and returns using only the information you have been given.

Ask at most one clarifying question before giving a useful answer. Keep replies to two or three short sentences unless the customer asks for detail.

If you do not know something β€” stock levels, a discount, a delivery date for a specific address β€” say so plainly and offer to have a colleague confirm. Never estimate a price or a date.

Hand the conversation to a person if the customer is unhappy, is asking about an existing order that has gone wrong, or asks to speak to someone.

The "when unsure" line prevents most of the damage. Keep the prompt short β€” it is sent with every reply β€” and don't tell the agent to push upgrades.

Also write into the prompt where the agent stops: no payments, no promised dates, no discounts, no complaint handling β€” hand these to a person.

4. Connect the prompt to your store

  1. In SYSTEM PROMPT, type ##. A list of actions appears.

  2. Put ##shopify_store## before any Shopify action, or ##woocommerce_store## before any WooCommerce action.

  3. Pick the Shopify or WooCommerce actions you need from the ## list. The full list is in AI Intent Detection and Agent Routing.

  4. Write each action as a condition: "When the customer gives an order number and asks where it is, look it up with ##shopify_get_order_details## and tell them the status plainly."

  5. Click Save Agent.

Two more actions earn a place:

  • ##save_custom_field## stores what the customer told you (size, model, delivery address) on their record.

  • ##assign_sequence## puts someone who did not buy today into a follow-up sequence.

Cancelling is real. ##shopify_cancel_order## and ##woocommerce_cancel_order## cancel an actual order with no confirmation step. Leave them out and route cancellations to a person.

Recommendations still need knowledge. The recommend-products actions read your store; they do not know which model suits a small office. That comes from the knowledge set in step 2.

The SYSTEM PROMPT field with the ## autocomplete open at the Shopify and WooCommerce actionsThe action reference drawer listing the Shopify and WooCommerce actions, and the note that a store action must come first

5. Add a support agent and route between them

  1. Create a support agent the same way, with its own prompt and knowledge (order problems, faults, returns).

  2. Go to AI β†’ AI Configuration and switch the AI Agent toggle on.

  3. Add both agents to Active Agents.

  4. Under Agent Routing, add one rule each: product/pricing β†’ Sales, order problem β†’ Support.

Agents in Active Agents can also pass a conversation to each other with ##transfer_agent## in the prompt.

AI Configuration with two agents in Active Agents and two Agent Routing rules

6. Configure the behaviour

On the same page:

  1. Switch Enable Contextual Memory on and set Memory Window to 2.

  2. Set AI Response Mode to AI as a Fallback Only.

  3. Set Delay for AI Reply (Seconds) to 3.

  4. Set AI Reasoning Level for Responses to Medium.

  5. In Response for Restricted Keywords, replace the default with a line that says what happens next.

  6. Under Assignment, switch on Assign to Team or Department so the handover is real.

  7. Click Save Settings.

Each setting is explained in AI Intent Detection and Agent Routing. For a single conversation, a colleague can also click Pause AI in the Shared Inbox.

7. Test as a customer

Message the WhatsApp number from a phone that is not connected to the account:

  1. Ask a product question. Check the answer is right.

  2. Ask something the knowledge does not cover. Check it says so.

  3. Report a problem with an order. Check it reaches the support agent.

  4. Ask for a person. Check a person can see it.

Then watch the AI Token meter over the first week, especially with contextual memory on.

βœ… Done when…

  • ☐ Product questions get correct answers

  • ☐ Uncovered questions get an honest "I don't know" and an offer of a colleague

  • ☐ Order problems reach the support agent

  • ☐ A request for a person shows up for your team

If something doesn't work

  • Conversations cost more than expected. See AI Tokens: How Usage and Cost Actually Work.

  • You need routing with more than two agents. See AI Intent Detection and Agent Routing.

Next: AI Intent Detection and Agent Routing.

Was this helpful?
Edit this page