onLoyaltySettingsSaved

Purpose

Triggered when loyalty program settings are updated. Use this hook to log loyalty configuration changes.

When It Triggers

  • Owner saves changes to loyalty settings

  • Settings are updated in the database

Parameters

Parameter
Type
Description

data.source

number

Server ID

data.shopId

string

Unique shop identifier

data.shopName

string

Display name of the shop

data.loyaltySettings

table

New loyalty settings

data.loyaltySettings.enabled

boolean

Whether loyalty is enabled

data.loyaltySettings.rate

number

Points per dollar spent

data.loyaltySettings.maxPoints

number

Maximum points a customer can have

data.previousSettings

table

Previous settings

data.savedBy

string

Name of person who saved

data.savedByIdentifier

string

Identifier of person who saved

data.timestamp

number

Server timestamp

Example

Last updated