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.
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
Open Chatbot Manager and select the WhatsApp bot.
Click AI β Agents β + Create Agent.
Fill in NAME, DESCRIPTION and STATUS.
Under Knowledge Sources, open Knowledge Set, choose Create New and name it (for example Products).
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.

3. Write the system prompt
In SYSTEM PROMPT, cover five things:
A role.
A scope.
A length limit.
What to do when unsure.
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
In SYSTEM PROMPT, type
##. A list of actions appears.Put
##shopify_store##before any Shopify action, or##woocommerce_store##before any WooCommerce action.Pick the Shopify or WooCommerce actions you need from the
##list. The full list is in AI Intent Detection and Agent Routing.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."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.


5. Add a support agent and route between them
Create a support agent the same way, with its own prompt and knowledge (order problems, faults, returns).
Go to AI β AI Configuration and switch the AI Agent toggle on.
Add both agents to Active Agents.
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.

6. Configure the behaviour
On the same page:
Switch Enable Contextual Memory on and set Memory Window to
2.Set AI Response Mode to AI as a Fallback Only.
Set Delay for AI Reply (Seconds) to
3.Set AI Reasoning Level for Responses to
Medium.In Response for Restricted Keywords, replace the default with a line that says what happens next.
Under Assignment, switch on Assign to Team or Department so the handover is real.
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:
Ask a product question. Check the answer is right.
Ask something the knowledge does not cover. Check it says so.
Report a problem with an order. Check it reaches the support agent.
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.
