Links

High-Speed Delivery Setup

Deliver time-sensitive push messages with no delay

Overview

In Pushwoosh, audience segments can be defined with Segments. For regular targeted push campaigns, segments are compiled after the /createMessage request is received. Therefore, depending on the segment’s complexity, it may take a while before the segment is compiled and the push is sent.
With the High-Speed Delivery setup, Segments are pre-compiled every 10 minutes, which allows keeping audience segments updated and sending messages instantly. Therefore, time-sensitive push messages can be delivered with no delay due to compiling Segments.
High-Speed Delivery proved itself to be highly efficient for various verticals where marketing success is a matter of seconds. For example, for sports organizations such as UEFA (Champions League, Europa League, European Qualifiers apps), and FIBA.
This guide refers to the High-Speed Delivery setup via the example of sports vertical. Let’s take a look at the segmentation of a sports app’s user base to notify them about the upcoming match and its course.

Why High-Speed Delivery

The prerequisites for using the High-Speed Delivery by sports organizations are as follows:
  • all matches are scheduled in advance, so you know when to create respective Segments and can pre-compile audience segments;
  • every match is associated with a unique ID. For example, the match ID for the Champions League Final is 0123;
  • every team is associated with a unique ID. For example, Juventus ID is 111, Real Madrid ID is 222, etc.;
  • there’s a set of live events you’d like to notify users about (goals, lineups, kickoff, etc.).

Setup

All Segments for High-Speed Delivery should be created in advance, in the example given – before the match starts. Pushwoosh applies Segment conditions to the app’s user base and pre-compiles segments every 10 minutes (adjustable). When you submit a /createMessage API request containing push content and the Segment name, Pushwoosh already has a pre-compiled list of recipients ready to instantly send the push to.
Segment compilation is resource-consuming, and its speed depends on:
  • the complexity of Segment conditions (the number of Tags used, a high cardinality of Tag values);
  • the number of unique Segments pre-compiled simultaneously;
  • the number of users subscribed to the app.
Therefore, all Segments for a game must be created via API prior to the game start and deleted afterward to keep the number of active pre-compiled Segments to a minimum and save computing resources.

Create Tags

First, create a set of Tags to apply, and set Tag values for users' devices. Create Tags of the LIST type corresponding to live match events such as kickoff, goal, red card, etc. For example: MATCH-KICKOFF, MATCH-GOAL, MATCH-RED_CARD
Create the same set of Tags describing live match events for teams. For example: TEAM-KICKOFF, TEAM-GOAL, TEAM-RED_CARD
To create Tags via the API, call/addTag.
By subscribing to these Tags, app users can choose which notifications they’d like to receive:
  • notifications about the specific match (e.g., Juventus - Real Madrid match);
  • notifications about favorite team’s matches (e.g., Juventus matches only);
  • notifications about events occurring during the match (e.g., goals in Juventus - Real Madrid match only);
  • notifications about specific events from the favorite team (e.g., goals and lineups of Juventus matches).

Set Tags

Now you can populate previously specified Tag values via the /setTags API request, and subscribe users to specific categories of push notifications. For example: When a user subscribes to receive Champions League Final kickoff and goal updates, call the /setTags with the match ID contained:{
"request":{
"application":"app_code",
"hwid": "device_hardware_id",
"tags": {
"MATCH_KICKOFF": "0123", // match ID
"MATCH_GOAL": "0123" // match ID
}
}
}
The user will receive notifications about Champions League Final kickoff and goals scored.
When a user subscribes to receive goal and red cards updates of Real Madrid matches, call the /setTags as follows:
{
"request":{
"application":"app_code",
"hwid": "device_hardware_id",
"tags": {
"TEAM_KICKOFF": "222", // team ID
"TEAM_GOAL": "222" // team ID
}
}
}
This user will receive notifications about kickoffs and goals whenever Real Madrid is playing.

Create Segments

Now you can create Segments for match events based on Tags and their values (match IDs and team IDs). Segments should be created via the /createFilter API request 30 minutes before the match starts.
To notify users about goals scored in Champions League Final from the example given above, call the /createFilter with the following parameters: Segment name: 0123_GOAL Segment conditions: #TEAM-GOAL(111, 222) OR #MATCH-GOAL(0123)
{
"request": {
"auth": "auth_token",
"name": "0123_GOAL",
"conditions": [
["TEAM-GOAL", "IN", ["111", "222"]],
["MATCH-GOAL", "IN", ["0123"]]],
"operator": "OR", // optional. Operator values: 'AND', 'OR'
"application" : "AAAAA-00000"
}
}
This request will compile the segment of users subscribed for goal updates of Champions League Final (match ID=0123) OR users who follow either Juventus or Real Madrid (team ID=111,222).
To set up a High-Speed Delivery in your Pushwoosh Control Panel, create a new Segment with corresponding Tag values and associate it to the app you're going to send pushes to. App-specific Segments are pre-compiled every 10 minutes to keep audience segments always updated.
When the match event occurs (goal scored, match kickoff, red card, etc.), call the /createMessage with the push notification content and the Segment name contained:
{
"request": {
"application": "AAAAA_00000",
"auth": "auth_token",
"notifications": [{
"content": "12’ Juventus goal! Juventus 1 – 0 Real Madrid",
"filter": "0123_GOAL",
"send_date": "now"
}]
}
}
Once we receive the /createMessage call, we already have a pre-compiled list of devices that match the Segment criteria, and we immediately send the notification towards APNs and FCM gateways.
High-Speed Delivery Segments do not support the use of the daysago operator. If you attempt to create a Segment with this operator, you'll receive an error message.
This restriction exists because, to function properly, High-Speed Delivery Segments rely on changes that happened in the app on user devices (like subscribing for push notifications or setting a specific Tag value). The daysago operator doesn't involve such changes, so the Segment won't work as intended.
Also, note that High-Speed Delivery Segments cannot be used with scheduled messages.

Delete Segments

After the match is over, all corresponding Segments should be deleted so that computing resources are not spent on further re-compilation of Segments that are no longer relevant, especially at the expense of Segments for matches that are scheduled next. Delete Segments via the /deleteFilter API request, for example:
{
"request": {
"auth": "auth_token",
"name": "0123_GOAL"
}
}
To avoid manual Segments deletion, set the Segment expiration date via the /createFilter request so that the Segment will be deleted automatically on the date specified:
{
"request": {
"auth": "auth_token",
"name": "0123_GOAL",
"conditions": [
["TEAM-GOAL", "IN", ["111", "222"]],
["MATCH-GOAL", "IN", ["0123"]]],
"operator": "OR", // optional. Operator values: 'AND', 'OR'
"application" : "AAAAA-00000",
"expiration_date" : YYYY-MM-DD // optional. Segment (Filter) expiry. The Segment (Filter) will be automatically deleted on date specified, unless it’s used in a Push Preset or an RSS feed
}
}
That's it!