Concepts
How delivery works
How a Herald decision becomes a push notification, content card or in-app message, and how the outcome flows back to the decision.
Delivery is the path from a Herald decision to a message on the user's device, and back. Herald decides; push goes out through Apple and Google; content cards and in-app messages wait on Herald until the SDK fetches them.
The path, step by step
- Herald decides. An agent picks a message, a channel and a time for a user, and sends it through a sending connection.
- Push goes to the push service. The send is queued and delivered by Herald's dispatcher to APNs (iOS) or FCM (Android), addressed to the push tokens the SDK registered for that user.
- Cards and in-app messages wait for the app. Herald writes a message record for the user. The SDK fetches the user's records at session start, after sign-in, and when you call
refreshContentCards(). - The device shows the message. The operating system shows push. The SDK publishes cards to your feed, and evaluates in-app messages on the device each time a trigger fires.
- The outcome comes back. Impressions, clicks, dismissals and push opens are sent as interaction events that carry the decision ID, so Herald credits the result to the decision that produced the message.
Channels compared
| Push | Content card | In-app message | |
|---|---|---|---|
| How it reaches the device | APNs or FCM | Fetched by the SDK | Fetched by the SDK, shown on a trigger |
| When the user sees it | When the push service delivers it | At the next fetch | When its trigger fires after a fetch |
| Scheduled send time | Honored | Ignored: visible at the next fetch | Ignored: eligible at the next fetch |
| Works offline | No | Yes, from the on-device cache | Yes, from the on-device cache |
| Requires | A push token for the identified user, and APNs or FCM credentials on the connection | An identified user with the SDK installed | An identified user with the SDK installed |
A fetch returns up to 100 content cards and 50 in-app messages. Dismissed, expired and archived messages are left out.
When a message is suppressed
A content card or in-app message for a user who has no SDK device on that connection is suppressed: Herald writes nothing and records the send as suppressed. This keeps messages from piling up for users who have not installed or opened the app.
A push needs a push token. Tokens are stored only for identified, verified users, so an anonymous device never receives push from Herald.
How outcomes are credited
| Interaction | Sent when | Effect on the decision |
|---|---|---|
| Impression | A card or in-app message is shown | Counted as delivered |
| Click, or button tap | The user taps the card, the message or one of its buttons | Counted as a click, which rewards the decision |
| Dismiss | The user dismisses the card or message | Counted as a dismissal |
| Push open | The user opens a push notification | Counted as an open |
| Push action button | The user taps a button on a push | Logged as an open, then a button tap, so it counts as an open and a click |
Herald credits an outcome only when the user is verified and the decision belongs to that user. Outcomes from anonymous devices, or for someone else's decision, are stored as events and change nothing.
Send-time checks
Agents and campaigns choose who gets a message ahead of time. For messages Herald delivers itself, it checks again right before each one goes out:
- Agents: the person still matches the agent's audience, hasn't already completed its main goal, and the agent is still running. You can also skip people who used the app since the message was queued, or today in their time zone.
- Campaigns: with Check again at send time on (the default for new campaigns), people who no longer match the audience or already completed the goal are skipped. The If they've used the app setting works the same way as for agents.
- Messaging limits: in Enforce mode, a message is held when the person's attention budget for the channel or the message's category cap is full, counting pushes your app sends itself. Campaign messages wait for a free slot and are dropped after the category's "useful for" time; agent messages are skipped. In Observe mode, the old push limit (on by default at 3 pushes in 24 hours) skips agent and campaign pushes instead, whatever the campaign's other send-time settings. Send API messages without a category are never held, but they count. See Message priority and attention budget.
Skipped messages count as never sent. Audience segments refresh hourly, so a change in someone's data can take up to an hour to show here. If the check can't run, nothing is sent and Herald tries again a minute later. Messages sent through another provider are scheduled by that provider, so they aren't checked.
Most apps already send transactional messages (receipts, sign-in codes, password resets, order and account updates) from their own backend. Keep doing that, and report each push to Herald with the $external_push event so it can count every push a person gets. If you'd rather Herald send them, use the Send API: those messages go out right away and skip the send-time checks. Use agents and campaigns for marketing and lifecycle messages. Send API messages still skip unsubscribed and bounced addresses, follow the quiet hours you ask for, and skip campaign frequency caps when you name the recipients.
Sync push
When Herald writes a new content card or in-app message for a user who has a push token, it also sends a silent push that tells the SDK to fetch now, instead of waiting for the next session. It never shows a notification. Herald sends at most one per user every five minutes. Apps that do not handle it still get the message at the next session. See Silent push.
Push dispatch timing
Push sends wait in an outbox until Herald's dispatcher delivers them. The dispatcher runs on a schedule your Herald operator sets up; the setup guide runs it every minute. With that schedule, a push leaves Herald within about a minute of its send time, and APNs or FCM add their own delivery time.