> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
> Use this file to discover all available pages before exploring further.

# How Do I Send Real-Time Notifications for Referrals?

> Notify your customers upon a successful referral using Gameball's real-time notifications.

Available for all Gameball customers except for free packages

When a customer refers a friend they will want to know if their referral was completed. It is important to notify your customer instantaneously with a message that tells them their referral was successful. You might also want to send a notification when they receive a reward for that successful referral.

***

## How to Create Real-Time Notifications for Referrals

<Steps>
  <Step title="Navigate to Referral Notifications">
    In the **Gameball Admin Dashboard**, from the left bar, click **Notifications**. Choose between **In-App, Emails, & SMS**. Scroll to **Referrals** and select between **Successful Referral** and **Referred Friend Achievement**.

    <Frame>
      <img src="https://mintcdn.com/gameball/0izDrUbnPHPlIUcS/images/product-docs/instant-notifications/real-time-notifications-per-program/referrals-navigation.png?fit=max&auto=format&n=0izDrUbnPHPlIUcS&q=85&s=9a592a294eebd496bc5589566e279b03" alt="Referrals navigation" width="3082" height="1680" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/referrals-navigation.png" />
    </Frame>
  </Step>

  <Step title="Write the Notification Message">
    Construct a heading and a body for the notification. In case you are creating an email notification, write a clear subject line and body. [Learn how to write an email notification](/product-documentation/instant-notifications/email-notifications/sending-achievement-emails).
  </Step>

  <Step title="Configure the Notification Script">
    Add your message script for each referral notification type:

    <AccordionGroup>
      <Accordion title="Successful Referral Message" icon="check-circle">
        Send real-time transaction notifications for every successful referral. Inform your customer when the friend they referred has completed the required action.
      </Accordion>

      <Accordion title="Referred Friend Achievement Message" icon="gift">
        If you reward your customers when their referral attempt becomes successful, ensure that your customer receives a real-time notification informing them that they have received an award due to their successful referral attempt.
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Add Script Variables">
    To send more personalized, relevant, and clear notifications, add variables in between your messages by clicking the **+ icon**.

    <Frame>
      <img src="https://mintcdn.com/gameball/0izDrUbnPHPlIUcS/images/product-docs/instant-notifications/real-time-notifications-per-program/script-variables-referral.png?fit=max&auto=format&n=0izDrUbnPHPlIUcS&q=85&s=cc5d17612f86f567e7a53840ef39e110" alt="Script variables" width="2500" height="1180" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/script-variables-referral.png" />
    </Frame>

    You can use variables in the scripts like the ones below:

    * **Customer Variables:** First Name, Display Name, Customer's Email, Referral Link, Mobile Referral Link, Points Earned, Tier-up Progress, Points, Points Before, Tier Up total progress, Total Friends Referred.
    * **Referral Variables:** Equivalent value of total points, Equivalent value of earned points, Currency, Points Name, Referral Link, Mobile Referral Link.
  </Step>

  <Step title="Preview and Update Notification Icon">
    Before activating the notification, click **Preview** on the top right of the edit page to see what the notification will look like for customers.

    <Frame>
      <img src="https://mintcdn.com/gameball/7dwj4uKg5t78O1BR/images/product-docs/instant-notifications/real-time-notifications-per-program/preview-notification-referral.png?fit=max&auto=format&n=7dwj4uKg5t78O1BR&q=85&s=6cc1dfa4c051a7512200e377957d54c3" alt="Preview notification" width="2010" height="844" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/preview-notification-referral.png" />
    </Frame>

    You can edit the notification icon by choosing **Upload Icon**, then click **Upload Icon**.

    <Frame>
      <img src="https://mintcdn.com/gameball/0izDrUbnPHPlIUcS/images/product-docs/instant-notifications/real-time-notifications-per-program/upload-icon-dialog-referral.png?fit=max&auto=format&n=0izDrUbnPHPlIUcS&q=85&s=b1bf6ef99de069c359a2db30b1ae0b0f" alt="Upload icon dialog" width="2538" height="1494" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/upload-icon-dialog-referral.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/gameball/7dwj4uKg5t78O1BR/images/product-docs/instant-notifications/real-time-notifications-per-program/notification-icon-preview-referral.png?fit=max&auto=format&n=7dwj4uKg5t78O1BR&q=85&s=d5272a22205837d7dcf78d3d1c2333af" alt="Notification icon preview" width="1133" height="650" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/notification-icon-preview-referral.png" />
    </Frame>

    Click **Update** from the bottom right.
  </Step>

  <Step title="Activate the Notification">
    Enable or disable the notification through the **Active Toggle**.

    <Frame>
      <img src="https://mintcdn.com/gameball/7dwj4uKg5t78O1BR/images/product-docs/instant-notifications/real-time-notifications-per-program/active-toggle-referral.png?fit=max&auto=format&n=7dwj4uKg5t78O1BR&q=85&s=94f0ad0e7b2b5d1515e83eec0284a376" alt="Active toggle" width="2458" height="1026" data-path="images/product-docs/instant-notifications/real-time-notifications-per-program/active-toggle-referral.png" />
    </Frame>

    <Note>
      Do not forget to click on "**Save**" before you exit.
    </Note>
  </Step>
</Steps>

***

## Related Articles

<CardGroup cols={2}>
  <Card title="Send Real-Time Notifications for Tiers" icon="layer-group" href="/product-documentation/instant-notifications/real-time-notifications-per-program/tier-notifications">
    Notify customers when they level up to a new tier in your loyalty program.
  </Card>

  <Card title="Send Real-Time Notifications for Reward Campaigns" icon="trophy" href="/product-documentation/instant-notifications/real-time-notifications-per-program/reward-campaign-notifications">
    Keep customers informed of reward campaign unlocks, progress, and achievements.
  </Card>

  <Card title="Send Real-Time Notifications for Cashback" icon="money-bill-wave" href="/product-documentation/instant-notifications/real-time-notifications-per-program/cashback-notifications">
    Notify customers of cashback rewards earned or canceled for their transactions.
  </Card>

  <Card title="Send Real-Time Notifications for Transactional Rewards" icon="coins" href="/product-documentation/instant-notifications/real-time-notifications-per-program/transactional-rewards-notifications">
    Notify customers about points redemption, refunds, and expiry events.
  </Card>

  <Card title="Sending Customers Emails Celebrating Achievements" icon="envelope" href="/product-documentation/instant-notifications/email-notifications/sending-achievement-emails">
    Send achievement emails to drive customers back to your platform.
  </Card>
</CardGroup>
