Milestone-based Webhooks
A milestone-based webhook is sent to its recipient when a particular milestone is achieved within the IQL program. This page includes the following kinds of milestone-based webhooks:
Preemptive Permissions Alert Webhook
Preemptive Permissions Alert Webhook
The Preemptive Permissions Alert webhook is sent to the publisher to take certain actions, after a user becomes active.
Webhook Type: Milestone-based.
Webhook Subtype: Preemptive Alert
This webhook helps publishers notify users to enable the Always Allow
Location Permission option, when their device checks if the user wants to continue to allow background location use. This webhook is sent after a publisher-configurable time period (X
) lapses once the user becomes active.
The default value for X
is as follows:
Android: 24 hours after user activation.
iOS: 48 hours after user activation.
Publisher Response
The publisher needs to perform the following actions upon receiving the Preemptive Permissions Alert webhook:
Trigger an email and a push notification, informing the user of their activation status.
The message format is provided in the Sample Payload (below) and can be edited to convey the publisher's intent.
Sample Payload
{
"driver_id": "[email protected]",
"type": "milestone_based",
"subtype": "preemptive_alert"
"webhook_event_id": "0cae1949-d852-4f97-8a38-eb6db2efcf55",
"request_id": "988d7058-fff7-470a-9b0f-63b1cb1e7556",
"metadata": {
"created_at_timestamp": 1654506334000,
"trips_count": 5,
"distance_miles": 30.502,
"unique_driving_days": 2,
"opt_in_days": 2,
"date_last_drive": "2022-04-02",
"zendrive_score": 90,
"progress_percentage": 10.52,
"permission_status": "enabled",
"permission_error_details": {
"location_permission": "Always Allow",
"activity_permission": "Always Allow"
},
"permission_timestamp": 1654506334000
“message”: To avail discounts on your auto insurance premium, you may be prompted by your publisher application to grant background location access. It is important to ensure that you have selected the 'Always allow' location permission and have enabled precise location tracking at all times.
}
Opt-in Days Webhook
The Opt-in Days
webhook will be sent after the user completes X number of days in the program. The Publisher can configure the X
number of days as required.
Webhook type: Opt-in days
Subtype:
opt_in_days
.
This webhook comprises the following configuration:
days_list
: The list of opt-in days, during which the opt-in days
webhook should be sent. The default value is [3,6,15,22,29].
Trip-based Engagement Webhook
The Trip-based Engagement webhook will be sent to the publisher after the user completes X number of trips, as configured by the publisher.
This webhook comprises the following configuration:
Webhook type: Milestone-based.
Subtype:
trip-{$tripCount}
.{$tripCount}
represents the number of trips that the user needs to complete before the trip-based engagement webhook is sent to the publisher. For example, if the publisher configures this number as '1', then the engagement webhook is sent after the user completes their first trip. In this case, the webhook payload will have the subtype field set totrip-1
.
Last updated