← Back to Agent

WhatsApp Business

Connect a dedicated business phone number for customer support via WhatsApp — separate from your personal messaging.

Table of Contents

Overview

For Everyone

The WhatsApp Business tab lets your agent handle customer support via WhatsApp. Customers message a phone number and your AI agent responds automatically. You can use a dedicated business number or share your personal WhatsApp — the agent recognizes your manager number and gives you priority. Features include customer pairing codes, prompt injection protection, rate limiting, and a full conversation viewer.

For Developers

WhatsApp Business config is stored in config.messagingChannels.whatsapp.business. The connection uses the Baileys WhatsApp Web library via /bridge/agents/:id/whatsapp/connect with mode=business. QR code scanning is polled every 3 seconds until connection succeeds. Customer pairing uses /whatsapp/pairing-requests and /whatsapp/pairing-approve endpoints. Conversations are paginated via /whatsapp/conversations.

How It Works

  1. Choose a connection mode — same number (share your personal WhatsApp) or separate number (dedicated business phone).
  2. For separate number: scan a QR code with the business phone's WhatsApp (Settings → Linked Devices).
  3. Set your manager phone number so the agent recognizes you.
  4. Enable business mode to accept customer messages.
  5. Configure customer DM policy — pairing (recommended), open, or closed.
  6. Set up security — prompt injection detection, message blocking, tool restrictions, rate limits.

Connection Modes

Two approaches to connect WhatsApp for business use:

ModeDescriptionBest For
Same NumberUses your personal WhatsApp connection from the Channels tab. Agent recognizes your manager number and treats everyone else as customers.Simplicity, solo operators, getting started quickly
Separate NumberDedicated business phone number with its own QR connection. Your personal WhatsApp stays private.Clear separation, teams, professional appearance

Same Number Mode

Toggle "Use same phone number for both" to enable. In this mode:

Required: Set your manager phone number below so the agent can identify you. Without it, the agent can't distinguish you from customers.

Separate Number Mode

Setup guide for a dedicated business number:

  1. Get a phone number — A new SIM, Google Voice, or existing WhatsApp Business number.
  2. Register on WhatsApp — Install WhatsApp on a phone with that number and set up the account.
  3. Scan the QR code — Click "Connect Business Number", then scan the QR code from WhatsApp → Settings → Linked Devices → Link a Device.

Once connected, you can send test messages and toggle business mode on/off.

Customer Access & Pairing

DM Policies

PolicyDescription
Pairing RecommendedNew customers receive a pairing code. You approve or reject from the dashboard. Most secure.
OpenAnyone can message and the agent responds. Use with strong security settings.
ClosedNo new customers. Only previously approved customers can message.

Pairing Flow

When a new customer messages (in pairing mode):

  1. Customer sends a message → receives an auto-reply with a pairing code.
  2. The request appears in Pending Customer Requests with name, phone, code, and timestamp.
  3. You click Approve or Reject.
  4. Approved customers are added to the Approved Customers list and can chat freely.

Security & Prompt Injection Protection

Customer messages are treated as untrusted external content. Security features:

SettingDefaultDescription
Prompt injection detectionOnScans messages for known injection patterns ("ignore previous instructions", etc.). Suspicious messages are flagged and logged.
Block suspicious messagesOffMessages matching multiple injection patterns are blocked with a generic reply.
Restrict customer toolsOnLimits which tools the agent can use during customer conversations. Prevents customers from tricking the agent into accessing files, running commands, or sending emails.
Max message length2000Messages longer than this are truncated.
Rate limit10 msgs/min/senderPrevents spam and brute-force attempts.

Customer Experience Settings

Conversations

When business mode is active, a full Conversations section appears with:

Client Organization Context

When an agent belongs to a client organization, an info banner appears indicating which organization the agent serves. This affects WhatsApp Business in several ways:

Tip: When writing custom instructions for customer conversations, reference the organization name and brand guidelines to maintain consistency.

Key Concepts

Best Practices

Troubleshooting

ProblemSolution
QR code won't scanEnsure WhatsApp is updated. Try refreshing the QR code. The code expires after ~60 seconds.
Connection drops frequentlyWhatsApp Web connections can be unstable. The system auto-reconnects. Check the business phone's internet connection.
Agent not responding to customersVerify business mode is enabled. Check the customer's DM policy — they may need to be approved first (pairing mode).
Same number mode: agent can't tell who's the managerEnsure the manager phone number is set and matches exactly (including country code, e.g., +1234567890).
Messages being blocked incorrectlyLower the prompt injection sensitivity or disable "Block suspicious messages." Check the agent's logs for false positives.
AgenticMail Enterprise Documentation Report an issue