Imports - Stores
This article explains how to prepare a "stores" file for import with Splio.
Table of Contents
Prerequisites
- Basic knowledge of the CSV format and UTF-8 encoding.
- The sub-sequence must be defined in the config file under the "stores" scope.
- A UTF-8-enabled text editor.
- A spreadsheet software.
Preparation of a stores file
If necessary, use your spreadsheet software to save the stores file in the CSV format or to remove columns you cannot (or do not want to) import. Remember to save with UTF-8 encoding without BOM and use semicolons (";") to separate columns.
Use your favorite text editor to open and modify the import file.
Header and Columns
The first row of the file is the header. Make sure that it contains only column names, or the import will fail.
The following columns are available in "stores" files:
- store_id -- the external identifier of the store; this column is mandatory and must be unique for each store.
- name -- the name of the store.
- online -- 1 if an online store, 0 if not.
- store_type -- the type of the store to display in Splio.
- manager -- name of the store manager.
- A custom column, if defined for stores in your Splio universe.
Column names are always lowercase.
Remember that the import will fail if you do not include the mandatory column (store_id) or if you use a column which does not exist.
Example of a file
A short file containing three stores may look like this:
store_id;name;online
MSEST;Megastore East;0
EXBBY;Express Store Brigby;0
OLDLV;Online Delivery;1
All rows have exactly three columns, store_id, name, and online (only the last line is an online store). No custom columns are used.
Name your file
Save your file under a name composed of the universe name, scope ("stores"), sub-sequence, and current date. For example:
myuniverse_stores_apparel_20180315.csv
This filename belongs to the universe "myuniverse", sub-sequence "apparel" defined for stores, and is dated March 15, 2018.
If you wish to know more, consult the File Naming and Grouping guide.
You can now upload the file to SFTP/FTPS.
Advanced Information
This part of the document contains additional information which supplements the guide above and provides more detail.
File format
Filename | <universe>_stores_<name>_<date>(_<id>).csv |
---|---|
Encoding | UTF-8 without BOM |
Format | CSV (no multiline) |
Column separator | ; (semicolon) |
Text qualifier | " (double quote, optional) |
Escape character | \ (backslash) |
End of line | \n or \r\n |
Decimal separator | . (dot) |
Columns
The table below contains detailed information about all columns (fields) in the "stores" scope.
/!\ Remember that all column names are case sensitive. For this reason, default names are all lowercase.
Column | Mandatory | Data Type / Maximum length | Description |
---|---|---|---|
store_id | Yes | Text (max. 50 characters) | This column represents the external identifier of the store to import. It serves as the primary key of the stores table, therefore Splio will ignore all files where this column is absent and will skip all lines where it does not contain a value. |
name | No | Text (max. 120 characters) | The name of the store as displayed in Splio. |
online | No | Boolean (0/1) | The online status flag of the store as displayed in Splio. |
store_type | No | Text (max. 120 characters) | The type of the store as displayed in Splio. |
manager | No | Text (max. 120 characters) | The manager of the store as displayed in Splio. |
<custom> | No | Text (max. 255 characters) | See below |
You can include custom fields defined in your Splio universe as part of the stores table in your imports. To do so, use either the name of the field as the column name, or the letters "c" (lowercase) followed by the numerical id of the field.
For example, if you have a field called "franchise" in your base, and its id is 12, you can use either "franchise" or "c12" as the name of the column.
Bear in mind that if Splio cannot recognize the name of a column, it will not import the file.
Monitoring
The following information is made available by Splio after import, usually in the form of the log file in the /imports/logs
folder.
- Whether the import was aborted or not and, if aborted, the reason (unknown column, missing external id column, undeclared custom field)
- The number of lines treated (imported+skipped)/imported/skipped
- The number of new and updated records
- The reason each line was skipped (external id NULL, too many/not enough columns)