Introduction to Batch Mode Integration
This article will help you understand how the batch mode integration works.
Introduction
Batch Mode Processing is a convenient way to integrate purchase/ return/ custom activities that are performed offline, for example, an in-store purchase via Point-of-Sale (POS) system. All loyalty activity files in the designated CSV format can be uploaded in a specified format to an FTP server setup for you. Zinrelo will process all uploaded files starting at approximately 12 midnight US Pacific time at the end of each day.

All loyalty activities are passed through a business rules engine to apply the rules relevant to that activity. For example, if 5X points are to be awarded for every dollar of purchase, the 5X business rule will be applied to each purchase imported from the batch upload. This information is sent to the Loyalty Rewards engine which processes the points. Loyalty members are notified by email about points earned within 24 hours after the uploaded file is processed.
FTP Location
The FTP location and the access credentials to upload your files can be found in the ‘General’ tab of your admin console.
Alternatively, you can also upload a .CSV file in the console itself. Before processing the file a validation check will run at our end and we'll let you know the status of the file. If it has some errors, you will be notified about the same and also in case if it is processed successfully.
Note:
Our system records all date and time fields in UTC time. This applies to the system generated fields such as enrollment date as well as the date time fields passed through the batch files.
Batch Mode Upload
There are five files type that can be uploaded via Batch Mode:
- Purchase Activity File
- Product Data File
- Custom Activity File
- Returns File
- Daily Transactions

Purchase Activity File
This file contains a list of all purchase transactions with the order details necessary to award points for purchases.
The naming convention for this file is ZN_DAILY_ORDERS_YYYYMMDD.csv. For example, a file with orders for April 27, 2017 should be named ZN_DAILY_ORDERS_20170426.csv.
Please Note:
The csv file name should not contain any special characters.
The fields contained in this CSV file are described in the table below:
In case Rules are being applied in the Purchase activity, this field becomes mandatory.
You can find the sample file here- https://drive.google.com/open?id=14_pD5GEDh9inqJwkzuEvoVWYQXWwxST0
Products Data File
This file contains itemized product details for each order.
It is required only if you want to apply product-specific business rules for awarding points e.g. Awarding 2x points for category=SHOES. The order ID is the unique key used to match product data with the orders from the ‘Purchase Activity’ file and points will be awarded based on the business rules configured in the Zinrelo admin console. However, we recommend including this file in the daily FTP upload.
The naming convention for this file is ZN_DAILY_PRODUCTS_YYYYMMDD.csv. For example, a file with orders for April 27, 2017 should be named ZN_DAILY_PRODUCTS_20170426.csv.
The fields contained in this CSV file are described in the table below:
You can find the sample file here- https://drive.google.com/file/d/1XKlaOWjz-Mc4gHpCmJdK5eiEKpPEhd1t/view
Custom Activity File
Awarding points for any offline custom activity other than purchase can be done by grouping all such activities into a common file in CSV format.
This file contains details about each custom offline activity, other than purchases, for which points are to be awarded. This file will contain activity IDs. A pre-requisite is that a custom activity corresponding to each activity ID has been configured and made live in the Zinrelo console. The activity ID will be used to associate the award transaction with an activity. Points will be awarded based on the rules configured in the Zinrelo Admin Console. File Naming Convention: ZN_ACTIVITY_YYYYMMDD.csv.
For details about this file, and to download a sample file, visit page Custom Activity Integration via Batch Mode.
Returns Activity File
This file contains details of all returned orders. The order ID is the unique key used to match the returns with the original award transaction and points will be deducted for the original order.
The naming convention for this file is ZN_DAILY_RETURNS_YYYYMMDD.csv. For example, a file with orders for April 27, 2017 should be named ZN_DAILY_RETURNS_20170426.csv
The fields contained in this CSV file are described in the table below:
You can find sample file here- https://drive.google.com/open?id=1mX6A_yIFkjkBxZrbSN63uaJep5qGZnig
Daily Transactions File
To award points for any offline purchase/return activity, you must upload the Purchase/ Return Activity file in CSV format.
This file contains a list of all purchase transactions and/or return transactions with the order details necessary to award points for purchases or deduct points for returns. File Naming Convention: ZN_DAILY_TRANSACTIONS_YYYYMMDD.csv.
Note: The mandatory fields for batch file upload are:
- Order timestamp
- Order ID
- Order type
- Order total
- Order subtotal
- User name
- User email
- Product price
- Quantity
- Client id (can be same as email)
Please Note:
- If member_id is passed in CSV, this field becomes mandatory.
- If member_id is passed in CSV, user_email address becomes optional.
- If your program uses an email address as the primary identifier, the email address value should be updated in both the Member ID and the email address columns.
Rest of the headers should be there on the file (even if no data is added).
For details about these files, and to download sample files, visit page Daily Transactions Integration via Batch Mode.
Please Note:
- Each type of CSV file should not exceed 5000 records. If you wish to upload a larger volume, please create a new CSV file with the additional records.
- Please ensure that you review the "numeric data" before adding it to any field. There is a possibility that it could be converted to a scientific data format when inserted into the CSV file.
How much time does it take for the batch file to get uploaded?
It takes 24 hours for a batch file to get uploaded.
Updated 21 days ago