Loyalty Earning Rule Object


A loyalty earning rule defines how customers earn points in a loyalty program. You can create rules for different activities, such as making purchases.

Properties
createdDatestringRead-onlyformat date-time

Date and time the earning rule was created.


idstringRead-onlyformat GUID

Loyalty earning rule ID.


metadataMetadataRead-only

Additional metadata about the earning rule.


revisionstringformat uint64

Revision number, incremented by 1 each time the earning rule is updated. Pass the latest revision when updating to prevent conflicting changes.


sourceAppIdstringformat GUID

ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.


statusstring

titlestringminLength 1maxLength 50

Name of the earning rule.


triggerActivityTypestringminLength 1maxLength 80

Type of activity that triggers point assignment. For example, wix-restaurants/orderSubmitted or birthday.


triggerAppIdstringminLength 1maxLength 80

ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.


triggerFiltersArray <AutomationTriggerFilter>Read-onlymaxItems 100

Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.


One Of

conversionRateConversionRate

Points awarded based on a conversion rate formula: (amount spent) / (money_amount * points).


fixedAmountFixedAmount

Fixed amount of points awarded for each qualifying activity.


updatedDatestringRead-onlyformat date-time

Date and time the earning rule was last updated.

Did this help?