For Web Chat, you can implement custom push notifications by using Webhooks within the Conversation API. This functionality enables you to notify end users when a live agent joins their conversation and begins responding.
When Ada emits conversation events (e.g., v1.conversation.message), your webhook receives them. Your backend looks up the recipient device tokens for the event’s end_user_id, then calls your push provider (APNs, FCM) to deliver a notification.
High-level flow:
conversation_id → device token in your system.conversation_id.Push notifications have the following limitations:
Push notifications help you keep end users informed about their conversations.
Push notifications require Webhooks integration and device token management.
v1.conversation.message) to receive real-time updates.conversation_id and end user device tokens.Set up push notifications for your Chat integration.
Set up Webhooks to receive conversation events from Ada.
To configure webhooks:
https://your-api.example.com/ada/webhooks.v1.conversation.message.From the end user device, you need to obtain the conversation_id and the device token.
To obtain the conversation_id, subscribe to one of the events offered in the SDK API Reference that return the conversation_id. The following events are recommended:
ada:agent:joinedada:minimize_chatMaintain a persistent mapping so you can reach the end user’s devices when you have Ada’s conversation_id.
Keys: conversation_id (Ada’s Conversation Identifier) and device_token
Recommended table (example):
Collecting device tokens:
Process Webhook events from the Conversation API.
Event of interest: v1.conversation.message
Example payload (illustrative):
Processing steps:
conversation_id, message.text, and any metadata you want in the push. For messages sent by an agent, clients can filter by the role: "human_agent".conversation_id.The following Python (FastAPI) example demonstrates APNs integration: