Order Rewards Metafields: Access Order Rewards Data in Liquid
Overview
Order Reward Metafields is a powerful feature that automatically adds reward information to your Shopify order records as metafields. This allows you to access and display store credit reward data in your Liquid templates, making it possible to show reward information in order confirmations, invoices, emails, and other customer communications.
What Are Order Reward Metafields?
When a customer places an order that earns store credit rewards, Redeemly can automatically attach the reward details directly to the order record in Shopify. This data is stored as metafields, which are custom fields that can be accessed through Shopify's Liquid templating language.
How to Enable This Feature
To enable Order Reward Metafields:
- Go to Settings in your Redeemly app
- Scroll down to the Advanced Settings section
- Check the box for "Set rewards data in order metafields"
- Click Save
Once enabled, all future orders that earn store credit rewards will automatically have the reward data attached as metafields.
Available Metafield Properties
When enabled, Redeemly creates the following metafields for each order with store credit rewards:
1. Raw Reward Amount
- Namespace:
redeemly
- Key:
rewarded-credit-amount
- Type:
number_decimal
- Description: The exact numerical amount of store credit earned
- Example Value:
15.50
2. Formatted Reward Amount
- Namespace:
redeemly
- Key:
rewarded-credit-amount-formatted
- Type:
single_line_text_field
- Description: The store credit amount formatted as currency with proper locale formatting
- Example Value:
$15.50
,€15,50
,£15.50
3. Currency Code
- Namespace:
redeemly
- Key:
rewarded-credit-currency
- Type:
single_line_text_field
- Description: The three-letter currency code for the reward
- Example Value:
USD
,EUR
,GBP
How to Use Order Reward Metafields
Accessing in Liquid Templates
You can access these metafields in any Liquid template where the order
object is available:
{% comment %} Check if the order has reward metafields {% endcomment %}
{% if order.metafields["redeemly"]["rewarded-credit-amount-formatted"] %}
<div class="store-credit-earned">
<h4>🎉 You earned store credit!</h4>
<p>
Amount: {{ order.metafields["redeemly"]["rewarded-credit-amount-formatted"] }}
</p>
<p>
This credit will be available in your account and can be used on future purchases.
</p>
</div>
{% endif %}
Important Notes
- Future Orders Only: This feature only affects orders placed after it's enabled
- Reward-Eligible Orders Only: Metafields are only added to orders that actually earn store credit rewards
- No Performance Impact: Metafields don't affect your store's performance and are handled efficiently by Shopify
- Always Available: Once set, metafields remain permanently attached to the order record
Troubleshooting
Q: I enabled the feature but don't see metafields on existing orders
A: The feature only applies to new orders placed after enabling it. Existing orders won't retroactively get metafields.
Q: The metafields aren't showing up in my templates
A: Make sure you're using the correct namespace (redeemly
) and key names. Also ensure the order actually earned rewards.
Q: Can I customize the metafield names or add additional data?
A: Currently, the metafield structure is standardized for consistency. If you need additional customization, please contact support.
Need Help?
If you have questions about implementing Order Reward Metafields in your templates or need assistance with Liquid code, please don't hesitate to reach out to our support team. We're here to help you make the most of your store credit program!
Updated on: 17/09/2025
Thank you!