How does webhook work?
A webhook is a lightweight, event-driven communication that automatically sends data between applications/systems via HTTPS. Triggered by specific events, webhooks automate communication between systems and can be used to activate workflow.
How Webhooks work?
Here’s a step-by-step explanation of how webhooks work:
-
An event occurs
An event triggers the webhook request in Frotcom. This event could be anything from a new tracking data, a new message, or a driving time updated. Webhook URL: In Frotcom, where the event occurred, sends a payload of data to a specified webhook URL Customer/Your system.
-
Receiving data
The receiving Application (Your system) captures the data and processes it accordingly. Response: Your system sends a response back, confirming whether the data was received successfully or with an error.
-
Webhook Security
Ensuring the security of webhooks is crucial to prevent unauthorized access and data breaches. We strongly suggest to use HTPPS protocol.
How is webhook different than API?
APIs are manual and need to be asked to pull or modify data.
Webhooks automatically send data in response to a specific event without request from another software.
Webhooks are a subset of APIs and are, therefore, far more limited than APIs. They can only send information.
Do you need a webhook?
If the need is to receive real-time data as an event-occurs, webhooks are best to use. If the need is to synchronize data between softwares then API will be the answer.
What are the disadvantages of webhooks?
Their functionality is inherently limited.
Webhooks only allow you to receive data or notifications in one direction. It doesn't support bidirectional data flows or additional HTTPS methods, like DELETE or GET
How to activate your Webhook?
- Identify which webhooks you need.
Create and publish your receiving application, and provide the HTTPS URL to your FCP, with the account and vehicle filter to use (if this situation applies).
- Request your Frotcom Certified Partner to subscribe to your Webhook,
You will receive from your FCP a Token/Secret that will identify Frotcom as the source of the message that you will receive.
- You will start receiving data as soon as new data is available.
Webhooks available
More webhooks will be available soon.
Retries policy
Frotcom expects from your application a 2xx code, to consider the message delivered and move to next message, if your application is not available, not responding, or has some critical error, Frotcom ensures data delivery in the correct order for up to one week. Once your service is back online and operational, Frotcom will automatically retransmit all the undelivered events in the right order. When retrying to send past events Frotcom' uses a exponential backoff strategy:
- On the first failure, retry 3 times for the same event.
- If the failure persists, try to send a live event after 5 mins.
- If the failure persists, try to send a live event after 15 mins.
- If the failure persists, try to send a live event after 35 mins.
- If the failure persists, try to send a live event after approximately 1 hour .
- If the failure persists, try to send a live event after approximately 2 hour 30 mins.
- If the failure persists, try to send a live event after approximately 5 hours.
- If the failure persists, try to send a live event after approximately 10.5 hours.
- If the failure persists, try to send a live event after approximately 21 hours.
- If the failure persists, try to send a live event after approximately 2 days.
- If the failure persists, try to send live events once a day.
After 7 days trying to deliver messages to your system without success, your webhook subscription is automatic deactivated and undelivered messages will be discarded.
You can check the status of your webhooks in Administration > Account > Webhooks.