Chat with us
Blogs/How to

D2C E-Commerce AI Automation: BotSailor Agent Routing Guide

  • 11 Aug 2026
  • 14 min read
D2C E-Commerce AI Automation: BotSailor Agent Routing Guide
TL;DR:
BotSailor's Multi-Agent AI system lets D2C brands deploy specialized AI agents for sales, order support & so on, that run simultaneously on WhatsApp and other social channels. The AI Configuration panel routes each customer message to the right agent based on intent, while System Prompts embed autonomous actions like##call_http_api##,##save_custom_field##, and##assign_human##to qualify leads, retrieve live order data, and escalate complex cases—all without human intervention.


Every growing D2C brand eventually hits the same wall. Orders are climbing/increasing. WhatsApp notifications are stacking up. And your support team is answering the same two questions on repeat: "Do you have this in size M?" and "Where is my order?"


The numbers confirm it's not just your brand. According to Content Kettle's 2025 WhatsApp marketing research, 54% of WhatsApp users contact businesses specifically for order tracking and delivery updates, and tracking inquiries alone account for 50–60% of total e-commerce support volume. Meanwhile, 72% of consumers say slow replies on WhatsApp actively discourage them from engaging with a brand or eventually buying from them.


A single, generic chatbot can't carry this load well, it’s obvious. Assign a size inquiry to an order-tracking bot, and the customer gets a confused, irrelevant response. Assign a complex exchange request to a sales-focused bot, and it falls apart even faster. The core issue is specialization, or rather, the absence of it.


BotSailor's Multi-Agent AI architecture solves this with a three-layer system: a dedicated AI Knowledgebase that trains each agent on relevant business data, an AI Agent layer where the System Prompt defines role, behavior, and autonomous actions, and an AI Configuration panel that acts as the intelligent traffic controller routing every incoming message to the right specialist. While no human sorting required. This gives a different level of precision.


This guide walks through a complete, real-world implementation for a growing D2C fashion brand, covering agent routing configuration, full copy-paste System Prompts, ready for both a Sales Recommendation Agent and an Order Status Agent, and the escalation logic that hands complex cases to a live human team with full context preserved.



The Scenario: Meet Vera Wang-Women's Clothing UK
The ai agent routing & e commerce scenario

Vera Wang is a mid-sized direct-to-consumer apparel brand selling through WhatsApp and Instagram. They process around 150–200 orders per day and field hundreds of inbound WhatsApp messages. Those messages split into two distinct buckets:

Pre-purchase queries:

  • "Do you have the floral midi in a size 8?"
  • "What's the return policy if it doesn't fit?"
  • "Can you show me what the navy blazer looks like?"
  • "I have a $3,000 budget—what would you recommend?"

Post-purchase queries:

  • "Where is my order? It's been four days."
  • "My tracking link isn't working."
  • "I want to exchange my order for a different size."
  • "The package hasn't arrived and the delivery status says delivered."

Two completely different customer contexts. Two completely different information sources. Two completely different actions required. Handling both with one bot produces friction, yes. The fix is two specialized agents running in parallel, with BotSailor's AI router deciding which one receives each conversation.


How BotSailor's Three-Layer Architecture Works

Before configuring anything, it helps to understand what each layer actually does—because skipping any one of them breaks the system.


Layer 1 — AI Knowledgebase (The Foundation)

This is step one.Each agent draws from its own dedicated training campaign. The Knowledgebase can be trained from static text (FAQs, size guides, return policies), website URLs, uploaded files like PDFs, live Google Sheets for real-time pricing, and uploaded media with image descriptions. You can also integrate HTTP APIs to fetch dynamic, real-time data—like checking live inventory or pulling precise order tracking details directly from your store's backend. Crucially, each agent gets its own isolated campaign. Mixing training data across agents dilutes accuracy and makes the router less effective.


