Daily Transactions Integration via Batch Mode
With this article, learn how to award points for offline purchases.
Batch Mode Integration is a convenient way to award or deduct points for offline purchases performed via in-store Point-of-Sale or telephone. Please familiarize yourself with Batch Mode Integration before proceeding with this article.
To award points for any offline purchase activity or to deduct points for purchases that are returned, you must upload the daily transactions file to the designated FTP Server in CSV format.
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.
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.
The file expects one row per purchase item for an order OR one row per returned item. So, if the order contains 5 items, there will be 5 rows for that order in the CSV file.
The same file can have both purchase transactions as well as return transactions.
The naming convention for this file is ZN_DAILY_TRANSACTIONS_YYYYMMDD.csv. For example, a file with orders for July 21, 2020, should be named ZN_DAILY_TRANSACTIONS_20200721.csv.
Please Note:
The csv file name should not contain any special characters.
Find the sample file here.
The fields contained in this CSV file are described in the table below:
Field | Description | Mandatory (Yes/ No)? | Example |
---|---|---|---|
order_timestamp | Date in YYYYMMDD format followed by time in HH:MM:SS format (24 hours) on which the order was placed. | Yes | 20200721/ 00:00:00 |
timezone | The timezone in which the purchases were made. | No | PST, CST, IST, etc. |
order_id | The order ID of the order which is being placed. This field is used to uniquely identify the order. | Yes | 8745321 |
order_type | This field tells whether this row is a purchase or return. The value of this field can be "purchase" or "return." | Yes (If no value is provided in the column, it will be interpreted as a 'purchase.' Therefore, it is essential to provide a value, particularly when the order type is 'return.) | purchase/ return |
order_total | Gross total amount of the order including shipping. discount, etc. | Yes | 53.49 |
order_subtotal | Net total amount of the order excluding shipping, discount. Points will be awarded to the member based on this amount. | Yes | 39.99 |
coupon_code | Value of the coupon_code used while making this purchase. | No | 15OFF |
currency | Three letter currency code of the order placed. | No | USD |
user_name | Name of the member (first name and the last name) | Yes | John Doe |
member_id | Unique Identifier (Member ID) for the member object in the client’s system. | Yes (if this column is passed in CSV) | “Customer ID”, “GUID”, “Email Address”, or “Phone Number” |
user_email | Email address of the member. | Yes (If member_id is passed in CSV, user_email address becomes optional.) | [email protected] |
client_user_id | User ID assigned to the member by the admin. If no value was assigned any random value can be passed. | Yes | JOH08976 |
user_phone | The phone number of the buyer without country code. | No | 9713332246 |
product_id | The product ID of the product purchased. | No | 333215 |
product_price | Price of the product. | Yes | 39.99 |
quantity | Quantity of the ordered product. | Yes | 1 |
product_title | Name of the ordered product. | No | Fuji Instax Camera |
product_category | Category to which ordered product belongs. Multiple categories can be passed in comma separated format without space. | No | promotion,camera |
product_tag | Tags which describe the product. Multiple tags can be passed in comma separated format without space. | No | sale item,clearance |
Please Note:
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.
Note: If the merchant is unable to provide a comma separated string, then columns like product_category1, product_category2 etc., can be used. Based on the prefix (ie- product_category), all the product categories will be converted to a single comma separated string.
Similar approach will be followed for product_tags- product_tags1, product_tags2 etc., should be combined.
- The 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.
- The batch file is processed every 8 hours.
Updated about 1 month ago