The Loyalty Imports API allows you to import loyalty data for existing customers from external sources into your Wix site's loyalty program. You can track import progress, handle any errors that may occur during the process, and manage your loyalty data efficiently.
With the Loyalty Imports API, you can:
For more information about managing your site's loyalty program, see the Wix Loyalty Program API.
It's important to note the following points before starting to code:
10MB
.The loyalty import process follows these phases:
When creating your loyalty data file for import, consider the following guidelines:
Your import file must contain at least two required fields:
Prepare your data in a CSV (Comma-Separated Values) format. Here's an example of what your import file might look like:
1
The import process uses the email address as the unique identifier for each customer. If an email address in the import file doesn't match an existing customer, that row is skipped and logged as an error.
During the import:
The importResult
property of the Loyalty Import object contains the results of the import:
successCount
: Number of successfully imported customer recordsfailureCount
: Number of customer records that couldn't be importederrorFileExists
: Indicates whether an error file is available for downloadThe parseResult
property provides information about the initial file parsing:
parsedRowCount
: Total number of rows processed from the import fileFor example, if you import a file with 3 customers and 1 fails to import, the response might look like this:
1
This indicates:
If errors occur, call Get Error File Download Url
to retrieve detailed error information. The error file will contain specific details about why certain rows failed to import, such as unmatched email addresses or invalid point values.
UNKNOWN
: The status is not known or specified.INITIATED
: The import has been initiated.PARSING
: The system is currently parsing the import file.PARSED
: The import file has been successfully parsed.IMPORTING
: The system is currently importing the parsed data.IMPORTED
: The import process is complete.FAILED
: The import process has failed.