# Loyalty Lion

## Connection <a href="#connect" id="connect"></a>

When you're setting up your first workflow with [LoyaltyLion](https://loyaltylion.com/), you'll need to create a connection through MESA's LoyaltyLion app integration.

Click Connect with Loyalty Lion to begin this process.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F6lYpBFd9xgnnRLi0hcjG%2Fimage.png?alt=media&#x26;token=9fad2742-d3b8-43ca-8501-21b5be61e15e" alt=""><figcaption></figcaption></figure>

In order to authorize the MESA application, you will need to log into your LoyaltyLion account.

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-2e6bf03e7033c939483bb5d3522f05654a2362d5%2Ffile-yqak7ba5rc.png?alt=media)

Next, accept the MESA app permissions by clicking Authorize.

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-170b77e658527823e71f6cdcf8b9dafe76024a78%2Ffile-bbyzcxgj3n.jpg?alt=media)

Now your LoyaltyLion connection has been created.

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FlKNsPip5GQsTo7gIlTY7%2FAS-LOYALTYLION-AUTH.png?alt=media\&token=ca41cf7b-0790-4392-a7b2-31ef933172e9)

### Configure <a href="#configuring" id="configuring"></a>

#### Add Points to a Customer <a href="#add-points" id="add-points"></a>

In order to add points to a customer, you will often first need to locate a customer's Merchant Id. This can normally be found via the LoyaltyLion Get List of Customers action, using the More Options parameter option to search your LoyaltyLion customers by email.

Use the format "email={{variable}}" where {{variable}} would be a customer email found using the [variables menu icon](https://docs.getmesa.com/workflow-builder/fields/variables).

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FdegI67ZEu6D6DNPwXTa9%2FAS-LOYALTYLION-PARAMETERS.png?alt=media\&token=bdedc3e1-07d1-40fe-bc44-a62c45217ee6)

Then, on the LoyaltyLion Add Points Customer action, use the [variables menu icon](https://docs.getmesa.com/workflow-builder/fields/variables) to select the customer's Merchant Id from the LoyaltyLion List Customer step for the action's configuration.

#### Send data to LoyaltyLion <a href="#data" id="data"></a>

In some of the [LoyaltyLion Actions](https://docs.getmesa.com/workflow-builder/actions), there may be a Data Mapping section. If you are not familiar with what data to send, you can click on the [Variables menu icon {+}](https://docs.getmesa.com/workflow-builder/fields/variables) within the Key field and the available variables will appear on the right hand side bar.

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fp3Nmb1eav30wP5CjTsur%2FAS-LOYALTYLION-MERCHID.png?alt=media\&token=2611529e-f389-4549-8155-d9fe2c94015e)

### Triggers <a href="#triggers" id="triggers"></a>

There may be a delay of a couple minutes from when a change is made in LoyaltyLion to when it is received by MESA. This is the normal behavior of the [LoyaltyLion](https://loyaltylion.com/) API.
