Importing Unit Transfers
In this article, you’ll learn how to import unit transfers into Open Loyalty.
Last updated
In this article, you’ll learn how to import unit transfers into Open Loyalty.
Last updated
Importing allows you to bulk-upload multiple unit transfers at once, making it easier to manage units on loyalty accounts. This is especially handy when you have a large volume of transfers—saving you time and ensuring accuracy.
When working with many transfers (e.g., manual corrections, adjustments, or data from external systems), entering them one by one into the system can be time-consuming. Importing unit transfers via supported file types simplifies this process and reduces the chance of human error.
Faster processing of large datasets
Consistency in data updates
Reduced manual input errors
Before you begin, make sure you have the following:
OpenLoyalty Admin Access You must be logged into the Admin Panel with permission to import data.
Correct File Format: JSON or XML Only JSON and XML are accepted by OpenLoyalty for importing unit transfers.
Sample File Structure Review the structure of JSON and XML files provided below to understand how to format your adding or spending (deducting) transfers. You can find these files under the link below.
OpenLoyalty supports two key scenarios when importing unit transfers:
Adding Units (e.g., awarding units)
Spending or Deducting Units (e.g., redeeming units)
Your JSON or XML file needs to include fields such as:
Customer ID (required) The unique identifier of the loyalty account to which the transfer applies.
Use the identifier generated by Open Loyalty.
First, you might need to match your internal identifier (such as email, phone number, or loyalty card number) to the corresponding member ID in Open Loyalty.
Units (points) (required) The number of units that need to be added or deducted.
Wallet (walletTypeCode) (required) The code of the wallet the units need to be added to or deducted from.
Date (registeredOn) (optional)
The date of the transfer, typically in YYYY-MM-DD HH:mm:ss
format.
If not specified, the registeredOn date will be saved as the date of unit transfer creation.
Expire Date (optional)
You can define the expiry date for units in two ways:
expireAt: Specifies the exact date and time of expiry.
expiresInDays: Indicates how many days from the registration date the units will remain available.
Pending Date (optional)
You can define the pending (lock) date for units in the following way:
lockedUntilDays: Indicates how many days from the registration date the units will remain pending (locked).
Comment (optional) Any additional text or comments about this unit transfer.
For detailed structures, please refer to the JSON and XML example files above.
Below is a step-by-step guide on how to import your unit transfers:
In the OpenLoyalty Admin Panel, go to Wallets, then Unit transfers.
Select the down arrows next to the Unit transfers and select the relevant Import transfers option.
Click Click to upload or drag and drop a file.
Click on Import units transfers.
You can find the list of imported files under Imports / Exports menu option, in the Imports tab.
If there are errors, you can filter them out and validate the results.
Invalid File Format If you attempt to upload a non-supported file type (like CSV), the system will likely reject it. Make sure you only upload JSON or XML.
Date/Time Format
Ensure your dates are in a format OpenLoyalty accepts (often YYYY-MM-DD HH:mm:ss
).
Invalid Account IDs The import will fail if an account ID doesn’t exist in the system. Make sure the correct accounts are set up, or update your file to reflect valid IDs.
Insufficient Permissions Only users with the right roles (e.g., Admin or specific Import/Export permissions) can perform imports. Check your user role if you don’t see the import option.
Review the JSON/XML Examples Ensure your file’s structure matches the Adding.json, Adding.xml, Spending.json, or Spending.xml formats before uploading.
Test with a Small Sample Before importing a large file, test with a small subset of data to ensure everything processes correctly.
Keep a Backup Maintain a copy of your original JSON or XML files. This way, if anything goes wrong, you can quickly revert.