Webhooks are a way to send information from Ontraport to a third party application, script, or website. They essentially allow your online accounts and integrated platforms to “speak” to each other.
If you’ve integrated other applications with Ontraport, you can use elements in automation maps or rules within forms to trigger information to be sent to the other application.
You can also set up API subscriptions, which send information when an event, such as a form fill-out, occurs; typically, this is set up by app developers for purposes of creating an integration.
Note that Ontraport’s Support team cannot set up or troubleshoot your API requests for you. If you need assistance setting up webhooks, you might want to hire an Ontraport Expert.
Setting up webhooks
Here are the ways that you can add webhooks in Ontraport:
In automation:
Adding webhook elements to automation map is useful because you are able to see how many contacts on a map have had a webhook send their data to your integrated platform.
- On your automation map, add the webhook element from the Advanced tab into the spot in the journey where you’d like information to be shared.
Through global rules (Pro accounts and above):
This is the same functionality that’s available in automation maps, but using the legacy feature called Global Rules. While this will work fine, automation maps are recommended. This is a good option if you want any contact in your account who performs an action to trigger a webhook.
- Go to → Administration → Advanced Features → Global Rules.
- Go to Contacts → Rules (Rules can be found under all objects; if you want to make a rule for deals go to Deals > Rules).
- Create new rule.
- Select any trigger for the rule.
- Choose the Send to a Webhook action (note, this was formerly called “Ping URL”).
On form submissions:
If you know that you want a webhook to pass information every time that a form is submitted, and you don’t need a full automation map, another option you have is to create a rule on the form submissions.
→ Administration → Legacy Features → Rules for Form Submissions.
- Toggle on rules on form submissions (Pro level accounts and above) by going to
- Go to your Form Settings.
- Add a rule to the Always-On Rules section (for an Order Form this can be in the rules section for Successful Payment or Failed Payment).
- Choose the Send to a Webhook action (note, this was formerly called “Ping URL”).
- Enter the destination URL to designate where to send your data.
- Select the HTTP request method for your webhook (GET, PATCH, PUT, POST, or DELETE).
- Add the data you would like to send.
- If you would like to add multiple Ontraport merge fields to your data, add an ampersand (&) at the end of a merge field before the next label (e.g. First_Name=[First Name]&Email=[Email]).
- If you would like to combine the merge fields, you can add in the merge fields with a space between them (e.g. Name=[First Name] [Last Name]).
- You can send your data in a variety of different content types: form-encoded, JSON, and XML. If the payload is none of those, then the data will be sent as plain text. Webhooks will automatically send the appropriate content type header along with the request; however, if a user adds a different content type header to the headers dialog, then it will override the automatic detection.
- Choose the number of requests you would like to send per minute and the number of retries.
View your webhook activity log
Troubleshooting webhooks can be a time-consuming pain, but Ontraport’s webhooks activity log simplifies the process. These logs allow you to view your most recent webhooks’ request and response data.
- Go to → Administration → Integrations → Webhook Logs.
- Add the columns that are the most helpful to you:
- Request – Display the request your webhook sent.
- Response Code – Show if your request was successful or if you experienced an error.
- Date – View the date you sent your webhook.
- Response Data – Show your webhook’s response data. This response contains information about the status of the event.
- Object – Display the object your webhook was for.
- Type – See if you sent your webhook via automation maps, API, forms, etc.
- Name – View the name of your webhook’s source. For example, you’ll see your page’s name if a visitor submits a form and triggers your webhook.
- Webhook ID – See the specific webhook’s ID if the source isn’t an API.
- Click on the request you’re interested in to view its data.
API Webhook Subscriptions
Ontraport provides endpoints for applications to subscribe to a webhook via the API so that, when the subscribed event occurs (e.g. someone fills out a form associated with the subscription), Ontraport will send that information to the subscribed URL. This reduces traffic on both the developer’s server and Ontraport’s API servers by eliminating frequent requests checking for new information.
The application will need to subscribe to the API endpoint with a valid API Key and Application ID generated by the associated Ontraport account. The subscription request must include a valid URL which will receive and process the data payload in the webhook.
The available webhook subscriptions available are:
- Object is created (Contact or Custom Object record)
- Form is submitted
- Tag is added
- Tag is removed
- Product is purchased
- Transaction is added
Further webhook documentation can be found in the API doc, and you can use the API Live Doc Webhooks section to check if there are existing webhook subscriptions for your account and to create subscriptions to webhook testing services such as Request.bin.
To use the API Live Doc:
- You need an API Key and Application ID from an active Ontraport account.
- Enter the API Key and Application ID in the fields in the top right corner of the screen.
- Scroll down and expand the section for Get /Webhooks.
- You can click the button to “Try it out!” near the bottom of the API Live Doc (it is not necessary to enter any parameters), and the response body will list the active webhook subscriptions for this account, if there are any.
Download a prebuilt automation map Learn how to use webhooks with examples Unlock the power of API automation with this ready-to-use map! Featuring example webhooks and a step-by-step video walkthrough, this map makes it easy for you to integrate and automate workflows, even if you're new to APIs. Click here to download now and start streamlining your processes today! |