Webhooks are automated HTTP POST requests that send real-time data to a designated URL when specific events occur. They enable seamless communication between applications without the need for manual intervention.
In the Click to Chat plugin, webhooks are triggered when a user interacts with the WhatsApp icon/image.
Navigate to “Click to Chat” -> ”Other Settings” -> And scroll to “Webhooks.“
Integrating Automation Tools
To integrate the URL, these platforms can be utilized.
- Zapier and Make.com integrate with the Facebook Conversation API (server-side event), facilitating seamless automation and connectivity between Facebook Messenger and external applications
PRO
Variables for Webhook Customization
In the premium version of the Click to Chat plugin, you can leverage variables to enhance the customization of the webhook URL triggered when a user clicks the WhatsApp icon or button.
Variables Options
The variables below can be embedded directly into the webhook:
- {url}: The URL of the page where the user clicks the WhatsApp icon or button.
- {time}: The exact timestamp of when the user clicks the WhatsApp icon/button.
- {number}: The WhatsApp number associated with the button (as configured in the plugin settings). This is especially useful for features like Random Number or Multi-Agent.
- {title}: The title of the page where the user clicks the WhatsApp icon.
Advanced Variable Options
- Get Values from URL Parameters: Text within single square brackets (e.g.,
[gclid]
,[utm_source]
) will retrieve values from the URL parameters. If the parameter is not present, it will return a blank value. - Get Values from Cookies: Text within double square brackets (e.g.,
[[_ga]]
) will fetch values from browser cookies. If the specified cookie is absent, it will return a blank value.
Webhooks in Greetings Form
If we want to store or track the data submitted through your greetings form, we strongly recommend using Webhooks.
Webhooks instantly send the data to your system, making it easy to track user interactions, automate workflows, and ensure data is stored accurately in real time. Additionally, we will receive a notification every time a user submits the form, keeping you updated on new entries.
Navigate to “Click to Chat” -> “Greetings” -> Select Greetings Form -> Scroll down and we got to see “Webhook address” there Paste the URL there.
- To get the form data, add a webhook url in the greetings form to get the events from the users.
Greetings- Form – Click to Chat
Webhook Data Format
By default, the plugin sends webhook data in a string format (stringified JSON object).
If the integration application requires data in JSON format, select the webhook data format as “JSON” to enable seamless data exchange.
Navigate to “Click to Chat” -> “Other Settings” -> and scroll then “Advanced Settings.”