WhatsApp and email
An agent can answer people where they already are. Each sender gets their own thread, kept across messages, and the reply goes back on the same channel. To message people first from a workflow, use ctx.WHATSAPP and ctx.EMAIL.
Connect your number
You need a Meta app with the WhatsApp product, and a number added to your WhatsApp Business Account.
- In Meta’s WhatsApp → API Setup, copy the Phone number ID and the WhatsApp Business Account ID.
- Create a system user in Business Settings with access to the app and the WhatsApp account, and generate a permanent token with
whatsapp_business_messagingandwhatsapp_business_management. - In the app’s Settings → Basic, copy the App secret.
- In Loops, go to Settings → Channels, fill in the four values, pick the agent that should answer, and click Connect.
- Copy the Callback URL and Verify token shown there into the app’s WhatsApp → Configuration → Webhook, click Verify and save, then subscribe to the
messagesfield.
Every webhook is checked against your app secret. Anything not signed by Meta is refused, and a message Meta sends twice is answered once.
The thread
Each phone number is one thread. The agent’s messages holds everything that number has said to it and every reply, so a person who writes again tomorrow carries on the same conversation.
Every agent loop can have its own inbound address. Customers write to it, or you forward your support inbox to it, and the agent replies by email in the same thread.
Turn it on
- Go to Settings → Channels → Agents on email, pick the agent and click Turn on.
- Copy the address shown, for example
a1b2….c3d4…@in.ollie.health, and forward your support address to it, or publish it.
Each email thread is one conversation. Replies keep In-Reply-To and References, so they thread in the customer’s mail app, and a reply from the customer continues the same conversation. Out-of-office and other automatic mail is not answered. The sender address is not proof of identity.
Send from your own domain
Until your domain is verified, replies come from noreply@ollie.health with your agent’s address as the reply-to.
- Under Email, enter a domain you control, such as
mail.yourbrand.com, and click Add domain. - Add the DNS records shown (SPF and DKIM) at your DNS host, then click Check.
- Once it shows Verified, set each agent’s sender name and address, for example
Brand Support <support@mail.yourbrand.com>.
When a reply fails
If a turn throws, the person gets no reply, and the error is logged on the loop with the channel it came from.