Integration architecture
Use AyuChat as the WhatsApp engagement layer and your CRM or ERP as the operational system of record. Keep the systems connected through server-side API calls and signed outbound webhooks.
Recommended flow
CRM lead event
-> your integration server
-> AyuChat /api/public/contacts
-> optional approved template send
-> AyuChat delivery/inbox events
-> outbound webhook
-> CRM activity timeline
What to sync into AyuChat
- Customer name and phone number.
- Email when available and valid.
- Lead source, product interest, city, or lifecycle tags.
- Only data required for messaging workflows.
What to sync back to your CRM
- Message delivery outcomes.
- Campaign lifecycle events.
- Conversation or form submission events when your workspace uses those flows.
- Automation completion or failure signals.
Security and tenancy
Use a separate API key per customer workspace. Do not share one integration key across unrelated clients, and do not place workspace ids in requests as an access-control shortcut.
Failure handling
| Failure | Response |
|---|---|
| 401/403 API error | Stop retries and repair key/scope configuration. |
| 422 contact error | Fix source data before retrying. |
| Template message queued but not delivered | Track message id and read AyuChat delivery status or webhook events. |
| Webhook delivery duplicate | Use idempotency in your CRM activity writer. |
