updateTiersProgramSettings( )
Updates the global settings of a loyalty tier program.
Description
Use this endpoint to update settings that apply to all of a site's loyalty tiers.
To update tier-specific settings for an individual tier, use
updateTier()
.
By default, the status
of a tiers program is set to "DISABLED"
and must be manually updated to "ACTIVE"
using
this endpoint or through a site owner's dashboard.
Note: The
status
,revision
, androllingWindow
parameters must be passed to update the tiers program settings. ThebaseTierDefinition
fields are not required, however, if you don't pass them they will reset to their default values of empty fields.
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function updateTiersProgramSettings(programSettings: TiersProgramSettings): Promise<UpdateTiersProgramSettingsResponse>
updateTiersProgramSettings Parameters
NAME
TYPE
DESCRIPTION
Settings for the tiers program.
Returns
Return Type:
NAME
TYPE
DESCRIPTION
Updated program settings.
Was this helpful?
updateTiersProgramSettings example
1import { tiers } from 'wix-loyalty.v2';23 async function updateTiersProgramSettings(programSettings) {4 try {5 const result = await tiers.updateTiersProgramSettings(programSettings);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13