Lantern
Liquid API

loyalty_spend

Access the current period spending amount for tier progression tracking.

Syntax

customer.metafields.lantern.loyalty_spend

Description

The loyalty_spend metafield contains the customer's spending amount for the current tier period. This value tracks spending toward tier advancement or maintenance and resets based on your loyalty program's tier period configuration (monthly, yearly, or lifetime).

Spend tracking periods vary by loyalty program configuration. Common periods include annual (January-December), rolling 12 months, or lifetime spending.

Properties

Type: Number Namespace: lantern

Return Values

ScenarioValueType
Logged in with spendingSpending amount (e.g., 450.50)Number
Logged in without spending0Number
Not eligible for loyaltynullnull
Logged outnullnull

Examples

Basic Spend Display

{% assign spend = customer.metafields.lantern.loyalty_spend %}
{% if spend != nil %}
  <div class="loyalty-spending">
    <h4>Period Spending</h4>
    <span class="spend-amount">${{ spend | money_without_currency }}</span>
  </div>
{% endif %}