Search.../

getTiersProgramSettings( )

Developer Preview

Retrieves the settings for the tiers program.

Description

Tiers program settings apply globally to all tiers in the program.

Syntax

function getTiersProgramSettings(): Promise<GetTiersProgramSettingsResponse>

getTiersProgramSettings Parameters

This function does not take any parameters.

Returns

Return Type:

Promise<
GetTiersProgramSettingsResponse
>
NAME
TYPE
DESCRIPTION
programSettings
TiersProgramSettings

Tiers program settings.

vipPlan
boolean

Reserved for internal use.

Was this helpful?

Get tiers program settings

Copy Code
1import { tier } from 'wix-loyalty-backend';
2
3export async function myGetProgramSettingsFunction() {
4 try {
5 const tiersProgramSettings = await tier.getTiersProgramSettings();
6
7 const status = tiersProgramSettings.programSettings.status;
8 const revision = tiersProgramSettings.programSettings.revision;
9
10 console.log('Success! Current status of tiers program: ', status);
11 return tiersProgramSettings;
12 } catch (error) {
13 console.error(error);
14 }
15}