Skip to main content

Delivering Promotional Notifications and Deep Links

Prepare reliable notification payloads, mobile links, expiration and account-aware landing screens.

R
Written by Reiko

A customer reports that a sale alert opened the home page. The campaign dashboard labels the notification “sent.” The provider accepted the message, the device displayed it, and the person tapped. All those steps can be true while the promotion still fails. The destination was the product being advertised, and the system lost it somewhere between the tap and the screen.

​

Treat delivery as a sequence of decisions with named owners. The campaign produces an eligible message, the sending service chooses the installation, the transport attempts delivery, the OS decides how to display it, and the app resolves the destination. A landing service then checks whether the offer is still available and relevant to the signed-in account. A useful design can explain where the sequence stopped using an identifier that is safe to share with support.

​

Keep the payload small and durable

A promotional payload should carry enough to display a safe message and find the right destination. Put changing details such as stock, final price and redemption terms behind the link. A field such as an offer ID can stay stable when a title is corrected or the app's internal navigation changes. Use a version number for the routing contract if several app releases will handle the same message.

Field

Example value

Purpose

Message ID

msg_84d1

Correlates scheduling, dispatch and tap

Campaign ID

spring_course_4

Groups related sends and placement reports

Offer ID

class_413

Resolves a specific destination

Route version

2

Lets older app builds choose a known fallback

Expiration

A UTC timestamp

Controls queue eligibility and landing behavior

Safe display title

Tuesday photography class

Describes the offer without using sensitive account data

Keep tokens, credentials and sensitive account properties out of the payload wherever possible. A transport address is needed to submit a notification, but it does not belong in message text or general-purpose analytics. A URL also tends to leave traces in logs and referrers. Put only routing values in it and resolve any account-specific access on the server. A promotion meant for one account must still check eligibility when a different account opens it.

​

Use a stable message identifier created before transport submission. Duplicates can appear after worker crashes or uncertain responses. Stable identifiers let the backend reconcile outcomes and the app deduplicate side effects it owns, such as inserting an inbox item. They do not give every platform or provider universal exactly-once display semantics. Assume that a client can see no notification, one notification or repeated attempts, and ensure that opening a destination or redeeming an offer does not double-apply a benefit.

​

Choose an address for the current installation

Installation records change when a user reinstalls, switches devices or a provider rotates its token. Associate the latest token with the current application build and account relationship. Record when it was observed and refresh it as the SDK directs. Provider-level invalid-token responses should retire an address only if it still matches the failed submission. Otherwise, a delayed error for yesterday's token could disable a fresh address registered this morning.

​

For a shared device, decide what happens at sign-out and account switch. Stop sending old personalized offers to that installation once the association changes. Race conditions still occur when a transport already has a message; authorize the destination with the current session. Keeping lock-screen text general limits unintended disclosure even if a queued alert reaches a device after a switch.

​

Expire messages when they stop being useful

A common failure happens when a device is offline during a short event and its deferred notification arrives after the event has ended. Set a provider expiration appropriate to the actual opportunity, and independently check the business deadline on dispatch and when opened. Firebase Cloud Messaging documents its message-lifespan options, including a TTL of zero for messages that should be discarded when they cannot be delivered immediately. Check the setting for the platform being targeted rather than assuming that the Android field also controls Apple delivery.

​

Some messages supersede earlier ones. A newest status can replace a stale version when the selected transport supports collapse behavior. Two unrelated offers should not share a replacement key merely because both are promotional. A collapsible delivery mechanism and duplicate suppression solve different problems. The former can discard an older pending message in favor of newer information. The latter avoids retrying the same logical message as if it were a fresh one.

​

Make the tap open the exact offer

Prefer a stable HTTPS route that the app and site can both resolve. On iOS, Universal Links use an association between the website and the app; Apple's documentation explains the necessary associated domains capability and website file. Android App Links likewise depend on a verified association between an app and website. Test the production hostname, production build and association files. A link that works when an engineer manually starts an activity does not tell you whether the app and domain are properly associated.

​

The notification handler still has to understand the route. Different paths can deliver the same offer: a system notification callback, an in-app inbox and a link on the website. Point them to a shared resolver. Allow only expected hosts and routes, and parse known parameters with validation. A query string should never select an arbitrary web address or authorize access to private account data. Trusted routing begins with recognizing the intended destination; authorization happens at that destination.

  1. Resolve the route and confirm its host, identifiers and version.

  2. Load account state and decide whether the destination needs sign-in.

  3. If sign-in is required, keep a short-lived validated route and resolve it again after authentication.

  4. Fetch current offer state and eligibility for the active account.

  5. Present active, expired, ineligible, unavailable or temporarily offline states with an appropriate next action.

Handle a cold start explicitly. The app may receive the tap before configuration and session restoration complete. Preserve the pending route until the app can safely resolve it. If the user taps another notification while the first route is pending, decide which navigation takes precedence. A default home redirect can swallow the tap if it fires later from a generic startup callback.

​

Warm launches need a different test. If someone is editing a form or confirming a purchase, a new route should not silently discard their work. The app may use a confirmation screen, a separate route stack or another method appropriate to the task. If the offer is already open, update it using the current identifier rather than stacking a second copy of the same screen.

