Skip to content

High-speed delivery setup

Overview

In Pushwoosh, audience segments are defined using Segments.

For standard push campaigns, the segment is compiled after the /createMessage request is sent. This means there might be a short delay before the message goes out, especially if the segment is complex.

With high-speed delivery, segments are precompiled every 10 minutes. This keeps them up to date and ready to use, so messages can be sent instantly—without waiting for the segment to compile.

High-speed delivery is especially useful when timing is critical. For example, sports organizations like UEFA and FIBA can use it to deliver real-time updates where every second matters.

This guide explains how to set up high-speed delivery using a sports app as an example. You’ll learn how to create audience segments to notify users about upcoming matches and live events.

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—ideally before the match starts in the example use case. Pushwoosh applies segment conditions to the app’s user base and precompiles segments every 10 minutes (this interval is adjustable).

When you send a /createMessage API request with the push content and the segment name, Pushwoosh already has a precompiled list of recipients, allowing the push notification to be sent instantly.

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 Tags

Create the same set of Tags describing live match events for teams.
For example:
TEAM-KICKOFF, TEAM-GOAL, TEAM-RED_CARD

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.

create a new Segment

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.

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. Values: 'AND', 'OR'
"application": "AAAAA-00000",
"expiration_date": "YYYY-MM-DD" // optional. Segment (Filter) expiry
}
}