Liquid API
birth_date
Access the customer's birth date for personalized experiences and birthday campaigns.
Syntax
customer.metafields.facts.birth_dateDescription
The birth_date metafield contains the customer's birth date in ISO format (YYYY-MM-DD). This data can be used for birthday campaigns, age-based promotions, and personalized experiences.
Birth date uses the facts namespace (not lantern) and follows ISO 8601 date format.
Properties
Type: Date (ISO 8601 String)
Namespace: facts
Return Values
| Scenario | Value | Type |
|---|---|---|
| Birth date provided | Date string (e.g., "1990-05-15") | String |
| No birth date | null | null |
| Logged out | null | null |
Examples
Basic Birthday Display
{% assign birth_date = customer.metafields.facts.birth_date %}
{% if birth_date %}
{% assign birthday = birth_date | date: '%B %d' %}
<p>Birthday: {{ birthday }}</p>
{% endif %}