# Automate Loyalty Program Notifications via WhatsApp

## 1. Setup Loyalty Points Transaction Update Notification to Clients

You can keep your clients informed about their loyalty points transactions automatically. Here's how to set it up:

1. Go to the **Whautomate** app then click the **Automation** menu and select the **Add Rule** button as shown below picture 👇

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FETNIxPPrSRPafRMCTOsq%2Fimage.png?alt=media&#x26;token=1fafc65f-099f-4d2e-8e79-7a1c92a88573" alt=""><figcaption></figcaption></figure>

2. Select the **Create Rules from Scratch** option to continue

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FZMFPWJvS5wz7QDPNoQzj%2Fimage.png?alt=media&#x26;token=734ce025-295e-4d18-b8ea-b1611c6edd4e" alt=""><figcaption></figcaption></figure>

3. Choose the **Loyalty Point Transaction Updates** as a **Trigger 👇**

{% hint style="info" %}
This rule gets triggered when Loyalty points are added, revoked or redeemed.
{% endhint %}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FJA9ms1AYXhxnS09gUGo4%2Fimage.png?alt=media&#x26;token=80ee9e8b-0144-43ca-9b3f-45ee6f371e89" alt=""><figcaption></figcaption></figure>

4. **Add Conditions:** Click **Add Condition** to set specific rules for when notifications should be sent.

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FeukXKo5m9bV22UlCC51e%2Fimage.png?alt=media&#x26;token=6d5bbbc4-9cd7-474c-9fc9-a19d3ef141ca" alt=""><figcaption></figcaption></figure>

5. **Set Up Conditions**
   * Define when notifications should be sent by configuring the condition fields:
     * **Condition Field**: Select ***"Transaction Action"***.
     * **Condition Operator**: Select ***"equals"***.
     * **Condition Type**: Select ***"Add"***.

{% hint style="info" %}
This ensures that when a client makes a purchase or booking (or you make one on behalf of a client), loyalty points will be added, and the notification will be triggered.
{% endhint %}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FsOatVWckkO9ExU8XRL1m%2Fimage.png?alt=media&#x26;token=1102eef8-11d0-43fc-8635-50b372512e23" alt=""><figcaption></figcaption></figure>

#### **6. Select an action**

Choose how you want to notify your client about their loyalty points, such as by **WhatsApp** or **Email.**

For WhatsApp: Eg. I Select a **Send a WhatsApp template message** action and fill in the required details. 👇

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2Fxx1C8qkpZNnY9RmKD37r%2Fimage.png?alt=media&#x26;token=58dd1d1f-e974-4568-a7d7-58dd6c4f1cc9" alt=""><figcaption></figcaption></figure>

(i) **Select a WhatsApp Template Message** Choose the pre-approved WhatsApp message template you want to use for loyalty points notifications.

**(ii)** For example: I have selected the **loyalty\_points\_update(en)** template.

I used the custom message template which was already created and approved by Meta. So first you need to create a new **WhatsApp Message Template**, you can select the **Create New Template** link. This will take us to the template page where we can submit our new template for custom notifications.

{% hint style="info" %}
However, please note that any custom notification settings will be discarded, and we will need to set them up again after our new template is approved.
{% endhint %}

Check this below link on how to create WhatsApp message templates 👇

