Omnichannel webhooks allow you to integrate the Rocket.Chat Omnichannel to any third-party system, e.g., CRM, Zoho, etc.
To refer to official documentation, please check the following link: https://docs.rocket.chat/use-rocket.chat/omnichannel/webhooks
Adding a webhook to your Omnichannel
To start setting up a webhook for you Omnichannel, log in into Rocket Chat as an Administrator User and on the Rocket Chat main screen, click on the three dot button on the left panel. Some options will be shown, click on Omnichannel:
Here, you can see all the settings that can be configured for Omnichannel. Look for the Webhooks setting on the left menu and click on it:
Once you click on Webhooks button, three options will be displayed on the right window:
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.
Send request on: Predefined actions to trigger the webhook
In this window, type your webhook on the Webhook URL input:
If you have any secret token for your webhook, use the Secret Token input to write it down
Also, Send request on input field is used for Rocket Chat to trigger the webhook on some actions:
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.
Select the ones that you want, so the webhook can work on this specific actions:
Once you finish the setup, click on Save button on the top right corner to save the current settings for Omnichannel Webhooks: