Importing Unit Transfers

In this article, you’ll learn how to import unit transfers into Open Loyalty.

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.

Why Use Imports for Unit Transfers

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


Prerequisites

Before you begin, make sure you have the following:

  1. OpenLoyalty Admin Access You must be logged into the Admin Panel with permission to import data.

  2. Correct File Format: JSON or XML Only JSON and XML are accepted by OpenLoyalty for importing unit transfers.

  3. 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.

Sample Import Files

Understanding the Import File

OpenLoyalty supports two key scenarios when importing unit transfers:

  1. Adding Units (e.g., awarding units)

  2. 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.

  • 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.


How to Import Unit Transfers

Below is a step-by-step guide on how to import your unit transfers:

1. Navigate to the Import Section

  1. In the OpenLoyalty Admin Panel, go to Wallets, then Unit transfers.

  2. Select the down arrows next to the Unit transfers and select the relevant Import transfers option.

  1. Click Click to upload or drag and drop a file.

  2. Click on Import units transfers.

2. Check the Import Results

  1. You can find the list of imported files under Imports / Exports menu option, in the Imports tab.

  2. If there are errors, you can filter them out and validate the results.


Troubleshooting and Common Issues

  • 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.


Best Practices

  1. Review the JSON/XML Examples Ensure your file’s structure matches the Adding.json, Adding.xml, Spending.json, or Spending.xml formats before uploading.

  2. Test with a Small Sample Before importing a large file, test with a small subset of data to ensure everything processes correctly.

  3. Keep a Backup Maintain a copy of your original JSON or XML files. This way, if anything goes wrong, you can quickly revert.

Last updated

Was this helpful?