> ## Documentation Index
> Fetch the complete documentation index at: https://help-loyalife.xoxoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Push notifications

> Send mobile push notifications via Firebase Cloud Messaging (FCM) which has character limits, delivery signals, and test dispatch.

Push notifications are sent to the **Loyalife mobile app** via **Firebase Cloud Messaging (FCM)**. They appear on the member's device lock screen or notification shade and can open specific in-app screens on tap.

**Provider:** Firebase Cloud Messaging (FCM)

## Requirements

For a member to receive push notifications:

* The Loyalife mobile app must be installed on their device
* The member must be logged in to the app
* The member must have granted notification permissions on their device

If any of these conditions are not met, the notification cannot be delivered.

## Configuration fields

| Field           | Required | Limit          | Notes                                                                                                 |
| --------------- | -------- | -------------- | ----------------------------------------------------------------------------------------------------- |
| Title           | Yes      | 50 characters  | Shown on the lock screen and in the notification shade                                                |
| Body            | Yes      | 120 characters | Notification message; supports `{{variables}}`                                                        |
| Redirect screen | No       | —              | In-app screen that opens when the member taps the notification; sourced from the program's App Config |

## Constraints

| Constraint | Detail                                                                                                           |
| ---------- | ---------------------------------------------------------------------------------------------------------------- |
| No links   | External URLs are not supported in push notifications                                                            |
| No images  | Image attachments are not supported                                                                              |
| Logo       | The icon displayed with the notification is the program's configured logo — it cannot be overridden per template |
| Variables  | Supported in the body field using `{{variable_name}}` syntax                                                     |

## Delivery and success

Loyalife determines delivery outcome based on the FCM response:

| Status      | Meaning                                                                                                        |
| ----------- | -------------------------------------------------------------------------------------------------------------- |
| **Success** | FCM accepted the message and returned no error — the device token is valid and the notification was dispatched |
| **Failed**  | FCM returned an error — the device token is invalid (app uninstalled, user logged out, or token expired)       |

A failed push cannot be recovered — Loyalife does not retry. The member must reinstall the app and log in to receive future push notifications.

<Info>
  FCM does not confirm whether the member actually saw or tapped the notification — only that the message was accepted for delivery. Success means FCM accepted it, not that it was opened.
</Info>

## Previewing and testing

Use **Send Test Notification** to send a live push to a specific member's device:

1. Click **Send Test Notification** in the template editor
2. Enter the member's registered phone number — the system resolves the member
3. Variables in the body appear as fillable fields in the test modal
4. Submit — the FCM message is dispatched immediately

The test sends the notification in real time and is not recorded in the member's delivery log.

## Delivery analytics

Each template's detail view shows push delivery metrics over selectable time windows (7 days, 30 days, 3 months, 6 months):

| Metric     | Description                                    |
| ---------- | ---------------------------------------------- |
| Total sent | Number of push notifications dispatched to FCM |
| Success    | Notifications accepted by FCM (valid token)    |
| Failed     | Notifications rejected by FCM (invalid token)  |

A success/fail pie chart is shown alongside the counts.

***

## Push notifications in campaigns

Push Notification is available as a delivery channel in the **Campaign module** alongside Email, SMS, and WhatsApp. Campaigns can target a member segment and deliver a push notification from any active push template.

**Supported campaign types:** Promotional, Occasion Reward, and Reward to Members.

To use push in a campaign:

1. Create a push notification template in **Engage → Communications**
2. When creating a campaign, select **Push Notification** as a delivery channel
3. Link the push template to the campaign
4. Campaign performance metrics show **Total Sent**, **Success**, and **Failed** counts for push delivery

<Info>
  Push notifications in campaigns are delivered after the campaign cron executes — not immediately on campaign activation.
</Info>

## Troubleshooting

**Push notifications not reaching the member's device.**

* Confirm the member has the Loyalife app installed, is logged in, and has granted notification permissions on their device.
* Check the delivery log on the member's profile (**Account Info → Communications**) for the failure status.
* A Failed status means the FCM token is no longer valid. This happens when the app is uninstalled or the user logs out. The notification cannot be recovered; the member must reinstall and log in.

**FCM is not configured for the program.**

* FCM setup is done during program onboarding. Contact your Loyalife team to verify FCM is configured and the correct Firebase project credentials are linked to your program.
