Lantern
Liquid API

is_eligible

Check if a customer is eligible to participate in the loyalty program.

Syntax

customer.metafields.lantern.is_eligible

Description

The is_eligible metafield indicates whether a customer is eligible to participate in the loyalty program. This boolean value determines if the customer can earn points, advance through tiers, and redeem rewards. Eligibility can be affected by factors such as account status, geographic location, or program-specific criteria.

Customers who are not eligible for the loyalty program will have most other loyalty metafields return null values.

Properties

Type: Boolean Namespace: lantern Auto-updated: Yes

Return Values

ScenarioValueType
Eligible for loyalty programtrueBoolean
Not eligible for loyalty programfalseBoolean
Eligibility not determinednullnull
Logged outnullnull

Examples

Basic Eligibility Check

{% assign is_eligible = customer.metafields.lantern.is_eligible %}
{% if is_eligible %}
  <div class="loyalty-welcome">
    <h3>Welcome to our Loyalty Program! 🎉</h3>
    <p>Start earning points with every purchase.</p>
  </div>
{% elsif is_eligible == false %}
  <div class="loyalty-ineligible">
    <p>Loyalty program not available in your region.</p>
  </div>
{% endif %}