Liquid API
is_referred
Check if a customer joined through a referral link or code.
Syntax
customer.metafields.lantern.is_referredDescription
The is_referred metafield indicates whether a customer originally joined through a referral link or code from another customer. This status is set when the customer first signs up and completes their initial purchase through a referral, and it remains true for the lifetime of the account.
Referred status is permanent once earned and can be used for lifetime customer segmentation and analytics.
Properties
Type: Boolean
Namespace: lantern
Auto-updated: Yes
Return Values
| Scenario | Value | Type |
|---|---|---|
| Customer was referred | true | Boolean |
| Customer was not referred | false | Boolean |
| Status not determined | null | null |
| Logged out | null | null |
Examples
Basic Referred Status
{% assign is_referred = customer.metafields.lantern.is_referred %}
{% if is_referred %}
<div class="referred-welcome">
<h4>Welcome, Referred Customer! 👥</h4>
<p>Thanks for joining through a friend's recommendation!</p>
</div>
{% endif %}