Introduction
The data import process uses a standardized format designed to minimize manual intervention. This system enables you to transmit data in a fixed format using a CSV which can be processed efficiently and uniformly across multiple platform modules. These modules include Users, Orders, Product Catalog Management (PCM), Manual Spend and Points.
Key Functionalities Supported
- User Creation: Import member data efficiently to create and manage member profiles within the system.
- Order Generation: Enable the automatic generation of orders by importing order details in bulk.
- Product Catalog Management (PCM): Simplify the import of product details for streamlined catalog updates.
- Points Management: Award and manage loyalty points effectively through bulk data uploads.
- Manual Spend: Points are added to a member's account manually, outside of the automated transaction systems. The spend is adjusted using the manual spend functionality.
Implementation Process
The data import system is designed to provide a seamless and efficient process through standardized data formats, automated validation, and integration across multiple modules. The key elements of the implementation include:
-
Data Format Specifications:
The primary format for data import will be CSV, ensuring simplicity and compatibility. Each module will have a clearly defined structure with both required and optional fields. To facilitate implementation, templates will be provided for each supported module, outlining the necessary fields and formats to ensure consistency and compliance with the system's requirements. -
Data Validation:
Automated validation checks will be in place to verify that all incoming data adheres to the standardized format. This process ensures the integrity of the data and that there are no errors or inconsistencies before processing. If any issues are detected, they will be flagged, and detailed error reports will be generated to assist you in making the necessary corrections. -
Module Integration:
The standardized data will be processed seamlessly across multiple modules, leveraging existing APIs and backend systems. This integration enables real-time updates and ensures that data flows smoothly from one module to another without manual intervention. -
Authentication Mechanisms:
You will be required to provide authentication credentials for secure access to their data storage locations. The system is designed to support multiple platforms, including SFTP and other common storage solutions. This flexibility allows you to choose their preferred storage provider while maintaining robust security and accessibility standards. Authentication details will be configured during the initial setup to ensure secure data transfer. -
Automation and Scheduled Imports:
The system will utilize a common script for data processing, reducing redundancy and promoting consistency across modules. Automation is a core feature, with cron jobs set to fetch data at configurable intervals, such as hourly, daily, weekly, or monthly. This automated process ensures that data is processed promptly and reduces the need for manual intervention, improving efficiency and reducing potential delays.
Data Import Formats by Module
Users
Overview
The Users module supports importing data to create or update member profiles in the system. Data must be provided in a CSV format that matches the fields supported by the user creation API.

A sample csv can be downloaded from here: Users_Sample_Formats_for_Imports.csv
Below are definitions for each field in the CSV file for user data import standardization:
| Field Name | Presence | Definition |
|---|---|---|
| multiTemplateId | Required | Identifier for the template used in multi-template configurations, specifying applicable rules or structures for the associated member data. |
| id | Required | Unique identifier for the member in the system. |
| Required | Email address of the member. | |
| firstName | Required | First name of the member. |
| lastName | Required | Last name of the member. |
| zipCode | Required | ZIP or postal code of the member's address. |
| optInStatus | Required | Status indicating whether the member has opted in or not (“Yes” or “No”). |
| optInDate | Required | Date when the member opted in. |
| status | Required |
Current status of the member account (for example "Active," "Inactive,"). Note: If the Loyalty Member Management configuration is disabled for a site, only "Active" and "Inactive" statuses will be displayed. However, if the configuration is enabled, the member's status will be determined based on predefined conditions, such as "Dormant," "Disabled," "Unavailable," etc. |
| phone | Required | Phone number of the member, including country code if applicable. |
| birthDate | Required | Date of birth of the member, formatted as YYYY-MM-DD. |
| extendedAttribute_attribute01 | Optional | Custom attribute for capturing additional member-specific data or metadata. |
| extendedAttribute_attribute02 | Optional | Additional custom attribute for capturing further member-specific data or metadata. |
| raf_incentiveId | Optional | Identifier for the referral incentive associated with the member, if applicable. |
| raf_referrerCode | Optional | Referral code linked to the member for tracking referral activities. |
| raf_saStatId | Optional | Identifier for the referral or sign-up activity status associated with the member. |
| createDate | Required | Date when the member account was created in the system. |
| optReason | Required | Reason provided by the member for opting in or opting out of communications, if applicable. |
| source | Required | Origin of the member data (for example "Website Sign-Up," "Manual Import," "API Integration"). |
Process
- Place the CSV file in a designated location (for example SFTP, AWS S3 bucket).
- The system authenticates and retrieves the file based on your setup.
- Data is validated and imported to create or update member profiles.
Orders
Overview
The Orders module allows you to upload order data for processing, including order creation and status updates.
Format

