Webhooks: Seamless Communication Between Applications
Webhooks serve as automated messengers that enable instant communication between different web applications when specific events occur. Flowforge supports webhooks seamlessly, allowing you to integrate your applications and automate workflows.
How Webhooks Work with Flowforge
Imagine a user interacts with a Flowforge chatbot and fills out a form. Here's what happens next:
- When the user submits the form on the Flowforge chatbot, it triggers the captured_form.created webhook, alerting your website about the submission.
- Your website receives crucial data about the submission through a notification sent by Flowforge.
- Upon receiving this notification, your website seamlessly integrates the received data from Flowforge into its database or application.
- Subsequently, your website processes the integrated data according to your preset business logic and workflows.
Flowforge triggers webhooks for three key events:
- captured_form.created: Triggered when a user submits a form through the Flowforge chatbot, notifying your system.
- captured_intent.created: Indicates when Flowforge successfully captures a user's intent during an interaction.
- conversation.closed: Occurs at the end of each conversation, whether through a chatbot or phone agent, signaling closure.
Integrating Webhooks
To integrate webhooks on your Flowforge profile:
- Navigate to your Flowforge profile and click on “Add a Webhook” under the Webhooks tab.
- Enter the name and endpoint where the webhook data will be sent. Click on “Submit.”
- Now, to link your webhook to your assistant, click on “AI Agents” from the sidebar and navigate to the Assistants tab. Choose your desired assistant and click on the “Assign Webhook” button under the Operations tab.
- Select the webhook you just created by clicking on the drop-down menu, and click on "Save."
Alternatively, you can also create a new webhook by clicking on the “Create Webhook” button. In that case, you will be redirected to Step 1.
Configuring Webhooks for Different Events
Here's how to configure webhooks for each event:
captured_form.created
This event is triggered when a user submits a form through the Flowforge chatbot or phone agents.
For instance, let's say a user engages with a Flowforge chatbot and inquires about a product. In response, the Flowforge bot prompts the user to provide additional details by filling out a form. Once the user submits the form, the captured_form.created webhook is triggered. Flowforge then passes the captured form information to the URL specified by the customer as the webhook endpoint, facilitating seamless integration into the customer's system.
Each webhook request includes a body, which contains the following information:
{
“id”: “018eb05e-7efd-7bef-a765-7bccbd9f39d9",
“data”: {
“form_id”: “018eaff3-67cb-7d86-bb5e-65c952c8dc2a”,
“form_name”: “Algoscale Leads”,
“widget_id”: “018cd9c9-a864-7de1-98c0-6478c74b9c2b”,
“assistant_id”: “018cd9c8-e317-7079-accd-17be51784256”,
“field_values”: {
“name”: “Smith Stevens”,
“email”: “smith@gmail.com”,
“query”: “flask developer”
},
“conversation_id”: “018eb05d-cf6c-7631-8992-fd8377db4145",
“captured_form_id”: “018eb05e-7177-7374-af12-66132614cb9f”
},
“event”: “capturedform.created”,
“object”: “event”,
“created_at”: “2024-04-05 22:26:08"
}
To configure this webhook, navigate to Forms under AI Agents to choose from existing webhooks or create a new one.
captured_intent.created
This event occurs when Flowforge successfully captures a user's intent during an interaction.
For instance, if a user engages with a Flowforge chatbot to book a hotel room and clearly expresses their intent, the captured_intent.created webhook is triggered. Flowforge then passes the captured intent data to the specified webhook endpoint URL, enabling seamless integration for actions like reservation confirmation or sending booking details to the user.
Each webhook request includes a body, which contains the following information:
{
“id”: “012ec784-e78d-80c2-a729-101c148de8c2",
“data”: {
“intent_id”: “023eca5e-a584-1002-960d-4857d7d28c67”,
“chat_count”: 2,
“intent_name”: “SALES”,
“device_type”: “mobile”,
“widget_id”: “018eb656-5692-7a92-836b-80e2cd1eca56",
“assistant_id”: “018eb657-5027-7a36-ad61-77e2bd4ec683",
“conversation_id”: “019ec453-1017-2567-904d-ff39862b334"
},
“event”: “capturedintent.created”,
“object”: “event”,
“created_at”: “2024-04-10 18:16:50"
}
To configure this webhook, navigate to the Assistants tab under AI Agents to choose from existing webhooks or create a new one.
conversation.closed
This event signals the end of each conversation, whether it's with a chatbot or a phone agent.
For example, if a customer engages with a Flowforge chatbot to troubleshoot a product issue and the chatbot resolves it, the conversation closes. The conversation.closed webhook is then triggered, indicating the interaction's conclusion. Flowforge passes relevant conversation data to the specified webhook endpoint URL, enabling post-interaction processes like logging for analysis, updating records, or sending surveys.
Each webhook request includes a body, which contains the following information:
{
“id”: “018ec93a-1393-7002-a528-199c149be8e3",
“data”: {
“widget_id”: “018eb657-e189-7219-960d-4535d7d24d99”,
“chat_count”: 2,
“contact_id”: “None”,
“device_type”: “desktop”,
“assistant_id”: “018eb657-5027-7a36-836b-77e2cd1ec683",
“first_message”: “User: hi may i know how much is flu jab”,
“conversation_id”: “018ec933-3037-7469-80d8-ff393043b889"
},
“event”: “conversation.closed”,
“object”: “event”,
“created_at”: “2024-04-10 18:16:50"
}
To configure this webhook, navigate to the Assistants tab under AI Agents, where you can choose from existing webhooks or create a new one.