Webhooks
A webhook allows you to be automatically notified when something happens in Front without having to constantly poll the API. For each event happening in Front, your webhook will receive a POST HTTP request with the event JSON representation in the request body.
Front offers two methods for configuring webhooks:
- By adding a webhook feature to an app (application webhooks)
- By setting up a webhook through rules (rule webhooks)
If you are building a partner integration available to all Front users, you should use application webhooks. The primary benefit of this method is that users of your integration will not have to configure the webhook themselves when they install your app. There is also less risk of disruption when using application webhooks, because rules can be accidentally deleted or re-arranged by other teammates. Application webhooks have access to events that occur in shared inboxes.
If you are not building a partner integration, you can choose whether to use application webhooks or rule webhooks. Front recommends using application webhooks whenever possible, but setting up rule webhooks can sometimes be all you need. Application webhooks require that you have a server ready to respond to the webhook event at the time of configuration. This is not required when you set up a webhook through rules, so you can get up and running without first setting up a server. In addition, rule webhooks have access to the scope in which the rule was created. If the rule was created in a private inbox, then the rule webhook will have access to events in that private inbox.
The following table summarizes the differences between application webhooks and rule webhooks:
Webhook type | Recommended for partner integrations | Recommended for intial testing | Benefits | Scope |
---|---|---|---|---|
Application webhooks | Yes | Once you have a server set up to respond to webhook events | Does not require the end user to configure the webhook through a rule when installing your app Sends the full event payload | Shared inboxes |
Rule webhooks | No | Yes | Allows you to set up a webhook without having a server ready to respond during configuration, but would require users to configure the rule themselves if your app is ported to other Front instances Sends either the full event payload or an event preview. You can make a subsequent API call to retrieve the full event. | Private or shared inboxes (the scope applies to the specific inbox the rule is created in) |
What events are not included in webhooks?
Webhooks alert you about most important events in Front. However, there are some events that webhooks do not apply to.
Webhooks exclude “mass action” events, such as:
- Moving inbox content to another team
- Mass updating inbox conversation statuses
- Importing historical messages to a channel
- Etc.
Updated about 2 months ago