Articles on: Emails & Integrations

Show points balance in Order Confirmation email

Overview


The order confirmation is the first email a customer reads after they pay. Adding their points there shows the reward while the purchase is still fresh, and the new balance tells them how close they are to the next reward. That gives them a reason to come back and spend the points.


Edit the order confirmation email


The sentence is added by editing Shopify's order confirmation notification. You paste a short snippet into the email, then set two numbers so they match your Place an order earn rule.


  1. In the Shopify admin, go to Settings → Notifications.
  2. Under Customer notifications, click Order confirmation.
  3. Click Edit code.
  4. Paste the snippet below into the email body, where you want the sentence to appear. A good place is just under the thank-you message.
  5. Click Preview, then Save.


The preview uses a sample order, so the balance there is often 0. A real order confirmation shows the customer's current points plus the points from that order.


Add this snippet


{% assign points_value = 1 %}
{% assign dollar_value = 1 %}

{% assign cents_per_step = dollar_value | times: 100 %}
{% assign points_earned = total_price | divided_by: cents_per_step | times: points_value %}

{% assign current_balance = customer.metafields.app--152217321473--loyalty_program.points | plus: 0 %}
{% assign total_balance = current_balance | plus: points_earned %}

<p>You earned {{ points_earned }} points on this order. Your balance is {{ total_balance }} points.</p>


Leave every line as it is except the two numbers at the top. Feel free to change the copy as you wish.


The snippet can be added anywhere in the template but we recommend adding it below the email title:




Set your earn rule


Open Ways to earn and look at your Place an order rule. The snippet has two numbers:


  • points_value is how many points the customer earns
  • dollar_value is how many dollars they need to spend to earn that many points


For a rule of 1 point for every $1 spent, leave both values at 1. For 10 points for every $1 spent, set points_value to 10 and leave dollar_value at 1. For 1 point for every $10 spent, set points_value to 1 and dollar_value to 10.

Updated on: 01/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!