# Steps and messages

> Add email, SMS and wallet push steps, time them, personalise them with variables, and send a test before your campaign goes out.

The **Steps** tab holds the messages your campaign sends, in order. Each step is one message on one channel. The first step goes out when a customer enters the campaign, and each later step is timed from the one before it. A single welcome email is one step; "welcome email, then a text three days later" is two.

## Add a step

1. Open the campaign's **Steps** tab and click **Add step**.
2. Pick the channel:
   - **Email**: included with your plan. Best for longer news and offers.
   - **SMS**: sent through your own provider. Short, and read almost immediately. You need to connect Twilio or Brevo under [Integrations](https://docs.getleal.com/integrations/sms-and-email-providers) first.
   - **Wallet push**: updates the loyalty pass customers already have installed.
3. Write the message and choose its timing.
4. Save it with **Save email**, **Save text message** or **Save wallet message**.

Use **Move up** and **Move down** to reorder steps, and **Remove** to delete one. Steps can only be added, removed and reordered while the campaign is a draft.

## Timing

Under **Send this step**, choose:

- **Immediately**. For the first step, that means as soon as the campaign is sent (one-time) or as soon as the customer joins it (always live).
- **After a delay**, then a number of **hours**, **days** or **weeks**. For later steps, the delay counts from when the previous step reached this customer, not from when the campaign started.

Every step still waits for the campaign's send window. A step due at 2am waits until the window opens. See [sender settings and send window](https://docs.getleal.com/campaigns/sender-settings#send-window).

## Writing each message

### Email

Fill in the **Subject** and **Email body**. Write the body as plain text: a blank line starts a new paragraph. Leal adds your store logo and card colour automatically, plus a footer saying why the customer is getting the email and an **Unsubscribe** link. Click **Preview** to see the finished email.

### SMS

Write the **Text message**. The preview under **What your customer receives** shows the message for your customer with the longest name, and tells you how many **Segments** it uses. Your provider bills you per segment.

- Standard characters fit 160 to a segment.
- Some characters, such as many emoji and curly quotes, switch the whole message to Unicode, which fits only 70 to a segment. Leal warns you and lists the characters responsible.

Leal doesn't add opt-out wording to text messages for you. Customers can reply STOP to stop your campaign texts, so consider saying so in your message.

### Wallet push

Write the **Wallet message**. It appears on the customer's pass and as a notification, just like a [notification rule](https://docs.getleal.com/notifications/how-wallet-notifications-work). Keep it under 280 characters. The preview uses one of your real customers who has the pass installed.

## Variables

Click **Insert variable**, or type `{{`, to personalise a message.

| Variable | Email | SMS | Wallet push |
| -------- | ----- | --- | ----------- |
| `{{ store.name }}` | Yes | Yes | Yes |
| `{{ customer.first_name }}` | Yes | Yes | Yes |
| `{{ customer.last_name }}` | Yes | Yes | Yes |
| `{{ customer.name }}` | Yes | Yes | Yes |
| `{{ customer.email }}` | Yes | Yes | Yes |
| `{{ customer.phone }}` | Yes | Yes | Yes |
| `{{ card.name }}` | No | No | Yes |
| `{{ card.stamps_required }}` | No | No | Yes |
| `{{ customer_card.stamps_count }}` | No | No | Yes |
| `{{ customer_card.stamps_remaining }}` | No | No | Yes |

Card and stamp variables only work in wallet push steps, because those are sent to a particular card. Variables are filled in just before each message goes out, so a stamp count in step two is up to date, not what it was when the customer joined.

If a variable is written incorrectly, for example with a missing `}}`, Leal won't let you save the message. Use **Insert variable** so variable names are always spelled exactly right.

## Send a test

Each message editor has a test section. Save your message first, because tests use the saved version. Tests are for drafts and need an account admin.

- **Email:** **Send a test** sends the email to your own login email address, with "[Test]" in front of the subject.
- **SMS:** enter a number in **Send a test to**, in international format like +353871234567, and click **Send test**. Your provider charges for it as normal.
- **Wallet push:** choose a **Test recipient** and click **Send test**. The list shows customers in this audience who have the pass installed.

> [!WARNING]
> A wallet test goes to the real customer you pick, and they'll get the notification on their phone. Add yourself as a customer, install your own card, and pick yourself as the test recipient. Test sends don't count in the campaign's results.

## Editing a live campaign

Once a campaign is live you can still edit the words of each message. The change reaches everyone who hasn't been sent that step yet. The steps themselves (how many, which channel, their order and timing) are fixed, so customers part way through aren't left following a sequence that no longer exists. To change them, duplicate the campaign.

## Best practices

- Keep sequences short. Two or three well spaced steps usually say everything.
- Use the channel that suits the message: wallet push for a quick nudge, email for anything with detail, SMS for something time sensitive.
- Read every message on your own phone with a test before going live.
