Creates a loyalty account for one of a site's contacts.
The createAccount()
function returns a Promise that resolves to the new loyalty account when it is created.
To create a new loyalty account, the customer must first be a site contact with a contact ID. See contacts to learn more about a site's contacts. The site must also have an active loyalty program before loyalty accounts can be created. See the activateLoyaltyProgram()
function to activate a site's loyalty program.
Note: Only visitors with Manage Loyalty permissions can create a loyalty account.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Contact ID for a Wix site contact. See the Contacts API to learn more.