You can now access total order counts and detailed store credit breakdowns across multiple currencies, allowing for a more personalized customer account experience.
Customer Data Properties
These properties provide high-level metrics for the customer’s history and total credit standing.
Property | Type | Description |
customer.total_orders | Integer | The total lifetime order count for the customer. |
customer.total_spent | Integer | The total amount (in cents) the customer has spent on all orders. |
customer.store_credit | Integer | The total credit balance across all accounts (in cents). |
customer.store_credit_currency | String | The primary currency code for the total balance (e.g., "USD"). |
customer.store_credit_accounts
| Array | A list of all individual store credit accounts held by the customer. |
Store Credit Account Attributes
Since customers may hold credit in multiple currencies (common for international brands), use the store_credit_accounts array to display a granular breakdown. Each account object contains:
amount (Integer): The credit amount available in that specific account (in cents).
currency (String): The ISO currency code for the account (e.g., "EUR", "CAD", "GBP").
Best Practices
Currency Formatting: Always use the
| moneyfilter to ensure cents are converted to the correct decimal format for the UI.Conditional Rendering: Wrap store credit displays in an
if customer.store_credit > 0block to keep the interface clean for customers with no balance.Customer.total_spent: In Shopify's Liquid engine, this value is returned in cents (or the smallest currency unit), so it almost always requires the | money filter to be human-readable.
Technical Note: The customer.store_credit total is an aggregate value. If your store supports multiple currencies, this total is typically calculated based on your shop's primary currency exchange rate at the time of viewing.