Connecting to the SFTP for automation data transfer requires very specific file naming conventions and formatting. The following outlines how to upload files into our User Ingestion Service. 


File Location
Please upload the file to the "user" folder.

File Name
The name of the file will need to be formatted as follows:
Ymd_His_upserted.csv or YYYYMMDD_HHMMSS_upserted.csv
Example: 20200709_165500_upserted.csv

**The timestamp will need to be at least 3 minutes in the past, Pacific Time, so if the time of the data pull is 12:00 the file name will need to be 20210503_115700_upserted.

File Format
The uploaded file must maintain the same format in a provided template file. All columns must be present and in the same order on each file upload. Each uploaded file must also contain a header in the first row.

Additional Details for Uploading User Files

Subscribers can be inserted (created), updated, deactivated, or reactivated based on the uploaded file name. User files must be uploaded to the user folder to be ingested.

File Name Format
File names must be formatted to include a DateTime prefixed with the “operation” you
would like to perform on the given subscriber records.

Multiple files of the same operation can be uploaded and processed starting from
the oldest DateTime in the file name. This ensures that incremental updates are applied to
subscribers in order as they occur.

Ymd_His_operation.csv

Ymd_His
A timestamp indicating when the user data was uploaded.
Y - 4-digit year
m - 2 digit month (01-12)
d - 2 digit day (01-31)
H - 2 digit hour (00-23)
i - 2 digit minutes (00-59)

operation
Indicates what you would like to do with the subscribers.
inserted - create records
deactivated - disable existing records
reactivated - enable existing records
updated – update existing records
upserted - update and insert records

Examples:
20200403_090208_inserted.csv
20200403_090309_deactivated.csv
20200403_090311_reactivated.csv
20200403_090315_updated.csv
20200403_090320_upserted.csv

Anatomy Of A User File

All user files are formatted as CSV and consist of a header in the first line proceeding with
rows of user data. A file may consist of many records to perform a single operation against.

File Header Row
Please see the ingestion template which you should have received from the Engaged Nation email specialists or Project Manager.

File Data Row
The following outline how the file row data must be formatted succeeding the file header row.
Data  
Format  
Operations  
birthday  
YYYY-mm-dd  
inserted, updated  
playerscard  
Max 255 Characters  
inserted, deactivated, reactivated, updated Required