Using webhooks allows you to receive real-time notifications in your applications whenever a change is made to a job in your AntsRoute account.
In practical terms, a webhook automatically sends data to a specific URL when an event occurs in AntsRoute.
This automated data transfer can then trigger actions in the receiving application. For example, you can automatically create an invoice in QuickBooks as soon as a delivery is completed with AntsRoute.
💡 Only users with the “Admin” role can access the webhook settings.
Your webhook is now configured. Data will automatically be sent to the relevant application whenever one of the selected events occurs.
Example of an HTTP request:
Events that can be sent:
- Status change: Delivery cancelled, Delivery confirmed, Delivery created, Delivery pending, Delivery deleted, Delivery done, Confirmed status removed, Pending status removed.
- Planning: Delivery set to unassigned state, Delivery moved forward or delayed or assigned to another route, Delivery assigned to a route, Delivery assigned to a route in progress, Delivery scheduled from the basket, Delivery moved to the basket, Planning date changed.
- Proof of delivery: Proof of delivery (photo) added, Customer signature added.
- Other: Delivery locked, Delivery updated.
- Route: Route started, Route ended.
- Notification: Notification sent.
- Pick-up & Delivery: Loading done, Unloading done, Loading cancelled, Unloading cancelled.
How to add a webhook
First, you need to get the webhook URL of the application to which you want to send the data.
- Click on the blue circle at the top right.
- Go to the “Integrations” tab.
- Click on “Webhooks”.
- Click on the button “+” at the top right.
- Fill in the required information: name, URL address, authentication mode, etc.
- Select the events to send.
- Choose to include or not all the work order information.
- If you have several sites, select the sites concerned.
- Click on the “Save” button.
How to view webhook logs
The “Logs” tab allows you to view the history of data sent to your third-party applications. In particular, it helps you check whether the information was successfully transmitted and identify any errors.
To access the logs:
- From your list of webhooks, locate the webhook you want to view.
- Click “…”.
- Click “Logs”.
For each transmission, you can view its status, the event, the date sent, and the data sent.
💡 A “Success” status indicates that the information was successfully transmitted. A “Failed” status indicates that the transmission was unsuccessful.
If a transmission fails, click the corresponding row to view the transmission details and the response returned by the third-party application. This information can help you identify the cause of the issue.
How to filter logs
To find a specific transmission more easily in the history, click the “Filter” button.
You can filter logs using four criteria:
- Status: Display only failed or successful transmissions.
- Event: Find transmissions associated with a specific event, such as a locked delivery.
- Date sent: Find data sent on a specific date.
- Delivery ID: Find transmissions associated with a specific delivery using its ID.
These filters allow you to quickly narrow down the information you are looking for, especially when your webhook contains a large number of logs.
💡 If you encounter an issue with a specific delivery, use the “Delivery ID” filter to quickly find the different events sent for that delivery.
What should I do if a transmission fails?
If a log displays a “Failed” status, open it to view the details of the response returned by the receiving application.
In particular, you can view the HTTP response code and the error message. This information can help you determine why the application did not accept the data sent.
Once you have resolved the issue causing the error, click “Resend” to make another transmission attempt.
💡 If necessary, you can also use the “Copy” button to copy the log information and share it with your technical team or the support team of the application concerned.
Key takeaways
Webhooks allow you to automate the exchange of information between AntsRoute and your other applications. Thanks to the logs and the Status, Event, Date sent, and Delivery ID filters, you can more easily track the data sent and quickly identify any errors.
Need help?
If you are having trouble using this feature or have any questions, our support team is here to help.
You can contact AntsRoute via the chat available directly in the software or by email at:
📧 contact@antsroute.com