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

# Smile

# Introduction

[Smile.io](https://smile.io/) is a Loyalty Management Software  *for* businesses that have an online presence. It allows business brands to initiate different referral programs from a single platform and offer various customizable and attractive rewards programs.

# MoEngage × Smile

With the MoEngage and Smile integration, you can capture your customer's activities on MoEngage and forward them to your Smile dashboard so that your users can be rewarded for these activities.

# Integration

<Info>
  * Ensure you have permission to Smile APIs.
  * Ensure you have access to MoEngage Dashboard.
</Info>

## Step 1: Gather your Smile API Key

In order to forward events from MoEngage to Smile, you will need your Smile API Key:

1. On your Smile dashboard, navigate to *Settings* >> *Platforms*.\\
   ![](https://smile-22e33444d303.intercom-attachments-1.com/i/o/208728187/b417b8385a506fdeade83e54/file-45iTCYo3c0.png)
2. At the top, select **Show more** which will reveal your public and private keys.\
   <img src="https://smile-22e33444d303.intercom-attachments-1.com/i/o/208728188/c58a336db5087417436da998/file-KEd7WSM6YD.png" />\\
   ![](https://smile-22e33444d303.intercom-attachments-1.com/i/o/208728192/98b77387efa09d4fb3ee933f/file-Y9FkjPuN6H.png)
3. Authentication to the API is performed via HTTP Bearer Auth. Use your secret key as the bearer value.

## Step 2: Create a connector campaign on MoEngage

To create a connector campaign on MoEngage,

1. Navigate to Create Campaign >> Connectors >> Custom and choose the delivery type most suitable to your needs. In this case, select "Event triggered".

<img src="https://mintcdn.com/moengage/y7-xt66tDwKMqCwN/images/partner_19201619090452.png?fit=max&auto=format&n=y7-xt66tDwKMqCwN&q=85&s=6b85e494ab94d578b14151e6ecc705ba" alt="Screenshot_2022-02-21_at_10.48.46_PM.png" width="1104" height="1238" data-path="images/partner_19201619090452.png" />

Select the Trigger Critera, and your target audience.

2. On step 2 of the campaign:

### Call the Smile API

To forward MoEngage events as an Activity to Smile, use the `POST` method and configure the payload.

* Select the method as POST
* Headers:
  * `Authorization`: `Bearer <your_secret_key>`
  * `Content-Type`: `application/json`
* Add the endpoint as Webhook URL: `https://api.smile.io/v1/activities`
* Body:
  <CodeGroup>
    ```json JSON theme={null}
    {
      "activity": {
        "customer_id": {{UserAttribute['smile_customer_id']}},
        "token": "activity_f57a9b5a8d0ac5",
        "properties": {
            "order_value": {{EventAttribute['order_value']}}
        }
      }
    }
    ```
  </CodeGroup>

<img src="https://mintcdn.com/moengage/y7-xt66tDwKMqCwN/images/partner_19202300616468.png?fit=max&auto=format&n=y7-xt66tDwKMqCwN&q=85&s=fd3057b0709c6208665afa3f37ddf938" alt="" width="2240" height="1384" data-path="images/partner_19202300616468.png" />

* Refer to the [Smile API documentation](https://api-reference.smile.io/#create-an-activity) for more information.

## Preview your request

At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available in Step 2 of Create Connector Campaign.<img src="https://mintcdn.com/moengage/y7-xt66tDwKMqCwN/images/partner_19201588181268.png?fit=max&auto=format&n=y7-xt66tDwKMqCwN&q=85&s=23aa5671a3d9358c7ca7d373429960d2" alt="Screen_Shot_2022-02-22_at_11.12.42_AM.png" width="2464" height="270" data-path="images/partner_19201588181268.png" />

You can go ahead and Publish the campaign.
