Before you start
WhatsApp Business connected
Approved templates
Create the agent
The form is the one described in Create an agent; these are the WhatsApp-specific choices.Creating a WhatsApp agent, picking a template it may send, setting the session timeouts and opening the test QR code
Choose the WhatsApp tab
Fill in the basics
Describe the business and goal
Select the WhatsApp number

The WhatsApp number step of the create form
Create
Attach a WhatsApp number
A WhatsApp agent answers on exactly one number, and each number serves one agent at a time. Messages to a number with no agent attached get no reply. The list offers a number only when it belongs to the connected WhatsApp Business account, shows Ready, and no other agent uses it.- In the agent editor’s left menu, expand Attach Number (in the top group, below WhatsApp Templates).
- Open WhatsApp Number and choose a number. It saves as soon as you choose. The last option, Connect WhatsApp Number, takes you to add and register one.
What’s different in the editor
When a chat opens and closes
A WhatsApp conversation is one chat. The customer’s first message opens it, and it stays open while messages keep flowing. It closes when:chat_completed, so when a customer stops replying, those results arrive after the idle timeout.
Set the session timeouts
Shorter timeouts give you post-call results and webhooks sooner; longer ones keep context for customers who take hours to reply. A chat keeps the timeouts it started with, so a change applies to chats that open afterwards. In the agent editor, open Chat → Settings. Under WhatsApp session:
The WhatsApp session settings under Chat → Settings
Set the session timeouts with the API
Edit Assistant withoperation: "edit_chat_settings". Send both fields; one you leave out resets to its default.
End the chat
End Chat closes the chat straight away, so post-call tools and analysis run without waiting for the idle timeout. Mention it in the prompt as@||end_chat|| where the conversation should end. Use it instead of @||end_call||: End Call and the other call tools don’t run during a chat.
Write a prompt for WhatsApp
- Keep replies short, one to three small paragraphs. WhatsApp folds long messages behind “Read more”.
- Use WhatsApp formatting only:
*bold*,_italic_,~strike~, and lines starting with-or1.for lists. - Skip Markdown headings, tables and
[label](url)links. Send the bare URL; WhatsApp makes it clickable. - Don’t mention calls, audio, holding or keypad input. The customer is typing.
- Mention every on-call tool and template with
@where it should be used, and@||end_chat||where the chat ends.
Send a template during a chat
A WhatsApp agent can send an approved template mid-chat: a brochure, a payment link, a quick-reply menu. Use WhatsApp Templates for this. The Send WhatsApp Template integration tool can’t send templates in a chat; it is for voice agents and post-call sends.Select the templates
Fill in the variables
- Static: fixed text, sent as written.
- Variable: a custom variable such as
{{name}}, filled when the chat starts. - Dynamic: the agent fills it from the conversation, for example the plan the customer chose.
https:// link; the same file goes out on every send.
Setting up a template with named variables
Tag the template in the prompt
@ in the prompt and pick the template under WhatsApp Templates. Its tool name is send_ plus the template name, for example @||send_renewal_reminder||; if that name is already taken, the language code is appended.Test from your phone
Select Test assistant in the editor’s top bar. A QR code for the attached number appears with “Scan to start a WhatsApp chat”. Scan it with your phone’s camera, or use Open in WhatsApp, and send a message. If the dialog says “No number attached”, attach a number and reopen Test assistant.Common questions
Can one number serve two agents?
Can one number serve two agents?
Why is my test chat still Ongoing in Logs?
Why is my test chat still Ongoing in Logs?
chat_completed wait with it. Lower End the chat after no messages for while testing.Can a WhatsApp agent be multi-prompt?
Can a WhatsApp agent be multi-prompt?