Yotpo: Loyalty
{
campaigns: [
{
completed: false,
description: "Follow us on Instagram for points",
icon: "",
id: "12345",
name: "Follow_on_Instagram",
rewardText: "Earn 100 points",
title: "Follow Us",
type: "CustomActionCampaign",
url: "https://instagram.com/example",
},
{
completed: true,
description: "Refer a friend and both get rewards",
icon: "referral-icon.svg",
id: "67890",
name: "Refer_a_Friend",
rewardText: "Get $10 off",
title: "Share the Love",
type: "ReferralCampaign",
url: "",
},
{
completed: false,
description: "Special reward on your birthday",
icon: "birthday-icon.svg",
id: "11223",
name: "Birthday_Bonus",
rewardText: "Get 2X points",
title: "Birthday Rewards",
type: "BirthdayCampaign",
url: "",
},
],
couponCode: "XXXX",
currentVipTier: {
description: "Bronze tier",
entryDate: "2024-01-01",
expirationDate: "2024-12-31",
name: "Bronze",
},
error: {
couponCode: false,
},
loading: {
loading: {
referral: {
receipts: false,
},
},
redemptionOptions: false,
referral: {
receipts: false,
},
},
nextVipTier: {
description: "Silver tier",
entryThreshold: {
cents: 100,
points: 500,
purchases: 1,
referrals: 0,
requirements: "all_requirements",
},
id: "2",
isCurrent: false,
name: "Silver",
},
redemptionOptions: [
{
description: "Get $10 off your next purchase",
discount: {
amountCents: 1000,
percentage: null,
rateCents: 100,
type: "fixed_amount",
valueCents: null,
},
duration: "30",
id: "reward-001",
name: "$10 Off Your Purchase",
points: 50,
type: "discount_coupon",
},
{
description: "Get 20% off your next purchase",
discount: {
amountCents: null,
percentage: "20",
rateCents: null,
type: "percentage",
valueCents: null,
},
duration: "60",
id: "reward-002",
name: "20% Off Your Purchase",
points: 100,
type: "discount_coupon",
},
],
referral: {
email: "user@nyla.app",
id: 2545885502,
link: "rwrd.io/ref_XIT06R1",
receipts: [
{
email: "referral1@nyla.app",
id: "123",
status: "completed",
},
{
email: "referral2@nyla.app",
id: "124",
status: "pending",
},
],
},
rewardHistory: [
{
action: "Create an account",
action_name: null,
completed_at: "2022-07-22T13:53:21.000Z",
created_at: "2022-07-22T13:53:21.000Z",
date: "2022-07-22",
order_ids: [],
points: 5,
status: "Approved",
},
{
action: "Share the Love",
action_name: "Refer_a_Friend",
completed_at: "2022-07-22T13:53:30.000Z",
created_at: "2022-07-22T13:53:31.000Z",
date: "2022-07-22",
order_ids: [],
points: 10,
status: "Approved",
},
{
action: "Points Expired",
action_name: "manual_adjustment",
completed_at: "2023-07-23T04:02:09.000Z",
created_at: "2023-07-23T04:02:09.000Z",
date: "2023-07-23",
order_ids: [],
points: -5,
status: "Approved",
},
{
action: "Birthday Rewards",
action_name: "Birthday_Bonus",
completed_at: "2023-07-24T04:02:09.000Z",
created_at: "2023-07-24T04:02:09.000Z",
date: "2023-07-24",
order_ids: [],
points: 5,
status: "Approved",
},
],
totalCartPoints: 0,
userBirthday: {},
userPoints: 100,
vipTierActionsCompleted: {
cents: 0,
points: 50,
purchases: 0,
referrals: 0,
},
vipTierRetainRequirements: {
cents: 0,
points: 150,
purchases: 0,
referrals: 0,
},
vipTiers: [
{
description: "Bronze tier",
entryThreshold: {
cents: 0,
points: 200,
purchases: 0,
referrals: 0,
requirements: "all_requirements",
},
id: "1",
isCurrent: true,
name: "Bronze",
},
{
description: "Silver tier",
entryThreshold: {
cents: 100,
points: 500,
purchases: 1,
referrals: 0,
requirements: "all_requirements",
},
id: "2",
isCurrent: false,
name: "Silver",
},
{
description: "Gold tier",
entryThreshold: {
cents: 300,
points: 1000,
purchases: 5,
referrals: 2,
requirements: "all_requirements",
},
id: "3",
isCurrent: false,
name: "Gold",
},
],
vipTierUpgradeRequirements: {
cents: 100,
points: 500,
purchases: 1,
referrals: 0,
},
}
Properties
Available campaigns in the loyalty program
Whether the campaign has been completed by the user
Campaign description
Icon for the campaign
Unique identifier for the campaign
Internal name of the campaign
Text describing the reward
Display title of the campaign
Type of campaign (e.g., CustomActionCampaign, ReferralCampaign)
Associated URL for the campaign
Coupon code for redemption
Current VIP tier information
Description of current tier
Date when customer entered this tier
Date when current tier status expires
Name of current tier
Error states
Error state for coupon code
Loading states for various components
Loading state for redemption options
Loading states for referral-related components
Loading state for referral receipts
Next VIP tier information
Description of the next tier
Requirements to enter the next tier
Spend amount required for next tier
Points required for next tier
Purchases required for next tier
Referrals required for next tier
Type of requirements for next tier
Unique identifier for the next tier
Always false for next tier
Name of the next tier
Available redemption options
Description of the redemption option
Discount details
Fixed discount amount in cents
Percentage discount
Rate in cents
Type of discount
Value in cents
Duration of the redemption validity in days
Unique identifier for the redemption option
Name of the redemption option
Points required for redemption
Type of redemption
Referral program information
Email of the referrer
Referral program ID
Referral link
List of referral receipts
Email of referred person
Receipt ID
Status of the referral
History of reward activities
Type of reward activity
Internal action identifier
Completion timestamp
Creation timestamp
Activity date
Associated order IDs
Points earned or deducted
Status of the reward activity
Total points available from current cart
User's birthday
Current points balance for the user
Progress towards VIP tier requirements
Amount spent in cents towards tier requirements
Points earned towards tier requirements
Number of purchases completed towards tier requirements
Number of referrals completed towards tier requirements
Requirements to retain current VIP tier
Spend amount in cents needed to retain tier
Points needed to retain tier
Number of purchases needed to retain tier
Number of referrals needed to retain tier
Requirements to upgrade to the next VIP tier
Spend amount in cents needed for upgrade
Points needed for upgrade
Number of purchases needed for upgrade
Number of referrals needed for upgrade
Available VIP tiers in the loyalty program
Description of the VIP tier
Requirements to enter this tier
Spend amount in cents required to enter tier
Points required to enter tier
Number of purchases required to enter tier
Number of referrals required to enter tier
Type of requirements (e.g., all_requirements)
Unique identifier for the VIP tier
Whether this is the current tier of the customer
Name of the VIP tier