Custom Activity Integration via Batch Mode

With this article, learn how to award points for offline purchases.

Batch Mode Integration is a convenient way to award points for offline custom activities such as entering a store, running 10K etc. Please familiarize yourself with Batch Mode Integration before proceeding with this article.

To award points for any offline custom activity other than a purchase, you must upload the following custom file to the designated FTP Server in CSV format.

This file is described in detail below.

Custom Offline Activity File (required)

This file contains details about each custom offline activity, other than purchases, for which points are to be awarded. If points are to be awarded for multiple custom activities, all such activities should be combined into this single file before uploading.

Thus, this file may contain multiple 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.

The naming convention for this file is ZN_ACTIVITY_YYYYMMDD.csv. For example, a file with orders for April 27, 2017 should be named ZN_ACTIVITY_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:

FieldDescriptionMandatory (Yes/ No)?
activity_timestampDate in YYYYMMDD format followed by time in HH:MM:SS format (24 hours) on which the order was placed.Yes
user_emailEmail address of the member.Yes (If member_id is passed in CSV, user_email address becomes optional.)
user_nameName of the member (first name and the last name)Yes
member_idUnique Identifier (Member ID) for the member object in the client’s system.Yes (if this column is passed in CSV)
client_user_idUser ID assigned to the member by the admin. If no value was assigned any random value can be passed.Yes
user_phoneThe phone number of the buyer without country code.No
activity_idThe unique activity ID stored with Zinrelo. You can find this in the Zinrelo admin console under the activity name. The ID has to match the Zinrelo record exactly or the points will not be awarded.Yes
points_awardedNumber of points to be awarded to the user for this activity.Yes
activity_descriptionDescription of the activity which was performed. Example: Visited the store.No
activity_urlIf you provide the URL, then the activity_description will be hyperlinked to the activity_url. So, it will show link where or how the activity was performed.No

📘

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.

A sample file named ZN_ACTIVITY_20170426.csv- https://docs.google.com/spreadsheets/d/1yx4n60ULa77BHRcmp8zrYQ9fejiQGDKxwuBxBmK7gq0/edit#gid=0

If you do not have any data for the optional columns, don't pass the column name.

Note:

  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.

📘

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.