> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: updateTiersProgramSettings(programSettings: TiersProgramSettings) # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> tiers --> updateTiersProgramSettings # Method Link: https://dev.wix.com/docs/velo/apis/wix-loyalty-v2/tiers/update-tiers-program-settings.md # Method Description: Updates the global settings of a loyalty tier program. Use this method to update settings that apply to all of a site's loyalty tiers. To update tier-specific settings for an individual tier, use Update Tier. By default, the `status` of a tiers program is set to `DISABLED` and must be manually updated to `ACTIVE` using this method or through a Wix user's dashboard. >**Note:** The `status`, `revision`, and `rollingWindow` parameters must be passed to update the tiers program settings. >The `baseTierDefinition` fields aren't required, however, if you don't pass them they reset to >their default values of empty fields. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Update global settings of a loyalty tier program (export from backend code) ```javascript import { tiers } from "wix-loyalty.v2"; import { webMethod, Permissions } from "wix-web-module"; import { elevate } from "wix-auth"; /* Sample programSettings object: * * { * "programSettings": { * "revision": "2", * "status": "PAUSED", * "rollingWindow": { * "durationInMonths": 12 * } * } * } */ const elevatedUpdateTiersProgramSettings = elevate( tiers.updateTiersProgramSettings ); export const updateTiersProgramSettings = webMethod( Permissions.Anyone, async (programSettings) => { try { const result = await elevatedUpdateTiersProgramSettings(programSettings); return result; } catch (error) { console.error(error); // Handle the error } }, ); /* Promise resolves to: * * { * "programSettings": { * "_createdDate": "2024-06-05T20:27:19.147Z", * "_updatedDate": "2024-06-11T14:12:48.551Z", * "status": "PAUSED", * "revision": "3", * "rollingWindow": { * "durationInMonths": 12 * } * } * } */ ``` ## Update tiers program settings (dashboard page code) ```javascript import { tiers } from "wix-loyalty.v2"; /* Sample programSettings object: * * { * "programSettings": { * "revision": "2", * "status": "PAUSED", * "rollingWindow": { * "durationInMonths": 12 * } * } * } */ async function updateTiersProgramSettings(programSettings) { try { const result = await tiers.updateTiersProgramSettings(programSettings); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * * { * "programSettings": { * "_createdDate": "2024-06-05T20:27:19.147Z", * "_updatedDate": "2024-06-11T14:12:48.551Z", * "status": "PAUSED", * "revision": "3", * "rollingWindow": { * "durationInMonths": 12 * } * } * } */ ``` ---