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

# Example: Award bonus points for repeat purchases using Shopify Flow

> Reward customers with bonus points when they reach a specific order milestone, such as their 3rd, 5th, or 10th order.

This example uses Shopify Flow and the **Send Smile activity** action to automatically award points when a customer places a milestone order.

<Check>
  **Feature availability:** Shopify Flow actions are available on **Essential, Standard, Growth, Plus, and Enterprise** plans for merchants using Shopify Flow.
</Check>

## Before you start

This example uses the setup described in **Use Shopify Flow to award points**. This article covers only the Shopify Flow workflow configuration for the repeat-purchase milestone.

Before creating this workflow, you must first:

1. Create a Shopify Flow action in Smile using the **Order paid** trigger.
2. Create an earning action linked to that Flow action.

## How this workflow works

This workflow checks the number of orders a customer has placed.

When a customer reaches the order milestone you specify, Shopify Flow sends a Smile activity and awards the associated points.

For example:

* Award 100 points on a customer's 3rd order.
* Award 250 points on a customer's 5th order.
* Award 500 points on a customer's 10th order.

## Create the workflow

<Tip>
  **Tip:** Smile has ready-made Shopify Flow templates for common loyalty program workflows. Contact the Smile team if you'd like help getting started with templates or best-practice recommendations.
</Tip>

1. From Shopify Admin, go to **Flow**.
2. Click **Create workflow**.
3. Click **Select a trigger**.
4. Select **Order paid**.
5. Click the **+** icon, then choose **Condition**.
6. Click **Add a variable**, then search for `numberOfOrders` .
7. Select `order/customer/numberOfOrders`.
8. Enter the order milestone you want to reward (for example, `5` for a customer's 5th order).
9. For the True branch of the condition, click the **+** icon, then choose **Action**.
10. Select [**Smile.io**](http://Smile.io), then click **Send Smile activity**.
11. Enter the activity type code from your Smile Flow action.
12. In the **Order ID** field, enter: `{{order.id}}`
13. Click **Turn on workflow**.

## Learn more

* [Use Shopify Flow to award points](/en/articles/4036187-use-shopify-flow-to-award-points-with-smile)
* [Understand Shopify Flow and Smile](/en/articles/shopify-flow-and-smile)