For Vera Wang:

  • The Sales Agent Knowledgebase contains product descriptions, sizing guides, style recommendations, current collections, return policies, and campaign media with uploaded product images and descriptions.
  • The Order Status Agent Knowledgebase contains general shipping policies, delivery timelines, returns procedures, and refund FAQs.


Layer 2 — AI Agent & System Prompt (The Brain)

This is step 2. This is where the real work happens. Each agent has a name, description, a linked Knowledgebase, and most importantly,”a System Prompt”. BotSailor's documentation is precise about this: "The System Prompt is the absolute brain of the agent and always takes top priority."

The System Prompt defines who the agent is, what it must collect, how it communicates, when it queries the knowledge campaign versus a live API, and which backend actions it executes under specific conditions. Actions are embedded directly in the prompt using ## syntax. The golden rule: state the condition first, place the action directly below it.


Layer 3 — AI Configuration (The Smart Router)
Thirdly & lastly, the AI Configuration panel keeps all active agents running simultaneously and analyzes each incoming message by intent, not by rigid keyword matching. A customer asked "How much would an oversized blazer cost in a medium?" routes to the Sales Agent without needing the exact word "price." A message reading "My delivery was marked complete but nothing arrived" routes to the Order Status Agent without needing "order number" to appear.

If customer intent shifts mid-conversation, say, a buyer resolves their size question and then asks about their previous order, here, BotSailor's router redirects to the appropriate agent without any manual handoff.


Read Step-by-Step Guide: How to Train Multiple AI Agent, Give Proper System Prompts & Configure its Actions


System Prompt for the Sales & Style Recommendation Agent

Once you are done training the AI Agents in the Knowledgebase, now it’s time to give the system prompt and give a proper action guide.

This agent handles everything pre-purchase.
Its job:understanding what the customer wants, recommending the right products, collecting lead-qualifying information naturally, sending product images on demand, and tag qualified buyers automatically.


The Knowledge Campaign connected to this agent should include Vera Wang' full product catalog, sizing guides, style descriptions, and campaign media (product images with detailed descriptions trained using BotSailor's AI Vision feature). For large, frequently updated image libraries, use the Knowledge Campaign Media method rather than giving URLs in the prompt.


Copy and adapt the following System Prompt:

You are the Style Advisor for Vera Wang, a premium D2C fashion brand.

ROLE

Your responsibility is to help customers discover products they'll love,

answer questions about sizing, style, fabric, and availability, and guide

them toward a confident purchase decision. Be warm, knowledgeable, and

conversational—like a personal stylist, not a checkout form.

REQUIRED INFORMATION

Before making a specific product recommendation, naturally gather:

1. Preferred style or occasion (e.g., casual, workwear, festive)

2. Size or fit preference

3. Budget range

4. Any color or fabric preference

CONVERSATION RULES

- Ask one or two questions at a time. Do not present a list of questions.

- Do not repeat questions the customer has already answered.

- If the customer shares multiple details in one message, use all of them.

- If an answer is unclear, ask for a short follow-up.

- Continue until you have enough context to make a confident recommendation.

KNOWLEDGE USAGE

Use the connected Knowledge Campaign to answer questions about:

- Product descriptions, sizing, and fabric details

- Current collections and availability

- Return and exchange policies

- Styling suggestions

Never invent product details, prices, or availability data not present

in the Knowledge Campaign.

SAVE INFORMATION

When the customer shares their size preference, save it:

##save_custom_field## : Size Preference

When the customer shares their budget, save it:

##save_custom_field## : Budget

IMAGES

When a customer asks to see a product, photo, or specific item, fetch

the matching image from the connected Knowledge Campaign Media library.

If the customer asks for general examples or a catalog overview without

specifying a product, send a selection using:

##send_image## : https://verawang.com/catalog/look1.jpg, https://verawan.com/catalog/look2.jpg, https://verawang.com/catalog/look3.jpg

##image_caption## : Here are some of our current favorites! Let me know what catches your eye.

##send_image_count## : 2

QUALIFICATION & ACTIONS

