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
idstringRead-onlyformat GUID

Loyalty earning rule ID.


sourceAppIdstringformat GUID

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


triggerAppIdstringminLength 1maxLength 80

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


triggerActivityTypestringminLength 1maxLength 80

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


titlestringminLength 1maxLength 50

Name of the earning rule.


statusstring

Current status of the earning rule.


revisionintegerformat uint64

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


createdDatestringRead-onlyformat date-time

Date and time the earning rule was created.


updatedDatestringRead-onlyformat date-time

Date and time the earning rule was last updated.


metadataMetadataRead-only

Additional metadata about the earning rule.


ONE OF:

fixedAmountFixedAmount

Fixed amount of points awarded for each qualifying activity.


conversionRateConversionRate

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

LoyaltyEarningRule
JSON
{ "id": "61f971c4-b33b-4f39-8ebe-2677bce55789", "source_app_id": "139ef4fa-c108-8f9a-c7be-d5f492a2c939", "trigger_app_id": "eb377299-86b4-4a86-a1b5-774a2d1d374b", "trigger_activity_type": "wix_members-uou_signs_up", "title": "Sign up to the site", "status": "ACTIVE", "revision": null, "created_date": "2024-08-01T11:51:41.431Z", "updated_date": "2024-09-16T12:03:00.434Z", "metadata": { "can_be_deleted": false }, "fixed_amount": { "points": 50, "configs": [ { "tier_id": null, "points": 50 } ] } }
Did this help?