Auto-imports are a great way to ensure that you keep an external contact database synchronized with Emarsys. It is also the only way to import more than one file at a time. You simply define the fields that you want to import, the source where you will place the import files, and Emarsys takes care of the rest.
When you configure an auto-import, you place your source files either on a WebDAV folder (created by your Account Owner, see here for more details), or on your own SFTP or FTPS server. Emarsys checks the WebDAV for new files every minute, the SFTP or FTPS servers every hour.
In the case of SFTP auto-imports, 4096-bit RSA key-based authentication is available for higher security. For more information on setting up key-based authentication, please see: Security Settings.
All contacts imported via the auto-import are saved in the Emarsys application as a contact list. You can define whether these lists take the original name of the imported .csv file, or use the following naming convention:
auto-import-name YYYY-MM-DD HH:MM
In order to configure an auto-import, you will need a sample file. This is used to match the fields and values and to check that the text and field delimiters are correct. A sample file needs to have only one or two actual contacts but these must have:
- All the fields that will be included in the actual import files, in the same order as the import files.
- All the possible values for all the multiple- and single-choice fields in the import files.
Automated imports also support so called pre-processing, which is where encrypted files can be automatically uncompressed and imported. The pre-processing can be configured as part of the Automated Import configuration, and relies on the password for each file remaining the same. Both PGP (Pretty Good Privacy) and GPG (GNU Privacy Guard) are supported.
Emarsys supports a variety of standard compression formats, similar to those supported by 7-zip.org. For more information, please contact Emarsys Support.
The Auto-imports page
All the auto-imports that you have configured are displayed in the list at the top of the page. On this page you can:
- View, edit and delete existing existing auto-import configurations
- Enable and disable existing auto-imports
- Configure a new auto-import
Enabling and disabling auto-imports
You can also use the controls in the Status column to enable and disable auto-imports directly in the list.
Configuring a new Auto-Import
To configure a new auto-import, proceed as follows:
- Click Create New Auto-import to open the auto-import wizard.
Source file settings
In this step of the wizard you first have to select a name for your auto-import event. If the auto-import is successful, the contacts will be saved as a contact list with the event name and the timestamp in the list. The actual name of the contact list will be based on your settings. It can be Based on the Auto-import name or it can be Based on the uploaded file name.
Next, you have to define Where to look for the import file. This can be Emarsys WebDAV or a Remote source. For the latter you have to define a path for the remote source as well as the credentials for accessing it.
If you select sftp and Key as your Authentication type, you can select your previously created key from the drop-down menu.
Emarsys will verify these credentials on completing the wizard.
- Now you need to define the Import file settings. You have to specify a File name. This is a crucial step because you may configure many auto-imports in your account, and Emarsys must know exactly which naming convention applies to which import configuration. You can use the wildcard “*” to manage the dynamic parts of the file name, such as timestamps, etc.
- Example 1: “*.csv” will import all files with .csv extension.
- Example 2: “newsletter_*.csv” will only import .csv files starting with “newsletter”.
Please note that file names are case sensitive.
- Finally, specify the naming convention and password for the compression file, if one is used.
- Upload your sample file.
The file must contain all the fields you will use in your import files, in the same order and with all the options for single- and multi-choice fields.
For single- and multi-choice fields, both the field and all the available values must already exist in Emarsys.
When the file is uploaded you will be automatically taken to the next step.
In this step of the wizard you have to match the fields for your imports as for manual imports.
In the Settings section select the Unique identifier, the Opt-in declarations and the Contact language to use for the imported file.
The Unique identifier has to be defined to be able to handle duplicate email addresses.
- The Opt-in declarations setting is compulsory, the options available are:
Opt-in everyone in this import – All imported contacts are marked as Opt-in =
- In file – The opt-in setting is included in the file.
- Status undefined – No action is taken with regard to the opt-in.
Unsubscribe everyone in this import – All imported contacts are marked as Opt-in =
- Opt-in everyone in this import – All imported contacts are marked as Opt-in =
Show the Advanced Settings if you want to:
- Change the Delimiter.
- Change the Separator.
- Change the File language (this will affect how Emarsys recognizes the field names in the import file and matches them to fields in the database).
- Change the Date format used in the file. The supported date formats are:
You can also select to Ignore empty values and to Update only.
In the Field matching section, match the default fields in the drop-down menus to the fields used in the imported .csv file. If you have fields you do not want to include in your import, click Do not import (or select it from the menu). These fields will then display the Do not import flag. To reverse this decision, simply map the field again to an Emarsys field.
In the case of single- and multi-choice fields, map all the possible values to the parent field. If the name of the values in the import file is the same as the name of the values in Emarsys, they will be automatically matched. Otherwise you will have to map them manually in the Match Values step.
If you select Internal_ID as a unique identifier here, all previously selected fields will be deselected and you cannot add any other unique identifiers. If you want to use another field, you have to deselect the Internal_ID field first.
Click Next Step when you have finished matching the fields.
If you have single- or multi-choice fields in your sample file, you need to match its values to the system fields. If the names of the values are identical in Emarsys and the import file, they will be matched automatically (this includes capitalization), otherwise you match them manually here.
Select the relevant values and click Next step when finished.
When all desired settings have been applied, a summary of the auto-import event is displayed.
If the import fails, for example there was no unique identifier or the field mappings did not match, you will receive a message in the Notification Center giving the reasons and asking you to fix the errors and try again.