Antavo’s Imports module facilitates the configuration of various entities and mass enrollment of customers in the loyalty program by having settings and data fields imported from .csv or JSON files.
Find the configuration page of the Imports module by typing ‘Imports’ into the search bar of the Modules menu. The page will open to the list of files that have already been uploaded.
The columns represent the following information:
Created at – date of the imported file upload
Created by – Backoffice user who uploaded the import file
Model – the type of data set imported (coupon, coupon pool, event, customer, reward, store, challenge, customer field, customer mapping rule, product, user group)
Status
Uploaded – the import file has been uploaded successfully, but the import settings have not been configured yet
Pending – the import file is uploaded successfully, and the import settings are configured, but the import process has not started yet
Processing – the import process is in progress
Finished – the import process has been finished
Failed – the import process has failed
If the issue persists, please contact the Antavo Service Desk.
Filename
Filesize
The size of the import file is in bytes.
Creating a new import
Imports can be used to create new or modify pre-existing entities in Antavo. In case the entity or any of its field values in the input files already exist in the loyalty program, the input file will result in updating (upon a successful match) of the specific entity.
To start creating a new import click the ‘Create new import’ button on the left sidebar.
Data Model
First, select the data model to import and click ‘Next’
The available data models are:
Challenges
Create new or update existing challenges that are set up in the Challenge module. Challenge import is executed without including the image of the challenge to facilitate imports more effectively. Please note that images still need to be added when editing a challenge on the GUI afterward, to be able to display it on the membership site properly.Coupons
Import coupons to be used as uploaded coupons of rewards, friend referral coupons or coupon pools.
Coupon imports to coupon pools can also be initiated through the Coupons module, please find further information here.Coupon pools
Create or update coupon pools in the Coupons module.
If the pool uses a set of uploaded coupons as the source of the coupons, make sure to upload them through an aforementioned Coupon import.Customer fields
Import new customer data attributes.Customer Mapping Rules
Create new mapping rules to update customers.Customers
Import new loyalty members or mass update customer data, including labels appended by third-party integrations. Please note, that calculated customer data cannot be imported, in case you need to insert such values contact the Antavo Service Desk.Events
When creating an event import file, please make sure you always add the customer and action columns that include the ID of the customer and the event in the data rows of the import files respectively.Products
Add new or updated existing products that have been added in the Product Catalog module.Stores
Add new stores or update the existing store that is set up in the Stores module.Rewards
Create new or update existing rewards that are set up in the Reward module.
Please note, that reward import is executed without including the image of the reward to facilitate imports more effectively. Make sure you upload the reward image(s) on the reward editor interface to be able to display it on the membership site properly.User Groups
Add new groups to the User groups module.
Data Source
In the second step, define the source where Antavo can access the import file. The following options are available:
Upload – upload the CSV or JSON file in the Filename field by clicking the ‘Choose file’ button
You have the option to populate the uploadable CSV file based on a template. This file contains all the fields that are listed on the page, including the custom fields of the entity.
Obtain this by clicking the ‘Download’ button.URL
Insert the URL where the import file is accessible in the ‘Url’ field.SFTP or FTPS file transfer protocols
Define the Host, Port, User, Pass, and Path connection details in the corresponding field. Also, a Cleanup method can be selected to rename or delete the import file after it has been processed.
Fields
Under the next section, you can view the fields that the system expects to be filled depending on the data model, indicating the data type (text, date, select, numeric, etc.) and whether they are mandatory. Both factory and custom fields are importable and added to the list of fields.
If you translate the values of text fields to different languages on applicable module interfaces, then translations should be imported in separate attributes. The name of translation fields should be constructed from the ID of the parent field and the ISO 639-1 code of the specific language.
Example: English, Spanish and French translations of the ‘Name’ field should be added to the export file in name.en
, name.es
and name.fr
attributes.
After you have updated the import file with all the field values, don’t forget to click the ‘Upload’ button at the bottom of the page.
Import setup
In case the upload is successfully processed you’ll first file a success message at the top of the page, which means you can continue the data import configuration.
Field Settings
Click the ‘+’ button next to ‘Fields’ to change the headers of your CSV or JSON file to match the name of the field within Antavo. This step is optional.
From – the column header in your import file
To – the name of the target field that should be populated by the ‘From’ column values of the import file.
Please contact the Antavo Service Desk if you need help defining the name of the field.Format – the format of the date values in the data column
The format must be defined by using PHP date format, you can learn more about it here: https://www.php.net/manual/en/datetime.format.php.Default – empty values of the file will be filled in with the default value
Map values – you can replace the values of the data fields in your import file by mapping the current values with the values to be imported to the Antavo data fields
Contact the Antavo Service Desk if you need help in adding values that are acceptable to the specific Antavo data field (eg. woman/man values can be mapped in a way that female/male values will be imported into the Antavo gender field).
Scheduling
Scheduling allows running the imports in a specified time or setting them as recurrent based on UTC timezone.
By default, the CSV or JSON files will be imported right away (‘None’ option), however, importing can be scheduled by selecting the ‘On-date’ or ‘Repeated’ values in the dropdown list.
On-date
The import will start on a predefined date and time.
Use the date and time selector to specify the scheduled time by clicking on the icons in the Date and Time fields or enter the details manually.Repeated
Select this option to set the data import to be triggered periodically.Daily
Set the time of the day when the import should start.Weekly
Select the day(s) of the week and set the time of the day.Monthly
Select the day(s) of the month and set the time of the day.
You can use the ‘Last’ value to make sure the import is started on the last day of the month, regardless of the number of days in a given month.
Scheduling of previously configured imports may be modifiable after being created, please find detailed information below.
File format options
Delimiter – use the dropdown list to select the value delimiter that is used in the file
The default option is the comma, but you can use, a semicolon, pipe, or tab as well.Enclosure – currently, the double quote is the only option to indicate that a delimiter character is used within a single field value
Eg. if a comma is used as the delimiter, the value news, entertainment will be processed as two values of two separate data fields (news and entertainment), however, if you use double quotes as “news, entertainment“, it will be processed as the value of one data field.
Module options
Duplication handling – you can decide how to handle data rows that include entities that Antavo stores in the database already
Skip – the data rows of existing entities will be skipped, and the entity is left unchanged
Update – the data rows of existing entities will be processed and the entity gets updated according to the CSV file data
Please note, that when updating a set of uploaded coupons, only unassigned coupons can be updated.
Coupon pool – applicable to coupon imports only
Use the dropdown list to select the coupon pool previously configured in the Coupons module to which the coupons should be uploaded.Reward – applicable to coupon imports only
Use the dropdown list to select the coupon type-reward previously configured in the Rewards module to which the coupons should be uploaded.
Click ‘Start import’ to start the import process. Once the import has been started, the settings (except for scheduling settings) are non-modifiable.
Import summary
Once the process has been initiated, the ‘View’ tab is added for monitoring the results of the import process.
While the ‘Log’ details the output of the process, the ‘File info’ summarizes the import file properties.
The 'Results' section shows if the import file was successfully processed and displays the number of:
Entities that were inserted or updated in the database
Duplications handled
Erroneous entries
If the number of errors is a non-zero value, a red ‘errors’ label is displayed in the ‘Results’ section indicating that some of the records were not imported. Please check the 'Log' sections to learn more about why the import failed.
Creating an import file
Header
In the first row of the CSV or JSON file, define the name of the data field as the headers of your data columns. You can use the name of the loyalty target fields, but you can map the fields of the import file with the loyalty fields during the import setup, through the ‘Field Settings’ section.
The example below shows how the header of a reward import would potentially look in the import file without mapping.
status,type,name,description,image_url,start_date,end_date,points |
When importing events, don’t forget to add the customer and action columns otherwise your import will fail.
Rows
As soon as the headers are ready, add the data values in subsequent rows, each row representing one item to register.
The example below shows the content of the reward import file with the headers and the rewards to import.
status,type,name,description,image_url,start_date,end_date,points |
inactive,downloadable,reward name,reward,description,2021-05-31,2021-06-30,1500 |
There’s no limit on the number of items to be included in an import file.
Import pages
After the import has been created, you are automatically navigated to the View tab of the import page to track the status of the import which is visible in the upper right corner. You can reach this page anytime from the Imports list by clicking the ‘Details’ button of the import.
Downloading import files
There is a possibility to download previously imported files by following these steps:
Navigate to the Imports module page
Click the ‘Details’ button in the corresponding row
Navigate to the View tab that will show you the ‘File info' section on the right-hand side
Click the name of the import file
The file will be downloaded with the same filename and format as it was previously imported.
In order to prevent access to personally identifiable information, Backoffice administrators can determine which access level users can perform downloads under the Roles page.
Change import schedule
The scheduling of previously created scheduled imports can be updated through the Import page by following these steps:
Navigate to the Imports module page
Click the ‘Details’ button in the corresponding row
Navigate to the Change schedule tab
Modify scheduling settings as needed
Switching between On-date and Repeated schedule types is not possible.Click ‘Update’ to save your changes
Please note that changing schedule settings is not applicable to On-date scheduled imports that have already run their courses.