A sample csv can be downloaded from here: Orders_Sample_Formats_for_Imports.csv
Below are the definitions for the fields in a CSV file for orders data import standardization:
Definition | |
| multiTemplateId | Identifier for the template used in multi-template configurations, specifying applicable rules or structures for the associated order data. |
| id | Unique identifier for the order record. |
| userId | Unique identifier for the member placing the order. |
| status | Current status of the order (For example: Return, Cancel and Shipped) |
| Email address of the member who placed the order. | |
| firstName | First name of the member who placed the order. |
| lastName | Last name of the member who placed the order. |
| orderTotal | Total monetary value of the order, including discounts and shipping costs. |
| referrerCode | Referral code used by the customer, if any, during the purchase. |
| discountAmount | Original discount amount applied to the order. |
| updatedDiscountAmount |
Updated or adjusted discount amount applied to the order. This applies to the order when it is partially returned or canceled. |
| discountRefund | Refund amount specifically for the discount portion of the order. |
| shippingAmount | Shipping cost associated with the order. |
| orderDate | Date and time when the order was placed. |
| storeId | Identifier for the store or location where the order was placed, if applicable. |
| coupon | Coupon code applied to the order, if any. |
| source | Origin of the order (For example, "Online," "Mobile App"). |
| eventId | Identifier for any event linked to the order, such as a promotional campaign. |
| rewardId | Identifier for the reward associated with the order, if applicable. |
| rewardName | Name of the reward associated with the order, if applicable. |
| pointsRefund | Number of loyalty points refunded as part of the order transaction. This applies when the order is partially returned. We can determine how many points to refund to the member if the order includes a redemption. |
| reason | Explanation or note for the transaction, such as why a refund or adjustment was made. |
| orderDetail_id | Unique identifier for an individual product in the order. |
| orderDetail_productName | Name of the product included in the order. |
| orderDetail_quantity | Quantity of the product ordered. |
| orderDetail_unitPrice | Price per unit of the product. |
| orderDetail_autoDelivery | Flag indicating whether the product is part of an automatic delivery program (“Yes” or “No”). |
| orderDetail_secondaryKey | Additional identifier or key for the product, used to track the same product ID with varying prices within the same order. |
| orderDetail_estimatedShipDate | Estimated shipping date for the product in the order. |
| orderDetail_categoryId | Identifier for the category of the product included in the order. |
| orderDetail_categoryName | Name of the category of the product included in the order. |
| orderDetail_url | URL linking to the product’s details page. |
| orderDetail_imageUrl | URL linking to the product’s image. |
| orderDetail_transactionType | Type of transaction for the product (For example: Cash, Credit Card or Voucher) |
| orderDetail_description | Description of the product included in the order. |
| orderAttribute_attributeName1 | Custom attribute capturing additional details or metadata about the order. |
| orderAttribute_attributeName2 | Additional custom attribute capturing further details or metadata about the order. |
Process
- Provide the order data in the standard format.
- The system processes the data to update or create order records in the loyalty system.
Product Catalogue Management (PCM)
Overview
PCM data import supports crediting or debiting points for purchase activities done by the member.
Format

