Skip to main content
This example uses Shopify Flow and the Send Smile activity action to automatically award points when a customer places a milestone order.
Feature availability: Shopify Flow actions are available on Essential, Standard, Growth, Plus, and Enterprise plans for merchants using Shopify Flow.

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: 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.
  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, 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