Home

Birthday Reward Program Metaobject

The Birthday Reward Program metaobject allows you to configure and manage birthday rewards for your customers. This documentation covers how to access and use the metaobject in your Shopify store.

Accessing the Metaobject

To access the Birthday Reward Program metaobject in your Liquid templates, use the following code:


_10
{%- assign birthday_program = shop.metaobjects.app--60169453569--birthday_reward_program.v2 -%}

Available Fields

The Birthday Reward Program metaobject contains the following fields:

Field NameTypeDescription
is_activeBooleanControls whether the birthday reward program is currently active
amountMoneyThe monetary value of the birthday reward
credit_expiry_daysIntegerNumber of days until the birthday credit expires
credit_advance_daysIntegerNumber of days before the birthday when the credit becomes available

Example Usage

Here's a complete example of how to display the Birthday Reward Program settings in your Liquid template:


_27
{%- comment -%} Birthday Reward Program {%- endcomment -%}
_27
{%- assign birthday_program = shop.metaobjects.app--60169453569--birthday_reward_program.v2 -%}
_27
{% if birthday_program %}
_27
<h2>Birthday Reward Program</h2>
_27
<table class="program-table">
_27
<tr>
_27
<th>Setting</th>
_27
<th>Value</th>
_27
</tr>
_27
<tr>
_27
<td>Is Active</td>
_27
<td>{{ birthday_program.is_active }}</td>
_27
</tr>
_27
<tr>
_27
<td>Amount</td>
_27
<td>{{ birthday_program.amount.value | money }}</td>
_27
</tr>
_27
<tr>
_27
<td>Credit Expiry Days</td>
_27
<td>{{ birthday_program.credit_expiry_days }}</td>
_27
</tr>
_27
<tr>
_27
<td>Credit Advance Days</td>
_27
<td>{{ birthday_program.credit_advance_days }}</td>
_27
</tr>
_27
</table>
_27
{% endif %}

Field Details

Field NameTypePurposeUsage
is_activeBooleanControls the overall activation state of the birthday reward programUse this to conditionally enable or disable the entire birthday reward functionality
amountMoneyDefines the reward amount given to customers on their birthday(*)
credit_expiry_daysIntegerNumber of days until the birthday credit expiresUse this to communicate to customers when their birthday reward will expire
credit_advance_daysIntegerNumber of days before the birthday credit becomes availableHelps in setting up early birthday reward distribution for better customer experience

(*) Always use the money filter when displaying this value ( e.g.{{ birthday_program.amount.value | money }} )

Best Practices

  1. Always check if the metaobject exists before accessing its properties:

_10
{% if birthday_program %}
_10
// Your code here
_10
{% endif %}

  1. Use proper money formatting for the amount field:

_10
{{ birthday_program.amount.value | money }}

  1. Consider using the credit_advance_days and credit_expiry_days values to create clear messaging about when rewards become available and expire.