> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.loveloyalty.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Shopify Flow integration


### Overview

Shopify Flow is a Free app developed by Shopify that you can use to create automated workflows within Shopify. You can use our loyalty program Shopify Flow triggers to send emails, add tags to loyalty members and more.

If you haven't used Shopify Flow yet you should read this quick intro about it: [https://help.shopify.com/en/manual/shopify-flow](https://help.shopify.com/en/manual/shopify-flow)

### Available Shopify Flow triggers

We have 4 Shopify Flow triggers:

* **Loyalty points earned:** Sent when a customer earns loyalty points
* **Loyalty points redeemed:** Sent when the customer redeems a reward
* **7-day point expiry reminder:** Sent 7 days before the customer's loyalty points will expire
* **7-day birthday reminder:** Sent 7 days before the customer's birthday

You can use these triggers to start an automated workflow in Shopify Flow app and perform an action like sending a marketing email or adding a tag to a customer.

### Available variables

When creating a workflow you can use variables (like loyalty point balance, points earned etc.) in Conditions and Actions which depend on the trigger you're using.

**Loyalty point balance**

| Available in every workflow that starts with a trigger related to a customer (eg.: order created, loyalty points earned etc.).

This variable is the number points the customer currently has. 

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select "Customer" in the Shopify API section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/51-flow-customer_r9fftm.png)
2. Then from the list select "metafield"

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/52-flow-customer-metafield_70y3s4.png)
3. From the metafield picker select "Loyalty Program Points"

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/53-flow-customer-metafield-pic_q3j1o8.png)
4. Click add variable and select "value" when prompted

**Loyalty points earned**

|| Only available in workflows that start with the "Loyalty points earned" trigger.

This variable is the number of points the customer earned for a given action (eg.: placing an order, signing up)

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "pointsEarned" variable in the Trigger variables section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/54-flow-pointsearned_imjqyt.png)
**Earning rule name**

|| Only available in workflows that start with the "Loyalty points earned" trigger.

This variable is the name of the earning rule the customer received points for.

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "pointsEarned" variable in the Trigger variables section
 ****

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/55-flow-rulename_1ip9im5.png)

**Loyalty points redeemed**

|| Only available in workflows that start with the "Loyalty points redeemed" trigger.

This variable is the number of points the customer redeemed a reward for.

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "pointsRedeemed" variable in the Trigger variables section
 ****

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/56-flow-pointsredeemed_hz847l.png)****

**Redeem rule name**

|| Only available in workflows that start with the "Loyalty points redeemed" trigger.

This variable is the name of the reward the customer redeemed (eg.: $5 off discount)

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "ruleName" variable in the Trigger variables section
 ****

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/57-flow-rulename_u6m14c.png)****

**Discount code**

|| Only available in workflows that start with the "Loyalty points redeemed" trigger.

This variable is the discount code of the reward the customer redeemed (eg.: LOV-erkjgwe34)

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "discountCode" variable in the Trigger variables section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/58-flow-discountcode_c30nn1.png)

**Discount amount**

|| Only available in workflows that start with the "Loyalty points redeemed" trigger.

This variable is the amount of the discount the customer redeemed (eg.: 5 if they redeemed $5 off discount)

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "discountAmount" variable in the Trigger variables section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/59-flow-discountamount_1g56ryj.png)

**Point expiry date**

|| Only available in workflows that start with the "7-day point expiry reminder" trigger.

This variable is the date when the customer's points will expire.

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select the "expiryDate" variable in the Trigger variables section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/510-flow-pointexpiry_2vu8oz.png)

**Customer's birthday**

| Available in every workflow that starts with a trigger related to a customer (eg.: order created, loyalty points earned etc.).

This variable is the birthday date the customer provided if the birthday point earning rule is set up. The format of the birthday is MM-DD.

Follow these steps to use this variable in an Action or Condition:

1. From the variable picker select "Customer" in the Shopify API section

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/51-flow-customer_1ndg4c.png)
2. Then from the list select "metafield"

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/52-flow-customer-metafield_1oqjpvt.png)
3. From the metafield picker select "Loyalty Program Birthday"

![](https://storage.crisp.chat/users/helpdesk/website/b25595fb53cf680/511-flow-customer-metafield-pi_zt4z6g.png)
4. Click add variable and select "value" when prompted
