Empfio Docs

WhatsApp

Receive and reply to customer messages on WhatsApp automatically.

Overview

Empfio supports two WhatsApp providers: Twilio (easiest to set up) and Meta Business API (direct Meta API, lower cost at scale). Both receive inbound messages via webhook and send replies through the same AI agent pipeline.

For initial setup steps, see Connect WhatsApp.

Provider comparison

FeatureTwilioMeta Business API
Best forTesting, small-medium volumeProduction at scale
Setup time~15 minutes~1-2 hours
Business verificationNot requiredRequired by Meta
Interactive messagesSupported (buttons, lists)Supported (buttons, lists)
Message templatesNot required for sandboxRequired for outbound after 24h

How inbound messages flow

When a customer sends a WhatsApp message, the flow is:

  1. Provider webhook — Twilio or Meta forwards the message to Empfio's webhook endpoint
  2. Signature verification — the provider's signature is validated to prevent spoofing
  3. Message extraction — sender phone number and message text are extracted from the payload
  4. Lead lookup — the backend finds or creates a lead record based on the phone number
  5. Conversation routing — the message is added to the lead's active conversation
  6. Agent processing — the message is sent to the LangGraph AI agent
  7. Reply delivery — the agent's response is sent back to the customer via the same provider

Webhook endpoints

POST /api/v1/channels/twilio/webhook   (Twilio provider)
POST /api/v1/channels/meta/webhook     (Meta provider)

Both endpoints:

  • Verify the provider's request signature
  • Extract sender phone number and message text
  • Route through the shared inbound pipeline (lead → conversation → agent → reply)

Interactive messages

The AI agent can present interactive elements to customers on WhatsApp:

  • Quick reply buttons (up to 3) — for confirmations like "Yes, book it!" / "No, show more times"
  • List messages (up to 10 rows, grouped in sections) — for service menus and time slot pickers

These are rendered as native WhatsApp interactive messages — customers tap to select instead of typing.

WhatsApp message templates

When using the Meta Business API in production, outbound messages to customers who haven't messaged in the last 24 hours require pre-approved message templates. This is a Meta policy, not an Empfio limitation.

For most use cases (customer initiates the conversation), templates are not needed since the agent replies within the 24-hour customer service window.

Limitations

  • WhatsApp message templates required for outbound messages after 24 hours of inactivity (Meta provider only)
  • Twilio sandbox has a limited number of test recipients
  • Rich media messages (images, documents, audio) from customers are acknowledged but not processed by the AI
  • Button titles are limited to 20 characters (WhatsApp platform limit)
  • List rows are limited to 24-character titles and 72-character descriptions

Troubleshooting

ProblemFix
No reply from the agentCheck that the webhook URL is correct and accessible from the internet
"Media message not supported"The agent currently handles text messages only
Messages arrive but no agent replyVerify the agent service is running and Cal.com is connected
Twilio sandbox expiredRejoin the sandbox by sending the join code to the sandbox number
Buttons not appearingEnsure the message includes 3 or fewer options (WhatsApp limit)

On this page