Activity-based Webhooks
Types of Activity-based Webhooks
The following types of activity-based webhooks are currently implemented within IQL:
5. Driving Engagement Alert Webhook
1. Permission Issue Webhook
This webhook will be sent if there is an issue in the permission status received within the last 24 hours. The subtype for this webhook is permission_issue
. The following are the Permission Issue webhook configurations:
interval_in_days
: The minimum interval in days between two permission webhooks. The default value is 1 day.number_of_times
: The number of times the permission webhook needs to be sent. The default value is 3 times. This value will be reset when a healthy permission packet is received at the backend.
2. Lost User Engagement Alert Webhook
The lostUserEngagementAlert
is triggered when a user remains inactive for the past X number of days after the first unhealthy heartbeat was detected. The webhook notifies the publisher of the user's inactive status, which helps the publisher to motivate the user to stay engaged with the program. The publisher can take this opportunity to reiterate the benefits of the program via a customized message, depending on the user's progress so far.
The lostUserEngagementAlert
webhook comprises the following configuration:
inactivity_days
: The number of days of missing healthy heartbeats to trigger this webhook.number_of_times
: The number of times this webhook should be sent. The default value is 1.interval_in_days
: The minimum interval in days between two webhooks. The default value for this configuration is NA at present.
Sample Webhook Configurations
The following is a sample configuration for the webhook, including the time period and the customizable message to be sent, depending on the user progress in the test drive.
a) Sample Configuration 1:
User's test drive progress
< 20%
User's inactive days (X)
3
Message to users
Don't Miss Out on Potential Discounts! Set Location Permission to Always allow
to unlock maximum potential discounts on your car insurance! Get back to the test drive today and start saving.
b) Sample Configuration 2:
User's test drive progress
> 20 and < 70%
User's inactive days (X)
5
Message to users
Accelerate towards discounts! You're halfway there. You've reached the halfway point! Keep up the great work. Stay motivated and complete your test drive to unlock potential discounts.
c) Sample Configuration 3:
User's test drive progress
> 70 and <= 100%
User's inactive days (X)
5
Message to users
You're almost there! Just a few more steps to earn potential discounts on your car insurance renewal. Keep up the great work!
Publisher Action
The publisher needs to perform the following actions upon receiving the lostUserEngagementAlert webhook:
Trigger an email & push notification to the user in response.
Send the message portion of the webhook (configurable) to motivate the user to stick to the program.
Sample Payload
{
"driver_id": "[email protected]",
"type": "activity_based",
"subtype": " Not Connected",
"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": 80.502,
"unique_driving_days": 5,
"opt_in_days": 8,
“Connected days count”: 4
"date_last_drive": "2022-04-02",
"zendrive_score": 90,
"progress_percentage": 10.52,
"permission_status": "disabled",
"permission_error_details": {
"location_permission": "while_using",
"activity_permission": "deny"
},
"permission_timestamp": 1654506334000
“Message”: “Don't Miss Out on Potential Discounts! Set Location Permission to 'Always allow' to unlock maximum potential discounts on your car insurance! Get back to the test drive today and start saving.”
}
}
3. No-click Webhook
The no-click
webhook will be sent if the user hasn’t clicked on the offer within X
number of days of offer presentation. The Publisher can configure the X
number of days as required. The subtype of this webhook is no_click
.
The no-click
webhook comprises the following configuration:
days_list
: The list of days during which theno-click
webhook should be sent. The default value is [2, 3, 5, 7, 14, 30, 60, 90, 120, 150].
4. Inactivity Webhook
The Inactivity
webhook will be sent if the user has not taken any trip in the previous X
number of days. The subtype for this webhook is inactivity
. The Inactivity webhook comprises the following configurations:
inactivity_days
: The number of days for which user should be inactive in order to trigger the inactivity webhook. The default value for this configuration is 3 days.interval_in_days
: The minimum interval in days between two inactivity webhooks. The default value for this configuration is 1 day.number_of_times
: The number of times the Inactivity webhook should be sent. The default value is 3 times; this value will be reset if the user becomes active again.
5. Driving Engagement Alert Webhook
The Driving Engagement Alert webhook will be sent to Drivers based on the driving behaviors.
This webhook comprises the following configuration:
Webhook type: Activity-based
Webhook subtype:
driving_event_<engagement_id>
Sample Payload:
Add the following object in the response payload for the GET endpoint of all engagements.
{
"driver_id": "[email protected]",
"type": "activity_based",
"subtype": "driving_event_1"
"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,
"events_count": {"hard_brake": 1, "rapid_acceleration": 1, "phone_use": 1, "over_speeding": 1},
"events_duration": {"phone_use_secs": 1, "over_speeding_secs": 1},
"permission_status": "enabled",
"permission_status": "enabled",
"permission_error_details": {
"location_permission": "Always Allow",
"activity_permission": "Always Allow"
},
"permission_timestamp": 1654506334000,
"message": "message"
}
Last updated