Send a thank you email when a customer places their second order

When a customer pays for their second order, thank them for coming back through your connected sender, in the customer's language, with the customer's first name, the order number and your store's name and address. Only customers subscribed to email marketing get it.

One trigger, a condition and one Send Marketing Email step. The recipient, the language and the variables are already filled in from Flow's data; you only choose the sender and the marketing layout.

The workflow in Shopify Flow: Send a thank you email when a customer places their second order
The complete workflow as it looks in Shopify Flow: trigger, condition on the order count, Send Marketing Email.

What it needs

  • The app installed, with an email sender connected (Email senders overview) and a marketing email layout for this email (Marketing emails and unsubscribes). A thank you with an offer is marketing email: set the layout's Email type to Marketing, because the step only lists marketing layouts.
  • After the import, open the Send Marketing Email step and choose that sender and that layout. The file cannot carry them: they belong to your store.
  • Your company details and the unsubscribe sentence under Settings, tab Marketing emails. The app appends them to every marketing email (Settings).
  • Nothing else: Order paid is a built-in Shopify trigger. The workflow only emails customers subscribed to email marketing, and customers who unsubscribed through the link in an earlier email are skipped automatically.

Get the workflow

  1. Download the .flow file attached at the bottom of this page.
  2. In your Shopify admin open Flow, click Import and choose the file.
  3. Open the Send Marketing Email step, choose the sender and the marketing layout, and save.
  4. Click Turn on workflow.

The file is an export from Shopify Flow itself. Do not edit it by hand; change the workflow in Flow after importing it.

How it works

  1. Order paid starts the workflow when an order is paid in full.
  2. Condition checks two things, and both must be true: order.customer.defaultEmailAddress.marketingState Equal to SUBSCRIBED, and order.customer.numberOfOrders Equal to 2. A first order, a third order or a customer without marketing consent stops here.
  3. Send Marketing Email sends the layout you choose to {{ order.customer.email }}, in the customer's language ({{ order.customer.locale }}), with these variables: customer_name, order_name, shop_name and shop_url. The email carries its own unsubscribe link and your company details in the footer. If the customer unsubscribed through an earlier email, nothing is sent and History shows the event as Skipped.

Build the layout

Greet the customer with Hello {{ variables.customer_name }}, thank them for order {{ variables.order_name }} and link {{ variables.shop_url }} from a button, with a discount code for the next order if you offer one. Set the layout's Email type to Marketing; the unsubscribe link and your company details are added below the layout automatically. Every variable the step sends is read in the layout as {{ variables.name }}; the Use in Shopify Flow card on the layout page lists the ones your layout uses. See Passing data from Shopify Flow.

Make it yours

  • Change the 2 in the condition to 5 or 10 for a loyalty thank you after more orders.
  • Add a Wait step of a few days before the condition so the email arrives after the parcel, not with the payment receipt.
  • Add a condition on order.customer.amountSpent Greater than an amount to thank only your best customers.

Next steps