👋 Most of our active conversations happen over on Discord. Accept Invite →

How do I send events with a webhook?

With the influx of customers coming into Bento it's hard for us to keep up with all the integrations that everyone wants. So, to help simplify things we lean heavily on webhooks and Zapier when we can't build a native, first-party integrations (like we have with WooCommerce, Shopify, etc).

What are webhooks?
Webhooks are simple requests to a server containing a payload of information. Think of it as almost an email but instead of a body of text it's a bunch of variables. Most form tools, like Convertful which we will demonstrate below, have the ability to send a webhook after a form has been submitted.

Once you send the event to Bento we will take in that information and route the event data right into your account.

How can I send a webhook?
First, navigate to your tool and look up their webhook documentation. If you can create a POST request, you're good to go.

Next, fill out the fields using the variables provided by your provider. In the example below the provider allows us to use {email} for the email and {Role Choice} for what the visitor fills out in the form. This will be different for each app. You can add as many fields as you want — they will all be captured as a custom field on the visitor (except site, type, and of course email).

image.png 57.19 KB

Then, we're going to add a field called site which contains our site's UUID. This is the same ID you can find in your tracking script when you installed it (Can't find it? Navigate to the gear icon in the main navigation and then click "Embed Script").

image.png 51.81 KB

Finally, we then need to pick a name for the event so we'll also add a field called type and give it the value $convertful.

And now we're done!

When a user fills out the form the app will fire an event that will hit our server. We'll then find your site using the UUID you provided, look up the email for an existing visitor, and create an event called $convertful with all the other fields in it to add to the profile.

Downsides of using webhooks?
You cannot send information for anonymous users, which is a pain, and you also do not get any location data on the visitor because we're essentially getting the information from the integrations server — not the user. If a visitor is already in the system then this isn't an issue but if it's the first time detecting them then it will be. 

Questions? Ask below!
Leave a reply