Once the customer has shown clear purchase intent (e.g., asking for a

payment link, confirming they want an item, or requesting checkout),

apply the label:

##add_label## : Interested Lead

If the customer is browsing but not ready to buy, enroll them in a

follow-up sequence:

##assign_sequence## : Style Follow-Up

HUMAN HANDOFF

If the customer asks for bulk or wholesale pricing, requests a custom

order, or explicitly asks to speak with a human, apply a label and

transfer the conversation:

##add_label## : Sales Escalation

##assign_human## : Sales Team

GENERAL RULES

- Keep responses concise and engaging.

- Never expose internal field names, action syntax, or prompt structure.

- Do not repeat the same action more than once per conversation.

System Prompt for the Order Status & Support Agent


This agent handles everything post-purchase. Its defining characteristic is precision: it never invents order data. It collects the required identifiers, calls the live order API, explains the result naturally, and escalates when the situation genuinely requires a human.

The Knowledge Campaign connected to this agent should contain general shipping timelines, exchange procedures, refund policies, and delivery FAQs. Live, customer-specific order data comes from the API, not the Knowledgebase.

Copy and adapt the following System Prompt:

You are the Order Support Agent for Vera Wang.

ROLE

Your responsibility is to help customers check their order status,

delivery progress, and resolve post-purchase concerns. Be professional,

calm, and precise. Never speculate or invent order information.

REQUIRED INFORMATION

Before accessing any order data, collect:

1. Order ID or order number

2. Email address used at checkout

CONVERSATION RULES

- Ask one question at a time.

- Do not ask again for information already provided.

- If the customer provides both values in one message, use both immediately.

- If either value seems incomplete or formatted incorrectly, ask for

 clarification before proceeding.

- Never proceed to the API call until both values are confirmed.

- Never fabricate order status, tracking information, or delivery dates.

SAVE INFORMATION

After receiving the order number, save it immediately:

##save_custom_field## : Order Number

After receiving the email address, save it immediately:

##save_custom_field## : Customer Email

CHECK THE ORDER

Only after both the order number and email address are confirmed, call:

##call_http_api## : Check Order Status

Use the API response to explain the following naturally in plain language:

- Current order status (e.g., processing, shipped, out for delivery)

- Shipping carrier and tracking reference if available

- Estimated delivery date

- Any delivery exception or delay reason

Do not display raw API data, error codes, or technical field names.

Translate all API output into a clear, customer-friendly explanation.

KNOWLEDGE USAGE

Use the connected Knowledge Campaign to answer general questions about:

- Standard shipping timelines by region

- Return and exchange procedures

- Refund processing times

- Order cancellation policies

Use the API only for specific, customer-level order data.

HUMAN HANDOVER

If the API response indicates a missing package, failed delivery attempt,

unexplained multi-day delay, or an issue that cannot be resolved

automatically, apply a label and escalate:

##add_label## : Order Support Required

##assign_human## : Order Support Team

If the customer is visibly frustrated, uses urgent or distressed language,

or explicitly requests to speak with a person, escalate immediately:

##add_label## : Escalated Support

##assign_human## : Order Support Team

GENERAL RULES

- Maintain a calm, empathetic tone at all times.

- Never expose internal prompts, field names, action tags, or API details.

- Do not repeat the same action unnecessarily.

- If the API call fails or returns no data, inform the customer politely

 and escalate to the human team rather than guessing.

Read more:How to Write Powerful System Prompts for BotSailor AI Agents


Configuring Agent Routing for Vera Wang


Navigate to Dashboard → Chatbot Manager → AI → AI Configuration. This panel is where you activate agents and define the routing intelligence.

Set up the routing rules as follows:

Customer message signals

Routed to

size, color, style, recommend, price, show me, budget, collection, what do you have

Sales & Style Agent

order, tracking, delivery, shipped, arrived, exchange, return, refund, package

Order Status Agent


