Auto-replies
Each company writes its own replies on the Auto-replies page of its workspace. That covers a welcome, an away message, a button menu, keyword answers, taking a name and number, and handing over to a person. There's no AI here, every answer is written in advance. Your system doesn't have to do anything, but it sees all of it.
What your system sees
- Bot replies are ordinary messages with origin = bot and arrive with social.message.sent like any reply. The buttons sent with them are in buttons.
- A customer's tap arrives as an inbound message whose text is the button's title.
- The conversation itself carries botActive (whether the bot answers there), needsHuman (the customer asked for a person or left details), and lead (name and number, if any).
{
"id": "0192...", "platform": "facebook", ...
"botActive": false, "needsHuman": true,
"lead": { "name": "Mona Ali", "phone": "01001234567" }
}
Events
social.lead.captured | The bot took a customer's name and number |
social.conversation.updated | With change = handoff when the customer asks for a person, and bot_paused or bot_resumed when someone stops or restarts the bot in a conversation. |
{
"type": "social.lead.captured",
"data": {
"lead": { "name": "Mona Ali", "phone": "01001234567" },
"conversation": { "id": "0192...", "platform": "facebook", ... },
"socialAccount": { "id": "0192...", "platform": "facebook", "name": "My Shop" }
}
}
On WhatsApp the customer isn't asked for a number, because the number is their id, so phone comes in international form (201001234567). Elsewhere the customer types it however they like, and you get digits only.
When the bot stays quiet
- As soon as a person replies in the conversation, from the inbox, the API or Meta's own apps, the bot stops there until it is closed or someone turns it back on. A reply from your system stops it too.
- It doesn't answer old messages that arrive late through a sync, and it never sends more than 10 replies an hour in one conversation. If the customer sends several messages quickly, it answers them once.
Comments
Keyword answers can work on comments too. The answer reaches the commenter as a private message (Meta's private reply, once per comment, within 7 days), optionally with a short public reply under the comment, which you receive as social.comment.replied.