Send Webhooks
  • 07 May 2024
  • 2 Minutes to read
  • Dark
    Light

Send Webhooks

  • Dark
    Light

Article summary

Use ​Bringg webhooks to notify other enterprise systems as soon as a predefined ​event​ occurs. For example, update your order management systems (OMS) when an ​order​ arrives at its ​destination.

Subscribing to webhooks keeps your external systems updated. This prevents the accidental overwriting of data when the system sends updates back to Bringg via API. For example, if you update a waypoint address in Bringg, the updated address is included in the next webhook from Bringg to your OMS. Then, when your OMS sends an update to Bringg – say, to add a note – your OMS sends the current data including the updated address from Bringg.

​Bringg webhooks are sent to your systems using HTTP POST methods that do not require polling (requesting data via API). To receive webhooks, you only need to register once per event. Every time that event occurs, the webhook is sent to the URLs you included in your webhook registration.

For example, the following webhook can be sent when a driver changes their availability status:

{
  "user": {
    "id": 3287186,
    "name": "Timothee Chalamet",
    "status": "online",
    "sub": "Assigned",
    "phone": +1(555)555-1234,
    "external_id": "123456tc"
  },
  "user_available": true,
  "webhook_type": "driver_unavailable_status_changed",
  "merchant_id": 1
}

For a complete list of ​Bringg​ webhook events, visit our API Reference documentation.

Before You Begin

  • Confirm you have the Admin user type in ​Bringg.

  • Configure webhook authentication methods to make sure that your listening systems recognize and accept Bringg’s updates.

Access Bringg’s Webhook Settings

Select your username from the sidebar and go to ​Settings > Platform Integrations > Webhooks > Add Webhook​​ to register for a new webhook event.

Register for a Webhook

1. Select a webhook event

Select an event in the order life cycle from the Webhook Name dropdown list.

You can find a complete list of ​available Bringg​ webhook events in our API Reference documentation.

3. Enter URLs

You can add multiple URLs to send the same webhook to multiple systems, rather than setting up independent data requests or even individual webhooks for each​ system.

Enter your URL in the field provided. You can create a new line in the form by selecting Add URL.

4. Add an authentication method

(Optional) Configure webhook security by selecting an ​**Authentication method**. Learn more about creating authentication methods.

5. Add headers

(Optional) To include static headers in your webhook payload (including static tokens for authentication), fill out the Key-Value pairs in the Headers section.

6. Customize webhook fields

(Optional) To customize the data fields included in the webhook, select ​**Enable Flexible Webhook**,​​ then select the relevant fields.

To view only the fields that will be included in the payload, select the checkbox next to Selected Data.

You can restore default data for a webhook by selecting Restore Default Data.

Tip

You can include custom attributes and managed attributes like delivery assistants in Bringg webhooks!

7. Refine webhook triggers

(Optional) To refine a webhook's trigger, select an event field from the Select a field to filter by dropdown list, then enter a target value.

​For example, you can create a filter to receive webhooks regarding only customers who have opted in to receiving SMS notifications.

8. Save your webhook

Select Save to finalize your webhook registration.

Edit a webhook

To edit or delete a webhook, locate the webhook on the table and select Edit. You can then make any necessary changes and select Save to finalize them.

To stop receiving the webhook entirely, select Delete.

Updating flexible webhooks

Adding, removing, or modifying the fields included in your flexible webhooks may change the structure of the webhook payload. Be sure to test updated webhooks and make any necessary adjustments to your recieving endpoint.


Was this article helpful?