Live Chat webhook

The Webhook integration, in the Live Chat Support category, lets you handle conversations in your own platform instead of the GoChat Live Chat: “This integration allows you to handle the live chat through webhook when the bot automation is paused.”

It is meant for developers who have their own chat platform and some experience with APIs.

Set it up

  1. Set the webhook URL. In the dashboard, go to Integrations → Webhook and enter the Webhook URL where you want to receive the messages. Incoming messages are sent to it by POST while the bot is paused. You can add a Custom Header for extra security, for example X-Custom-Header: XXX.
  2. Turn it on in the channel. In the settings of the channel you want to connect (for example WhatsApp or SMS), go to the Live Chat settings and select Webhook.
  3. Pause the bot in the flow. Add the action that pauses the bot where the conversation should move to your platform. From then on, each message from the user is sent to your webhook URL.

What GoChat sends

Each message arrives as a JSON payload with two parts:

  • meta: user_ns (the user), agent_id (the assigned agent, 0 if there is none), flow_ns (the bot) and team_id (the workspace).
  • message: the IDs of the message, type (for example in for incoming), msg_type (for example text), the sender, the assigned agent, the content in payload.text and content, the username and the date and timestamps.

The content changes with the type of message (text, image and so on).

Reply to the user

To answer from your platform, use the GoChat API with the user_ns and flow_ns of the payload to send the message to the right conversation. See API docs.

×
Hi! 👋

How can we help you today?

Please write a message first.