# Notification triggers

> Exactly when each notification rule fires, which ones repeat and which only happen once, and the settings each trigger needs.

A trigger is the event that sends a notification. This page explains when each trigger fires, how often it can repeat, and what it needs. Every trigger only reaches customers who have your pass in Apple Wallet or Google Wallet.

Any rule except the system ones can be limited to one card with **Loyalty card (optional)**. Leave it on **All cards** to cover every card.

## System triggers

These two come with every store and are available on every plan. You can change their message or switch them off, but you can't delete them.

### Stamp earned

**When a customer earns a stamp.** Fires whenever the stamp count on a customer's card goes up: a scan at the counter, a stamp from a POS integration, a referral reward, or a manual change with **Skip notifications** unticked.

Default message: "You now have {{ customer_card.stamps_count }} stamps!"

### Stamp redeemed

**When a customer redeems stamps for a reward.** Fires whenever the stamp count on a card goes down. That's usually a redemption, but it also includes lowering the count by hand with **Skip notifications** unticked.

Default message: "You redeemed a reward! You have {{ customer_card.stamps_count }} stamps remaining."

## Location-based

**When a customer is near one of your locations.** Shows your message on the lock screen of an iPhone when the customer is close to a store location. Available on every plan. It works quite differently from the other triggers, so it has its own page: [location-based notifications](https://docs.getleal.com/notifications/location-based-notifications).

## Automated triggers (Pro)

These need the Pro plan. On the Free plan they show as "(Pro plan only)" in the trigger menu.

### Welcome

**When a customer earns their first stamp.** Fires on the first stamp a customer gets on a card by scanning. Welcome stamps the card gives at signup don't count, so this really is "first visit".

Fires once per card.

### Stamps milestone

**When a customer reaches a set number of stamps.** Set the number in **Stamp milestone**. The rule fires when the count on a card goes from below that number to that number or more.

Fires once per card for each milestone, **ever**. If a customer redeems a reward and later climbs back past the same number, they don't get it again.

### Reward available

**When a customer can redeem a reward.** Fires when the count on a card reaches the stamps needed for one of the card's active rewards. If a single stamp reaches more than one reward, it fires for each.

This is the only trigger that can use the `{{ reward.name }}` and `{{ reward.stamps_required }}` variables.

Fires once per card for each reward, **ever**. A customer who redeems and fills the card again won't be told a second time.

### Birthday

**On the customer's birthday.** Leal checks once a day for customers whose birthday is today. The customer needs a birthday saved on their profile, an active card and the pass installed.

Fires once per customer per birthday.

### Inactivity

**When a customer hasn't scanned in a set number of days.** Set the number in **Days of inactivity**. Leal checks once a day for customers whose last scan on a card was longer ago than that.

- Only customers who have scanned at least once are included. Someone who signed up and never came in won't get it.
- It's sent once per quiet spell. After they get it, they won't get it again until they come back, scan, and then go quiet again.
- Any refresh of the pass restarts the countdown. That includes a manual stamp change, and changes that refresh every customer's pass, such as editing your card's design.

### Stamps streak

**When a customer scans on a set number of days in a row.** Set the number in **Consecutive days** (at least 2). The streak counts calendar days with at least one scan, up to and including today.

It fires on the scan that reaches the streak, and then again on each further day the streak continues, at most once a day. If you set 3 days, a customer who comes in 5 days running hears from you on days 3, 4 and 5.

## Quick reference

| Trigger | Plan | Setting | How often |
| ------- | ---- | ------- | --------- |
| **Stamp earned** | All | None | Every stamp |
| **Stamp redeemed** | All | None | Every redemption or decrease |
| **Location-based** | All | **Location**, reward option | Whenever the phone is nearby |
| **Welcome** | Pro | None | Once per card |
| **Stamps milestone** | Pro | **Stamp milestone** | Once per card per milestone |
| **Reward available** | Pro | None | Once per card per reward |
| **Birthday** | Pro | None | Once a year |
| **Inactivity** | Pro | **Days of inactivity** | Once per quiet spell |
| **Stamps streak** | Pro | **Consecutive days** | Daily while the streak lasts |

## Which message wins

If an automated trigger fires for a stamp, the system **Stamp earned** or **Stamp redeemed** message isn't sent for that same stamp. If two rules fire at once, the customer sees the newest one on their pass. See [how wallet notifications work](https://docs.getleal.com/notifications/how-wallet-notifications-work).
