Introduction

 

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

The Loyalty Tiers API allows you to create a levels-based program that assigns loyalty accounts to different tiers based on the amount of points they have earned.

With the Loyalty Tiers API, you can:

  • Create and update individual tiers.
  • Update settings that apply globally to the tiers program.

For more information about loyalty tiers, see Adding Tiers to Your Loyalty Program.

To use the Loyalty Tiers API, import { tiers } from the wix-loyalty.v2 module.

Copy
1

Before you begin

It's important to note the following points before starting to code:

  • The site must have a Business VIP Premium Plan or a Scale Premium Plan to add tiers.
  • The site must have at least one of these apps: Wix Bookings, Wix Events, Wix Pricing Plans, or Wix Stores.

    Note: Currently, tiers cannot be added to Wix Restaurants loyalty programs.

  • The tiers program status must be manually set to ACTIVE. Use updateTiersProgramSettings() to update the status or enable tiers from a site owner's dashboard.
  • The Loyalty Tiers API does not handle rules for earning points based on your tier. A site owner may adjust those settings from their dashboard. See Assign ways to earn to each tier.

Terminology

  • Tiers program settings: Settings that apply globally to the overall tiers program.
  • Base tier: A default tier for any loyalty account that is unassigned for not meeting the required points threshold of any other tier. The base tier requires 0 points, has no tierId, and is not returned as a tier when listTiers() is called. When a tiers program status is PAUSED or DISABLED all of the loyalty accounts are assigned to the base tier.
  • Rolling window: Period of time used to calculate loyalty points for tier assignment. The total points earned and adjusted during this period determine if the account meets a tier's required point threshold. The window is recalculated every 15 minutes or if a new tier event triggers.
  • Points earned and adjusted: Tier assignment is based on the total amount of loyalty points earned and adjusted over the period of time in a rollingWindow. If an account redeems points during that period, the points that were earned still count towards tier assignment even if that leaves the remaining points balance below the tier's required point threshold. Similarly, if the current points balance for a loyalty account is above a tier's required points threshold, but those points were earned in a time period earlier than the rollingWindow then those points are not considered for tier assignment.
Was this helpful?
Yes
No