# Email Shortcodes

## Introduction:

Email shortcodes are special placeholders that WPLoyalty replaces with real customer and loyalty program data when sending emails. By using these shortcodes, you can automatically display information such as the customer’s points balance, campaign details, earned rewards, and expiry dates — without manually updating each email.

{% hint style="info" %}
Make sure you have already installed and activated the WPLoyalty plugin. Please note that some of the features explained in this doc are available only in the PRO version. Do More with the PRO Version

[Get WPLoyalty PRO](https://wployalty.net/pricing/)
{% endhint %}

### List of Emails

WPLoyalty shortcodes can be used in the following email types. Each email type supports its own set of shortcodes, allowing you to display the most relevant customer and loyalty program details:

* Points Earned Email
* Reward Earned Email
* Reward Expiry Notification
* Point Expiry Notification
* Birthday Email Notification
* Level Achievement Notification

### Points Earned Email

**Triggered when:** A customer earns points for completing an action (e.g., placing an order, completing a campaign action).

| Shortcode                         | Description                            |
| --------------------------------- | -------------------------------------- |
| `{wlr_referral_url}`              | Display referral URL                   |
| `{wlr_user_point}`                | Display current customer point balance |
| `{wlr_total_earned_point}`        | Display total earned points            |
| `{wlr_used_point}`                | Display used points                    |
| `{wlr_user_name}`                 | Display customer name                  |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page    |
| `{wlr_store_name}`                | Display site/store name                |
| `{wlr_campaign_name}`             | Display campaign name                  |
| `{wlr_action_name}`               | Display campaign type/action           |
| `{wlr_earn_point}`                | Display points earned in this event    |
| `{wlr_order_id}`                  | Display order ID                       |

### Reward Earned Email

**Triggered when:** A customer earns a reward such as a coupon or benefit.

| Shortcode                         | Description                            |
| --------------------------------- | -------------------------------------- |
| `{wlr_referral_url}`              | Display referral URL                   |
| `{wlr_user_point}`                | Display current customer point balance |
| `{wlr_total_earned_point}`        | Display total earned points            |
| `{wlr_used_point}`                | Display used points                    |
| `{wlr_user_name}`                 | Display customer name                  |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page    |
| `{wlr_store_name}`                | Display site/store name                |
| `{wlr_campaign_name}`             | Display campaign name                  |
| `{wlr_action_name}`               | Display campaign type/action           |
| `{wlr_earn_reward}`               | Display earned reward                  |
| `{wlr_order_id}`                  | Display order ID                       |

### Reward Expiry Notification

**Triggered when:** A customer’s reward is about to expire.

| Shortcode                         | Description                            |
| --------------------------------- | -------------------------------------- |
| `{wlr_referral_url}`              | Display referral URL                   |
| `{wlr_user_point}`                | Display current customer point balance |
| `{wlr_total_earned_point}`        | Display total earned points            |
| `{wlr_used_point}`                | Display used points                    |
| `{wlr_user_name}`                 | Display customer name                  |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page    |
| `{wlr_store_name}`                | Display site/store name                |
| `{wlr_reward_name}`               | Display expiring reward name           |
| `{wlr_expiry_redeem_url}`         | Display redeem URL for expiring reward |
| `{wlr_expiry_date}`               | Display reward expiry date             |

### Point Expiry Notification

**Triggered when:** A customer’s points are about to expire.

| Shortcode                         | Description                            |
| --------------------------------- | -------------------------------------- |
| `{wlr_referral_url}`              | Display referral URL                   |
| `{wlr_user_point}`                | Display current customer point balance |
| `{wlr_total_earned_point}`        | Display total earned points            |
| `{wlr_used_point}`                | Display used points                    |
| `{wlr_user_name}`                 | Display customer name                  |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page    |
| `{wlr_store_name}`                | Display site/store name                |
| `{wlr_expiry_date}`               | Display points expiry date             |
| `{wlr_expiry_points}`             | Display expiring points amount         |
| `{wlr_points_label}`              | Display point label                    |
| `{wlr_shop_url}`                  | Display shop URL                       |

### Birthday Email Notification

**Triggered when:** Sending birthday wishes to a customer along with birthday points or a reward.

| Shortcode                         | Description                                                  |
| --------------------------------- | ------------------------------------------------------------ |
| `{wlr_referral_url}`              | Display referral URL                                         |
| `{wlr_user_point}`                | Display current customer point balance                       |
| `{wlr_total_earned_point}`        | Display total earned points                                  |
| `{wlr_used_point}`                | Display used points                                          |
| `{wlr_user_name}`                 | Display customer name                                        |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page                          |
| `{wlr_store_name}`                | Display site/store name                                      |
| `{wlr_campaign_name}`             | Display campaign name                                        |
| `{wlr_earn_point}`                | Display earned points                                        |
| `{wlr_earn_reward}`               | Display earned reward                                        |
| `{wlr_earn_point_or_reward}`      | Display earned points with label or earned reward with label |
| `{wlr_shop_url}`                  | Display shop URL                                             |

### Level Achievement Notification

**Triggered when:** A customer achieves a new loyalty level.

| Shortcode                         | Description                            |
| --------------------------------- | -------------------------------------- |
| `{wlr_referral_url}`              | Display referral URL                   |
| `{wlr_user_point}`                | Display current customer point balance |
| `{wlr_total_earned_point}`        | Display total earned points            |
| `{wlr_used_point}`                | Display used points                    |
| `{wlr_user_name}`                 | Display customer name                  |
| `{wlr_customer_reward_page_link}` | Link to the customer’s rewards page    |
| `{wlr_store_name}`                | Display site/store name                |
| `{wlr_level_name}`                | Display achieved level name            |

Some of this will require WPLoyalty PRO

[Get WPLoyalty PRO](https://wployalty.net/pricing/)

**Still unclear?** Please submit a [support request](https://wployalty.net/support/). We are always happy to assist you :)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wployalty.net/settings/email-shortcodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
