# SMS Templates

> Add the SMS templates you registered on DLT and choose what fills each value

URL: https://docs.lemuai.com/sms/templates

**Note:** **Setup required:** add your DLT entity id and at least one sender in [SMS Setup](https://docs.lemuai.com/sms/setup) first.

**SMS Templates** (**SMS → Templates** in the sidebar) lists the templates you registered on your DLT portal. Journeys and campaigns can only send these templates, because operators reject any text that doesn't match a registered template.

Click **Add template** to add one.

## Template fields

| Field | What to enter |
|---|---|
| Name | A name for you, for example "Order shipped" |
| DLT template id | The template's id from your DLT portal |
| Content type | As registered: **Service implicit**, **Service explicit**, **Transactional** or **Promotional** |
| Registered text | The text exactly as approved, with `{#var#}` where each value goes. **Insert `{#var#}`** adds one at the end |
| What fills each `{#var#}` | One line per `{#var#}`, in order |
| Registered with these senders | The headers this template was registered with. Leave all off to allow any sender of the right type |

### Content types

| Content type | Use it for | Who gets it |
|---|---|---|
| Service implicit | One-time passwords, order, delivery and account updates | Everyone who hasn't unsubscribed from SMS |
| Service explicit | Service messages that need the person's consent | Only contacts who opted in to SMS |
| Transactional | Bank one-time passwords | Everyone who hasn't unsubscribed from SMS |
| Promotional | Offers and marketing | Only contacts who opted in to SMS. Sent from a numeric header |

## Values

Each `{#var#}` is filled when the SMS is sent. Write fixed text or merge tags, for example:

| Value | Example result |
|---|---|
| `{{ contact.first_name \| default("there") }}` | Asha |
| `{{ order.number }}` | #1042 |
| `{{ event.tracking_url }}` | A link from the event that started the journey |
| `{{ offer.welcome.code }}` | A code from the **welcome** [offer head](https://docs.lemuai.com/offers/overview) |

DLT allows **at most 30 characters** in each value once it is filled in. A value that is longer, or a merge tag that fails, stops that SMS (it is skipped, not charged). Line breaks inside a value become spaces.

Links inside values are sent as tracked short links in journeys and campaigns, so you can see clicks. Ask LemuAI support for the link domain to whitelist on DLT.

Journeys and campaigns can replace these values with their own for that send.

## Preview and parts

While you edit, the preview shows the message filled in with a sample contact, its length and how many parts it uses. Text in Hindi or other scripts (or with emoji) is sent as Unicode, which fits 70 characters in a part instead of 160. Each part uses one SMS credit.

## Send a test

Open a template's menu and click **Send a test** to send it to up to 5 Indian mobile numbers with sample values. Test sends skip consent and frequency caps, use no credits, and up to 20 can be sent a day.

## Delete a template

**Delete** hides the template from journeys and campaigns. SMS already sent keep their history.