[**WhatsApp Message Templates**](https://help.whautomate.com/product-guides/integrations/whatsapp-cloud-api/whatsapp-message-templates)

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FEssjKuzf0PakJ8AYqMI6%2Fimage.png?alt=media&#x26;token=32fba46b-7d4d-40c4-b474-613fcbb0755f" alt=""><figcaption></figcaption></figure>

**(iii)** When you enter **(#)** in the Parameter field, a list will pop up. You can choose from the options provided to fill out the parameter details. 👇

**Eg**: #loyalty.pointsChanged = {{loyalty.pointsChanged}}, #loyalty.availablePoints = {{loyalty.availablePoints}}, etc.

**Available Personalisation Variables:**

**Loyalty Program Variables**

{{loyalty.pointsChanged}}, {{loyalty.availablePoints}}, {{loyalty.pointsChangedReason}}, {{loyalty.pointsToRedeemCoupon}}, {{loyalty.couponCode}}

**Client Variables**

{{client.name}}, {{client.preferredName}}, {{client.age}}, {{client.gender}}, {{client.email}}, {{client.phone}}, {{client.calendarSyncURL}}, {{client.photoURL}}, {{client.address}}, {{client.emergencyRelationType}}, {{client.emergencyContactName}}, {{client.emergencyContactPhone}}

**Business Variables**

{{business.name}}, {{business.address}}, {{business.phone}}, {{business.mapDirectionUrl}}, {{business.operatingHours}}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FJFwwjfGlOveb4q3Y9qol%2Fimage.png?alt=media&#x26;token=aa8410cb-637f-4c24-a43d-200b19d7ef63" alt=""><figcaption></figcaption></figure>

7. Once the action is set, Click the **Save** button

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2F9e4wQyFvgMWDo1WwzkvB%2Fimage.png?alt=media&#x26;token=09387ce9-3162-4a89-b13f-1eef41cc9339" alt=""><figcaption></figcaption></figure>

8. **Test the Notification**

* Schedule an appointment, book a class, or create a purchase order to test if the loyalty points notification is triggered as expected.
* Check whether the notification is sent via the chosen channel (e.g., WhatsApp) and contains the correct loyalty points information.

{% hint style="warning" %}
**Important Note**

The loyalty program functions based on the earning method you have configured:

* **Every Amount Spent**: Points are rewarded based on the payment amount.
* **Every Appointment/Order/Class**: Points are rewarded for each booking or purchase.

Ensure your earning method setup aligns with your business goals for accurate results during testing.
{% endhint %}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FeHkgNxA2nh4FZpxyHElz%2Fimage.png?alt=media&#x26;token=a36679ff-a24d-4b91-aa54-695ba1a8ae38" alt=""><figcaption></figcaption></figure>

***

## 2. Set Up Automatic Notifications to Share Loyalty Coupons with Clients

This setup enables you to notify clients automatically when their loyalty points are converted into coupons. Follow these steps to configure automatic coupon sharing:

1. Go to the **Whautomate** app then click the **Automation** menu and select the **Add Rule** button as shown below picture 👇

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FEE0VOxD58cr7itohebMi%2Fimage.png?alt=media&#x26;token=96d95868-af9a-4e4b-9b44-644798c62d8b" alt=""><figcaption></figcaption></figure>

2. Select the **Create Rules from Scratch** option to continue

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FWFfY184lLApjJYs5Pa87%2Fimage.png?alt=media&#x26;token=dcbcaa85-b984-4df4-a7f1-8863c3b8b486" alt=""><figcaption></figcaption></figure>

3. Choose the **Loyalty Point Transaction Updates** as a **Trigger 👇**

{% hint style="info" %}
This rule gets triggered when Loyalty points are added, revoked or redeemed.
{% endhint %}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FI7CaQemp7kXsp9eY69nd%2Fimage.png?alt=media&#x26;token=c72eb2a7-d4fb-4029-9256-aaa38c1c1edb" alt=""><figcaption></figcaption></figure>

4. **Add Conditions:** \
   Click the **Add Condition** button to set specific rules for when notifications should be sent.

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FPAq7i2lBaRpCypEvGbyN%2Fimage.png?alt=media&#x26;token=a26c751f-785e-4758-af87-8b9f2005ae21" alt=""><figcaption></figcaption></figure>

5. **Set Up Conditions**

* Define when notifications should be sent by configuring the condition fields:
  * **Condition Field**: Select ***"Transaction Action"***.
  * **Condition Operator**: Select ***"equals"***.
  * **Condition Type**: Select ***"Redeem"***.

{% hint style="info" %}
This ensures that your clients will be instantly notified whenever their loyalty points are converted into coupons, and the notification will be triggered automatically.
{% endhint %}

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FmrghQ1enaDoyRRJHh2n9%2Fimage.png?alt=media&#x26;token=dee64c1c-5373-4b31-9327-9ab2d0bca377" alt=""><figcaption></figcaption></figure>

6. **Select an Action**

{% hint style="info" %}
**Note:** The action setup process for sharing loyalty coupons with clients is similar to the process for loyalty points transaction updates with clients. If you’ve already set up notifications for loyalty points transaction updates, you can follow the same steps for [coupon sharing](#id-6.-select-an-action).
{% endhint %}

Choose how you want to notify your clients about their redeemed coupons, such as via **WhatsApp** or **Email.**

For WhatsApp: Eg. I Select a **Send a WhatsApp template message** action and fill in the required details. 👇

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FnTNKBRdr8ehd1ATRlMgD%2Fimage.png?alt=media&#x26;token=19f8e523-8f67-4499-bec3-ae5f45f382e2" alt=""><figcaption></figcaption></figure>

**(i) Select a WhatsApp Template Message**

Choose the WhatsApp template message you want to use for the **Share Loyalty Coupons with Clients.**

**(ii)** For example: I have selected the **loyalty\_coupon(en)** template.

I used the custom message template which was already created and approved by Meta.

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FVtK4rpaQ7QhfBtSjFcjO%2Fimage.png?alt=media&#x26;token=4176d88d-4589-42d0-98a7-5d4ff81bd248" alt=""><figcaption></figcaption></figure>

7. Once the action is set, Click the **Save** button.

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2F16QPZ4vER83JSJtZ75ws%2Fimage.png?alt=media&#x26;token=adcc143d-0a2f-4086-ac3b-5e1fafa3d336" alt=""><figcaption></figcaption></figure>

8. **Test the Notification**

* Add a test client and go to their profile > **Loyalty** section. and Add Loyalty points
* Once the client reaches the pre-set loyalty points threshold, the points will automatically be converted into a coupon.
* The coupon will be automatically sent to the test client via the selected notification channel (WhatsApp) for seamless redemption. 👇

<figure><img src="https://810714386-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF8vuadG7OJ1fFdSBZATv%2Fuploads%2FmaTbO1Xr0fgQOvqjEtVJ%2Fimage.png?alt=media&#x26;token=7b8ddf20-9514-4ee8-852f-98e4775f13bb" alt=""><figcaption></figcaption></figure>

This ensures the notification and coupon sharing process is working correctly.
