Developer docsCRM Gateway API reference Postman العربية

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

{
  "id": "0192...", "platform": "facebook", ...
  "botActive": false, "needsHuman": true,
  "lead": { "name": "Mona Ali", "phone": "01001234567" }
}

Events

social.lead.capturedThe bot took a customer's name and number
social.conversation.updatedWith 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

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.