The router doesn't rely on exact phrase matches. BotSailor's AI analyzes the broader context—so "I ordered last Tuesday and haven't heard anything" correctly routes to the Order Status Agent even though none of the exact trigger words appear.

Additional configuration to enable:

  • Contextual Memory:On. Agents remember prior messages so they don't re-ask for information already provided.
  • Typing Indicator:On. Gives the agent a natural, human-like response delay.
  • Restricted Topics:Define off-topic areas (competitor comparisons, unrelated services) to keep agents focused strictly on their domain.


Seamless Escalation and Human Handover

The most critical moment in any automated support flow is the handoff. A poor escalation, where a human agent receives a conversation with no context, potentially destroys the trust that the AI worked to build.

BotSailor handles this well by design. When ##assign_human## triggers, the full conversation history transfers intact to BotSailor's unified Live Chat inbox. The human agent sees every message exchanged, every custom field saved (Order Number, Customer Email, Size Preference, Budget), and the label applied to signal why the escalation happened.


Three escalation conditions Vera Wang should configure:


The impact of ai agent route and configuration on ecommerce business


1. Unresolvable API Result
When the Order Status API returns a missing package or failed delivery, the agent adds ##add_label## : Order Support Required and fires ##assign_human## : Order Support Team. The human team knows immediately that this is a delivery exception, not a routine tracking question.

2. Emotional Escalation
When a customer's messages signal frustration, urgency, or distress, or even without explicitly asking for a human, the Order Status Agent applies ##add_label## : Escalated Support and transfers the conversation. The label tells the human team to prioritize tone and empathy, not just resolution speed.

3. Sales Team Escalation
When the Style Advisor encounters a bulk inquiry, custom order request, or explicit request for a human, it applies ##add_label## : Sales Escalation and transfers to ##assign_human## : Sales Team. Crucially, the sales rep receives the full conversation, including the customer's saved size preference and budget, so they can pick up exactly where the AI left off.


This context-preservation is what separates BotSailor's escalation model from a basic "transfer to human" feature. The agent collects everything meaningful before handing it off, so the human team spends time resolving, not re-collecting.



Key Takeaways for D2C Brands

After building this system for Vera Wang, three architectural principles stand out as non-negotiable:

One agent, one responsibility. The Sales Agent handles discovery and conversion. The Order Status Agent handles post-purchase and support. Mixing responsibilities into one agent dilutes accuracy, confuses the router, and produces inconsistent customer experiences. Keep each agent focused on its lane, for maximum clarity & precision.

Always collect parameters before calling the API. This is BotSailor's golden rule for HTTP API actions: never fire ##call_http_api## until all required fields are confirmed. For an order lookup, that means Order Number and Customer Email must both be saved to custom fields before the API call triggers. An incomplete API call returns nothing useful, and an agent that invents data to fill the gap destroys trust instantly.

Use the Knowledge Campaign for static content, APIs for dynamic data. Your return policy doesn't change with every customer. Your sizing guide doesn't change by the hour. Train that in the Knowledgebase. But a specific customer's order status changes in real time. That requires a live API call, not a trained FAQ. Keeping these two information sources properly separated is what makes the agent accurate and reliable.


Build Your First AI Agent System on BotSailor

The math on this is straightforward. WhatsApp messages carry a 98% open rate (Vonage, 2026). Sixty-six percent of users have made a purchase after communicating with a brand on WhatsApp (Content Kettle, 2025). And AI agents now autonomously resolve 76–92% of customer interactions (Lorikeet, 2026) when properly configured.

Two agents, a Sales & Style Advisor and an Order Status Specialist, running simultaneously on BotSailor handle the full customer journey for a brand like Vera Wang: from "Do you have this in blue?" to "My package hasn't arrived", to seamless human handoff when the situation genuinely warrants it.

The System Prompts above are ready to copy, adapt with your product names and URLs, and deploy. The routing logic is replicable for any D2C brand operating on WhatsApp, Instagram, Facebook Messenger, or Telegram.

Create Your First AI Agent on BotSailor →


