What is this?
Dexra’s AI isn’t just a chatbot; it’s a message processor. It sits between your customers and your agents, capable of answering questions, tagging conversations, and routing tickets automatically based on your rules.
Developer Documentation
How to observe, control, and integrate with the AI engine programmatically.
1. AI Overview
AI runs as a system actor inside Dexra. It interacts with conversations just like a human agent would:
- It reads incoming messages.
- It posts replies (if confidence is high).
- It triggers the same
message_outwebhooks as a human.
2. Triggers & Behavior
AI can be triggered by:
- New Message: Standard auto-response.
- Conversation Creation: Initial triage.
- Keywords: Specific rule-based overrides.
3. Observing AI via Webhooks
To distinguish between a human reply and an AI reply, check the source field in your webhook payload.
{
“event”: “message_out”,
“channel”: “whatsapp”,
“source”: “ai”,
“data”: {
“conversation_id”: “12345”,
“message”: {
“content”: “I can help with that! What is your order ID?”,
“type”: “text”
}
}
}
4. Integration Patterns
- AI + CRM Sync: When AI replies, log the interaction in Salesforce/HubSpot to keep sales reps informed.
- Escalation Logic: If the AI replies more than 3 times without resolution (detected via webhook counts), use the API to tag the conversation as “At Risk” and assign a human.
- Sentiment Routing: Use Dexra’s sentiment analysis (exposed in webhooks) to route angry customers directly to senior support, bypassing the AI.
5. Anti-Patterns (What NOT to do)
❌ Do not try to control the AI via frontend JavaScript. The AI runs server-side.
❌ Do not pass raw prompts via the API. Use the Knowledge Base training UI instead.
❌ Do not assume AI replies are instantaneous. Network latency applies.