Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
175 lines (150 sloc) 6.95 KB
description
Map external data that tracks loyalty points, rewards, and referrals to the Zaius schema.

Loyalty & Rewards

{% hint style="danger" %} This documentation refers to beta functionality and may be subject to frequent changes. {% endhint %}

Events

To learn more about events, and how to send them to Zaius, refer to the following:

{% page-ref page="../the-basics/events/" %}

Event Type: loyalty

Event Action Fields
points_added previous_loyalty_points_balance
current_loyalty_points_balance
loyalty_change_in_points
points_removed previous_loyalty_points_balance
current_loyalty_points_balance
loyalty_change_in_points
referral_completed loyalty_referral_code_id
loyalty_referred_customer_email
referral_link_shared loyalty_referral_code_id
loyalty_referred_customer_email
tier_earned previous_loyalty_tier_id
current_loyalty_tier_id
tier_lost previous_loyalty_tier_id
current_loyalty_tier_id
yotpo_coupon_awarded

yotpo_redemption_id

yotpo_redemption_option_id

yotpo_perk_id

yotpo_coupon_redeemed

yotpo_redemption_id

yotpo_redemption_option_id

yotpo_perk_id

yotpo_coupon_reminder

yotpo_redemption_option_id

yotpo_points_needed

## Schema

To learn more about creating Objects, Fields and Relationships and then updating newly created schema, refer to the following:

Objects

Object Name Description
Loyalty Tiers (loyalty_tiers) Stores data about available Loyalty Tiers that customers can attain via loyal actions.
Loyalty Referral Codes (loyalty_referral_codes) Stores all available referral codes, metrics on sharing,

Fields

Events (events)

Field Name Type Description
previous_loyalty_tier_id string The ID of the tier that the customer was previously associated with.
current_loyalty_tier_id string The ID of the tier that the customer is now associated with.
previous_loyalty_points_balance number The loyalty points balance of the customer before this event.
current_loyalty_points_balance number The loyalty points balance of the customer after this event.
loyalty_change_in_points number The total change in loyalty points due to this event.
loyalty_referral_code_id string The unique referral code that this event applies to.
loyalty_referred_customer_email string The email of the customer that was referred.

Customers (customers)

To learn more about Customers in Zaius, refer to the following:

{% page-ref page="../the-basics/customers/" %}

Field Name Type Description
loyalty_points_balance number The number of loyalty points that the customer currently has.
loyalty_referral_code_id string The unique Referral Code ID assigned to the customer.
loyalty_tier_id string The ID of the Loyalty Tier that the customer is associated with.
loyalty_profile_created_at ts The date & time that the customer record was created in the connected loyalty app.
loyalty_profile_updated_at ts The date & time that the customer record was last updated in the connected loyalty app.
loyalty_is_enrolled_member boolean If true, the customer is currently enrolled in your loyalty program.

Loyalty Tiers (loyalty_tiers)

Field Name Type Description
loyalty_tier_id string The unique identifier for a Loyalty Tier.
name string The name of the Loyalty Tier.
rank number The numeric rank of this Loyalty tier relative to other Loyalty Tiers.
required_dollar_spend number The amount of dollars required to be spent by a customer to reach this Loyalty Tier.
description string A description of this Loyalty Tier.
required_points number The number of points required to reach this Loyalty Tier.
required_purchases number The number of purchases required to reach this Loyalty Tier.

Loyalty Referral Codes (loyalty_referral_codes)

Field Name Type Description
loyalty_referral_code_id string The unique referral code assigned to a customer.
total_shares number The number of times that this referral code has been shared.
order_conversions_count number The number of orders that have resulted from this referral code.
order_conversions_amount number The dollar amount of the number of orders that have resulted from this referral code.
expiration_ts ts The date & time that the referral code expires, if it does.
is_expired boolean Determines whether or not the referral code is expired.
total_clicks number The total number of clicks of the shared referral code URL.
referral_url string The unique referral code URL.

Relationships

Name Parent Child
loyalty_referral_code events.loyalty_referral_code_id loyalty_referral_codes.loyalty_referral_code_id
previous_loyalty_tier events.previous_loyalty_tier_id loyalty_tiers.loyalty_tier_id
current_loyalty_tier events.current_loyalty_tier_id loyalty_tiers.loyalty_tier_id
loyalty_referral_code customers.loyalty_referral_code_id loyalty_referral_codes.loyalty_referral_code_id
loyalty_tier customers.loyalty_tier_id loyalty_tiers.loyalty_tier_id
You can’t perform that action at this time.