Webhooks

Omnichannel webhooks allow you to integrate the Rocket.Chat Omnichannel to any third-party system, e.g., CRM, Zoho, etc.

To access Webhooks settings,

  • Navigate to Administration > Workspace > Omnichannel > CRM Integration.

Create Omnichannel Webhook

To create a new Omnichannel webhook, you need to update the following details:

  • Webhook URL: The Webhook URL from the system you want to connect(destination).

  • Secret Token: Enter the secret token that can be used to verify the webhook.

The field Secret Token is sent to a header X-RocketChat-Livechat-Token so you can validate if the request became from Livechat.

If your endpoint returns a response status other than 200, Rocket.Chat will retry ten times, waiting ten seconds between retries.

  • Send Request on: Select the action(s) you want this integration to have.

  • Send Request on Chat Start: Sends a post request to the webhook endpoint when an Omnichannel chat starts.

  • Send Request on Chat Close: Sends a request when a chat gets closed.

  • Send Request on Chat Taken: Sends a request when an Omnichannel agent Takes a chat.

  • Send request on Chat Queued: A request gets sent when a chat gets queued.

  • Send Request on Forwarding: Triggers request to be sent when a chat gets forwarded to another Omnichannel department or Agent.

  • Send Request on Offline Messages: Sends a request when a visitor leaves an offline message.

  • Send Request on Visitor Messages: A request is sent when an Omnichannel visitor sends a message.

  • Send Request on Agent Messages: Sends a request when an Omnichannel Agent sends a message or reply.

  • Send Visitor Navigation History on Request: Sends a request about visitor's navigation history. This feature depends on "Send Visitor Navigation History as a Message" to be enabled.

  • Send request on lead capture: Sends a request when a lead is captured.

  • Lead capture email regex: Specify the regex for lead captured email.

  • Lead capture phone regex: Set the regex for lead-captured phone numbers.

If you enable Send Request on Chat Start, Rocket.Chat sends a webhook to the external system telling it that a new conversation has started.

Sample JSON Data

Here is an example of JSON data sent in the request.