​

Design fallbacks with honest outcomes

An expired URL should show the original offer and its status when that can be done safely. If the offer cannot be named without exposing personal details, show a neutral expired screen with a route to current offers or preferences. “This session has ended” explains why a person did not reach the promised enrollment. A redirect to an unrelated sale makes it look as if the first notification was inaccurate.

​

An unsupported version can open an owned landing page with the same offer conditions or provide a clear upgrade route if the app really needs one. Detecting a build that lacks the destination should be possible before dispatch for known installations. Eligibility may still change while somebody is signed out or while the store is offline. State the immediate reason in plain language. Avoid a generic error if the application can say the price changed or the session filled.

Condition at tap

Landing behavior

Test evidence

App installed and user signed in

Open exact offer

Route ID agrees with campaign ID

App absent

Open safe browser equivalent

Current terms and region match

User signed out

Authenticate when needed, then resolve route again

Pending route is validated and restored

Offer expired

Explain expiration and suggest a relevant next step

Shows correct expiry without a stale claim

Another account signed in

Do not expose the previous account's offer details

Authorization before sensitive details render

Device offline

Explain that details cannot refresh and allow retry

No cached promise treated as current

Distinguish transport events from user-visible outcomes

A server acknowledgment means the transport accepted a request for processing. Depending on provider and platform, reporting may include a different set of events, with different delays and coverage. Use terms such as queued, provider accepted, device delivery reported, notification opened, destination loaded and conversion completed. Document which events your integration actually observes and which involve sampling, opt-in collection or limits. Don't create a generic delivery rate that compares events from different populations.

​

Firebase documents multiple reporting paths for Cloud Messaging, including console reports, aggregate Android metrics and export. Their scope and availability are different. For a specific incident, combine safe server-side identifiers with the app's routing observation and an account-level timeline. A flat campaign total provides little help for a person who tapped a working system alert and landed on the wrong screen.

​

Provider acknowledgments are useful during a rollout because they can expose malformed payloads and invalid addresses. Device and app events catch other problems. A tripling of home-page arrivals after a release points more toward version handling than the transport. A fall in provider acceptance with normal app navigation among delivered cases points toward the sender or address data. Track symptoms by app version, region, platform and notification type, and compare only populations with relevant telemetry.

​

Test failures before a campaign depends on the route

Use a small production-like delivery cohort with real device settings. A simulator can be adequate for checking route parsing. A physical device helps reveal presentation, background state and lock-screen behavior. Test old and new app builds and open the same link from the tray, an email, an in-app card and a browser when those paths are supported. Collect the observed screen rather than assuming that a tap event means navigation succeeded.

​

Check empty and partial inputs before the campaign tool lets a message through. An unknown landing key can be refused at authoring time. A missing translation can be rejected or routed to a known language according to policy. A send requiring an offer ID should fail if the ID isn't in the promotion catalog. Failures found at preparation time are cheaper than a misleading notification at checkout time.

​

A release checklist should include focused fixtures for installations without permission, an invalid token, an OS-muted channel, a device just switched to another account, an offline device with an expiring offer, and an aging app build that lacks the latest route. For retries, simulate a temporary provider error and a timeout with unknown outcome. Observe whether sending code respects expiry and preferences instead of retrying indefinitely.

​

Run a compact incident triage

Start with the person's symptom and last successful step. “No alert arrived” has a different path from “The alert appeared, but tapping opened home.” Capture message ID, app version, platform, time, expected screen and actual screen. Mask private fields in screenshots. Check if an existing incident affects an entire release or region before diagnosing a single installation.

​

If acceptance is healthy and notifications open a generic page, inspect current association files and app route versions. Compare what the campaign stored with what the app actually received. If only an expired or ineligible cohort is affected, inspect the fallback copy and current offer rules. A temporary campaign stop protects unsent recipients while the team fixes the destination. Record which provider handoffs already occurred so support can give a truthful account of what may still appear.

​

Why did a notification arrive after the offer ended? Examine the send time, the provider's expiration settings and the device's offline period. Independently check the landing page. Even a message delivered on time can stay in the tray until after the offer ends.

​

Does the app need a web fallback if almost everyone has it installed? Include one where the route may open in a browser, the installed version cannot handle it, or somebody views the link outside the app. The fallback should show safe equivalent terms or explain the limitation.

​

Can a push identifier redeem a private offer? Use it to find the message or offer. Check the authenticated account and current terms at redemption. Duplicate taps and a copied link should never confer eligibility.

​

Can the team guarantee that every accepted send was displayed? Treat a provider acceptance as its own event. Check what display or delivery telemetry is observable on that platform before drawing a broader conclusion.

​

Should a failed send retry immediately? The correct behavior depends on whether the error is temporary and whether the offer still has value. Reuse the logical message ID, reconsider current preferences and stop when the campaign or notification expires.

​

Technical references

A successful test ends on the intended screen with accurate terms under the intended account. A report that stops at the transport acknowledgment misses the part of delivery the person actually experiences.

Did this answer your question?