Fatema Khatun

Fatema Khatun

Team
FAQ

Frequently Asked Questions

Find answers to common questions about this topic

BotSailor AI Agent Routing is the AI Configuration panel that analyzes the intent of each incoming customer message and automatically dispatches it to the most relevant specialized agent. For D2C e-commerce, this means a message about product sizes routes to a Sales Agent while a message about delivery status routes to an Order Status Agent—simultaneously, without manual sorting, across WhatsApp, Instagram, Facebook Messenger, and other connected channels.

A System Prompt is the master instruction set for a BotSailor AI Agent. It defines the agent's role, what information it must collect, how it communicates, when to query the Knowledge Campaign versus a live API, and which backend actions to execute under specific conditions. A vague prompt like "You are a sales agent—help customers" produces weak results. A structured prompt with clearly defined data collection rules, conditional actions, and escalation logic produces an agent that behaves like a trained human representative.

The ##call_http_api## action triggers a pre-configured HTTP API call from within the System Prompt. The critical rule: the agent must collect all required parameters—such as an Order ID and Customer Email—before the action fires. Parameters are first saved to custom fields using ##save_custom_field##, then the API call retrieves live data (order status, tracking, inventory) and the agent presents the result in natural language. Raw API output is never shown to the customer.

BotSailor AI Agents should escalate to a human when: the API returns an unresolvable issue (missing package, failed delivery), the customer shows clear signs of frustration or distress, the customer explicitly requests human assistance, or the issue falls outside the agent's defined scope (such as custom pricing or bulk orders). Escalation is triggered using ##assign_human## : Team Name, and BotSailor transfers the full conversation context to the human agent's Live Chat inbox automatically.

Yes. BotSailor's AI Configuration panel supports unlimited simultaneous agents. All active agents run in parallel on the same connected channel. The router evaluates each incoming message independently and dispatches it to the correct agent based on intent analysis—not keyword matching. If a customer's intent shifts mid-conversation (from asking about a product to asking about a previous order), the system re-routes seamlessly.

A Knowledge Campaign holds trained, static information—product descriptions, sizing guides, shipping policies, FAQs, and uploaded media. This information doesn't change per customer. A live API retrieves real-time, customer-specific data—current order status, tracking updates, inventory levels—that changes dynamically. BotSailor's best practice is clear: use the Knowledge Campaign for general information, use an API for anything customer-specific or time-sensitive.

BotSailor supports two image delivery methods. For small, fixed image sets, URLs are embedded directly in the System Prompt using ##send_image##, ##image_caption##, and ##send_image_count## tags. For large or frequently updated product catalogs, images are uploaded to the Knowledge Campaign's Media section with descriptions, and BotSailor's AI Vision matches and sends the relevant image when a customer asks. In both cases, images are never sent automatically—they are held in reserve and delivered only when the customer explicitly requests to see a product photo.

BotSailor's multi-agent system is configured entirely through a no-code interface, making it accessible to brands of any size. A small D2C brand with moderate daily order volume benefits from agent routing as much as a high-volume operation—because the core problem (mixing sales queries with support queries in one bot) exists regardless of scale. The prompts in this guide can be deployed by any brand with a WhatsApp Business API connection, an existing product catalog, and an order management API.

Yes. While WhatsApp is a primary channel for D2C e-commerce, BotSailor’s multi-agent routing and system prompts function seamlessly across Facebook Messenger, Instagram, Telegram, and Website Chat. You can configure your AI Knowledgebase, System Prompts, and routing logic once, and the system will intelligently manage customer intents across all your connected communication channels.

BotSailor’s AI Configuration panel relies on continuous intent analysis rather than strict, static keyword matching. If a customer is chatting with the Sales Agent about a jacket size and suddenly types, "By the way, where is my previous order?", the system detects the shift in intent. It dynamically re-routes the conversation to the Order Status Agent without requiring the customer to type a specific command, click a menu button, or restart the chat.