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:

FieldDescriptionMandatory (Yes/ No)?Example
order_timestampDate in YYYYMMDD format followed by time in HH:MM:SS format (24 hours) on which the order was placed.Yes20200721/ 00:00:00
timezoneThe timezone in which the purchases were made.NoPST, CST, IST, etc.
order_idThe order ID of the order which is being placed. This field is used to uniquely identify the order.Yes8745321
order_typeThis 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_totalGross total amount of the order including shipping. discount, etc.Yes53.49
order_subtotalNet total amount of the order excluding shipping, discount. Points will be awarded to the member based on this amount.Yes39.99
coupon_codeValue of the coupon_code used while making this purchase.No15OFF
currencyThree letter currency code of the order placed.NoUSD
user_nameName of the member (first name and the last name)YesJohn Doe
member_idUnique 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_emailEmail address of the member.Yes (If member_id is passed in CSV, user_email address becomes optional.)[email protected]
client_user_idUser ID assigned to the member by the admin. If no value was assigned any random value can be passed.YesJOH08976
user_phoneThe phone number of the buyer without country code.No9713332246
product_idThe product ID of the product purchased.No333215
product_pricePrice of the product.Yes39.99
quantityQuantity of the ordered product.Yes1
product_titleName of the ordered product.NoFuji Instax Camera
product_categoryCategory to which ordered product belongs. Multiple categories can be passed in comma separated format without space.Nopromotion,camera
product_tagTags which describe the product. Multiple tags can be passed in comma separated format without space.Nosale 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.

📘

  1. 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.
  2. 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.
  3. The batch file is processed every 8 hours.