A webhook is a mechanism for notifying the system about events. When an event occurs, the server sends a post request to the address specified in the webhook URL.
In the BotHelp platform, you can set up integrations with other platforms via a webhook.
Webhook format
Each webhook is an http post request to the URL that you specified. The request body contains data in JSON format.
The BotHelp webhook is sent with the http header Content-Type: application/ json
, so make sure that your service can process such requests.
Types of events
Events in flows
An event in a multi-step flow occurs when the person reaches the step where the webhook is registered. In a line flow, this happens when the person has completed the flow.
For more information about what data is transferred from the flow, see the article: Sending a webhook.
Events in chats
There are 2 types of events for chats: ConversationClosed and UserProfileViewed. These events have nothing to do with autofunnels, they take place in the “Conversations” section.
For more information about the data from these events, see the article: Chat Webhook reference.
You can configure the webhook yourself or use special integrator platforms. There are several instructions on how to use these platforms in our knowledge base. Look for them in the related section: Integrations.
Question. Can BotHelp accept data from other platforms?
Answer. Yes, use the open BotHelp API for this. Detailed instructions can be found in our article: BotHelp API.
Sending a webhook
You can link BotHelp and any platform using webhook data transfer. To do this, paste the webhook URL into the appropriate field in the bot.
How to add webhook sending
Multi-step flow
- Create a new action.
- Add the “Send subscriber data via webhook” action.
- Paste the link to the webhook into the field.
- Save the action.
The webhook will transfer the data that the user had in their profile at the time when they went through this flow.
What data is transmitted?
- The date when the person’s profile was created.
- Name (full name, first name only, last name only).
- The link to the profile.
- The date of the first and last conversation.
- Person’s ID in the messenger (including the Telegram user’s username).
- Person’s ID in the BotHelp profile.
- CUID is a unique ID for integrations with GetCourse/Bizon365.
- UTM tags.
- All fields and their values.
{
//Standard fields
«created_at»: 1499947711, //timestamp
«name»: «John Wick»,
«first_name»: «John»,
«last_name»: «Wick»,
«profile_link»: «https:\/\/fb.com\/1941325716136721»,
«email»: «[email protected]»,
«phone»: «+14123456789»,
«conversations_count»: 10,
«first_contact_at»: 1499944111,
«last_contact_at»: 1499944111,
«user_id»: «1234567890»,
«bothelp_user_id»: «47659»,
«created_at_show»: «14/07/2017 07:56:32 UTC» //time and date of creating a lead for humans,
«cuid»: «1et0.301»
//Custom fields
«utm_source»: «VK»,
«utm_campaign»: «messenger»,
«utm_medium»: «social_cpc»,
«utm_content»: «123»
«age»: «21»,
«position»: «CEO at Pinapple»,
}
Where to get a webhook URL
If your programmer sets up receiving a webhook, they will tell you the address to which it has to be sent. If you use special integration services, they will provide you with the URL at one of the configuration stages.
We have instructions on how to set up integration through these services:
Use them to integrate with the platform you need. Find the list of platforms available for integration on the integrators’ websites.
If you haven’t found the answer to your question, contact us in the chat in your profile or email [email protected]😃
Get 14 days of full functionality of BotHelp, a platform for creating broadcasting, autofunnels, and chatbots.