A webhook allows you to notify an external system of an event, such as a tag being added to a contact, a purchase being made, or a new newsletter subscriber. For example, we use a webhook to quickly and automatically activate a customer’s service after a purchase.
Webhooks are incredibly useful and a part of most major software packages. In Infusionsoft, many tasks that would traditionally be handled by a webhook can instead be done with the campaign builder (such as sending follow-up emails or lead magnets), but if you need something more powerful you can create a full featured webhook using the campaign builder, HTTP post, and the Infusionsoft API.
The first step is to create your event handler to act on the webhook event. You can write the event handler in whatever programming language you are comfortable with. The event handler will get called whenever your webhook runs. You’ll need some coding skills or the help of a developer to create your event handler.
Next you’ll need to create your campaign. Add a goal that will capture the contacts that you want the webhook to run for. Add a sequence after the goal. In the sequence, add a Process → Send HTTP Post item. You’ll configure this item with the POST URL for your event handler, and the name/value pairs you want to send to your handler.
Last, create an API call goal following the instructions in this previous tip. Your event handler will need to trigger this goal to move contacts out of the sequence after the event handler finishes.
That’s it! Put it all together and you have a powerful webhook system.