A sample csv can be downloaded from here: PCM_Sample_Formats_for_Imports.csv
Below are definitions for each field in a CSV file for product catalog management data import standardization:
| Field Name | Definition |
|---|---|
| multiTemplateId | Identifier for the template used in multi-template configurations, specifying applicable rules or structures for the associated product catalog data. |
| pointAwardType | This parameter defines the rules for awarding points based on either a product or a category. It has two possible values: Product or Category. |
| productDetail_productId | Unique identifier for the product in the catalog. |
| productDetail_productName | Name of the product as it appears in the catalog. |
| productDetail_productPrice | Price of the product in the specified currency. |
| productDetail_productPointType |
Types of points associated with the Product. This field offers four options, allowing the user to select one:
|
| productDetail_productBonusFlag | Flag indicating whether bonus points are applicable to the product ("Yes" or "No"). |
| productDetail_productPointRatio | It defines the ratio used to award points against the product. This ratio determines how many points are earned for each unit or value of the product. |
| productDetail_productBonus | Fixed number of bonus points awarded for purchasing the product. |
| productDetail_productMinimumLimit | Minimum purchase quantity required to qualify for points. |
| categoryDetail_categoryId | Unique identifier for the product category in the catalog. |
| categoryDetail_categoryName | Name of the product category as it appears in the catalog. |
| categoryDetail_categoryPointType | Types of points associated with the category. |
| categoryDetail_categoryBonusFlag | This flag determines whether the category should receive flat bonus points. It has two possible values (“Yes” or “No”). |
| categoryDetail_categoryPointRatio | It defines the ratio used to award points against the category. This ratio determines the point ratio per dollar spent for all products included in the category. |
| categoryDetail_categoryBonus | Fixed number of bonus points awarded for purchasing any product in the category. |
| categoryDetail_categoryMaxPoints | Maximum number of points that can be earned within the category for a single transaction. |
| categoryDetail_categoryLimitType | Specifies the type of limit applied to the points earned in the category ("Calendar” or "Rolling"). |
| categoryDetail_categoryLimitPeriod | Time period for the limit applied to points earned in the category (for example "day," "week," "month" and “year”). |
| productAttributes_upc | Universal Product Code (UPC) assigned to the product. |
| productAttributes_mpn | Manufacturer Part Number (MPN) assigned to the product. |
| productAttributes_gtin | Global Trade Item Number (GTIN) assigned to the product. |
| productAttributes_brandId | Unique identifier for the brand associated with the product. |
Process
- The system identifies whether the data pertains to credit or debit actions.
- Points are updated based on the provided Action ID and associated product attributes.
Points
Overview
The Points module facilitates bulk point imports for members.
Format

A sample csv can be downloaded from here: Points_Sample_Formats_for_Imports.csv
Below are definitions for each field in a CSV file for points data import standardization:
| Field Name | Definition |
|---|---|
| multiTemplateId | Identifier for the template used in multi-template configurations. Specifies which template applies to the associated point transaction. |
| id | Unique ID of the member. |
| actionId | Identifier for the action associated with the points (for example purchase, review, referral). |
| customId | This is an additional ID used to limit point awards or deductions based on the usage limit configured in the system. |
| rewardId | An identifier for the reward associated with the points. This is used to redeem the specific reward. |
| activity |
This field determines whether points will be credited or debited. It has two possible values: "credit" or "debit".
|
| points | Number of points awarded or deducted during the transaction. |
| pointType | Type of points being recorded (for example, “Bonus”, “Promotional”, “Regular” and “Standard”). |
| orderId | Unique identifier for the associated order, if the transaction is tied to an order. |
| reason | Explanation or note for the transaction, detailing why the points were awarded or deducted. |
| source | Origin of the transaction (for example "system-generated," "manual entry"). |
| recipientId | This is the unique member ID to which the points will be transferred. |
| actionAttribute_attribute01 | Custom attribute to capture additional data or metadata related to the associated action. |
| actionAttribute_attribute02 | Additional custom attribute to capture further data or metadata for enhanced action context or reporting. |
Process
- Data is validated against the standard format.
- Points are credited or debited based on the input.
Manual Spend
Overview
Manual Spend refers to manually modifying the recorded spend amount. If there are discrepancies in the spending calculation due to system errors, corrections, or special cases, adjustments can be made through this process.
Based on whether the adjustment increases or decreases the spend amount, the corresponding points will be either credited or debited to the member’s account accordingly.
Format

A sample csv can be downloaded from here: Manual_Spend_Sample_Formats_for_Imports.csv
Below are the definitions for each field in a CSV file for manual spend data import standardization:
| Field Name | Definition |
|---|---|
| multiTemplateId | Identifier for the template used in multi-template configurations, specifying the rules or structures for the associated spend data. |
| id | Unique Identifier of the member. |
| actionId | The identifier for the action associated with the manual spend. To manually adjust the spend, the action ID 164 must be used. |
| activity | Description or type of activity that triggered the manual spend ("Credit” or "Debit"). |
| spend | The total monetary value of the spend amount to be either credited or debited. |
| orderId | A unique identifier for the associated order, used to manually adjust the spend. |
| adminEmail | Email address of the admin responsible for processing or approving the manual spend. |
| reason | Explanation or note for the manual spend transaction, detailing the reason for the spend (For example, "Customer Request” or "Promotional Offer"). |
Process
- Data is validated against the standard format.
Coupon Code
Coupon codes for rewards are managed through Additional Loyalty Settings under Coupon Groups, where each reward is assigned a specific coupon group for uploading relevant codes. This process was done through manual uploads, but it has been automated to improve efficiency and accuracy. A scheduled job will handle the uploading of coupon codes, ensuring seamless and timely updates without the need for manual intervention. This automation reduces the risk of errors, saves time, and streamlines reward distribution.
File Format Requirements
The input file must adhere to a structured format that is CSV and contain the following required fields:
- Multi Template ID – Optional; required if the site is configured with multiple templates.
- Reward ID – Specifies which reward the uploaded coupon codes belong to.
- Coupon Code – The actual coupon code to be uploaded.
The file format must be consistent, and any deviation may result in processing errors.
CSV File Format

Column Name |
Mandatory |
Data Type |
Description |
|---|---|---|---|
multiTemplateId |
Optional |
Integer |
Unique multi-template ID of the site. If the site has multi-template enabled, this parameter becomes required. |
rewardId |
Required |
Integer |
Reward ID to which the coupon code needs to be uploaded. |
couponCode |
Required |
String |
Coupon code to be uploaded against the reward ID. |
A sample csv can be downloaded from here: CouponCodeSample.csv
File Storage and Retrieval:
We can establish a connection to the client instance (SFTP, S3, etc.) and retrieve files from specified folders or locations. Alternatively, the client can connect to our instance (SFTP, S3, etc.) and push files to a designated folder or location for processing.
Execution Frequency
The frequency at which the scheduled job runs depends on client requirements. Possible scheduling options include:
- Daily Uploads: Rarely used, as frequent coupon code changes are uncommon.
- Weekly Uploads: Suitable for moderate changes in coupon codes.
- Monthly Uploads: Commonly used when updating coupon codes at the start of a new cycle.
- On-Demand Execution: Clients can trigger uploads whenever necessary, as per business needs.
Additional Features
- File Validation
- Ensures the correct file format (CSV).
- Checks for missing columns and records before processing.
- Prevents processing if the file structure is incorrect.
2. Handling Existing Coupon Codes
- When uploading new coupon codes, the system provides the following options:
- Replace: Removes unassigned coupon codes and uploads new ones.
- Append: Adds new coupon codes without removing existing ones.
Replace Condition:
- The system checks for available coupon codes (those not assigned to loyalty members) against the specific reward ID.
- These available coupon codes are removed before inserting new coupon codes.
Example:
- Initially, there are 100 coupon codes for reward ID 123, with 50 assigned to loyalty members and 50 still available. When a new batch of 100 codes is uploaded, the system removes the 50 unassigned codes and replaces them with the newly uploaded ones. As a result, the final count of available coupon codes for reward ID 123 becomes 100.
Append Condition:
- The system adds new coupon codes to the existing ones for the specified reward ID.
Example:
- Reward ID 123 initially has 50 available coupon codes. When a new batch of 100 codes is uploaded, the system appends the new codes to the existing ones, increasing the total count of available coupon codes to 150.
The system provides the ability to choose between Append and Replace as needed.
3. Duplicate Handling
- The system checks for duplicate coupon codes at the reward level.
- Custom logic will determine whether duplicates are allowed or restricted based on business rules.
- Clients can configure duplication settings as per their needs.
4. Low Coupon Code Alerts
- Low coupon alerts should function based on the configured settings for the reward group.
- When coupon codes fall below a set threshold, an automated notification will be sent to the designated email addresses.
Considerations
The system must efficiently parse CSV files, validate mandatory fields, and correctly map data to the database. It should also maintain logs of failed records and send scheduled alerts for successes or failures.
By implementing this automated coupon code import process, organizations can streamline their reward distribution, minimize errors, and enhance overall operational efficiency.
Conclusion
The introduction of this standardized data import format represents a significant advancement in operational efficiency. By providing a uniform structure, secure authentication mechanisms, and automated processing capabilities, the system ensures consistency, scalability, and ease of use. This document serves as a comprehensive guide for implementing and adhering to the new format, enabling clients to benefit from a streamlined and reliable data import process.