Instacart
Overview
SmartGrocer integrates with Instacart via flat-file interface, with files generated by the command-line program ExportInstacart.exe
.
This program is typically run 1x daily, with the exact time determined by the customer & Instacart together. The basic processing flow is:
- Determine stores to export
- For each store
- Export Price file
- Save archive copies of exported files
- Upload to Instacart
SFTP upload is performed by WinSCP.exe
File Layouts
Only 1 Instacart file is exported:
-
Price (items, flags, and regular retails)
-
All files are text with UTF-8 encoding
- Separate files sent for each store
- Files are not compressed
- 1 record per line
|
(pipe) delimited fields- Files named Instacart_T_NNNNNN_YYYY-MM-DD-HHMMSS.txt where
- T is 'Price'
- NNNNNN is Store #
- YYYY is 4-digit year
- MM is 2-digit month (01-Jan, 02-Feb...)
- DD is 2-digit day of month
- HH is 2-digit hour in 24-hr format
- MM is minutes
- SS is seconds
Price File
- Items are filtered for
- PosValid turned on
- Item Online Shopping flag turned on
- Movement > 0 for last N days (configurable)
- Item is not 'Seasonal' OR item is 'Seasonal' and is assigned to an active seasonal group
- Sale Unit is 'lb' if:
- Weight Required' flag is on
- OR Upc begins with '002' and ends with '00000' (like random weight meat)
- Sale price/Start/End are blank when item is not in an active price batch
- Sale price is a unit price, i.e. if batch price is 5/5, unit price is 1.00
Field Name | Data Type | Notes |
---|---|---|
Store # | Integer | |
Upc | Integer | No check digit |
Brand Name | Text | |
Item Description | Text | |
Size | Decimal | eg. 1.0, 250 |
Uom | Text | EA,PK,etc |
TaxA | Boolean | 1=Yes, 0=No |
FoodStamp | Boolean | 1=Yes, 0=No |
ScaleItem | Boolean | 1=Yes, 0=No |
Normal Price Amount | Decimal | 2 decimal places |
Normal Price Mult | Integer | |
Movement | Decimal | 2 decimal places |
Deposit Amount | Decimal | 2 decimal places |
Subdepartment # | Integer | |
Subdepartment Name | Text | |
Department # | Integer | |
Department Name | Text | |
Sale Unit | Text | lb or each |
Sale Price | Decimal | 3 decimal places |
Sale Start At | Date | MM/DD/YYYY |
Sale End At | Date | MM/DD/YYYY |
Configuration Options
Option | Purpose |
---|---|
ExportDir | Directory to write export file before transmitting |
ArchiveDir | Directory to keep copies of exported files |
Stores | Which stores to export from an HQ system. If blank, all stores exported |
MovementDays | Only export items that have sold in the past N days |
SeasonalGroupType | Only export seassonal items if assigned to a active product group with this type |
ExcludeDepartment | Comma separated list of subdepartment #'s to NOT export |
ExcludeDiscontinued | Y=Do not export discontinued items, N=export discontinued items |
PercentPriceIncrease | Percent value increase prices by. Ex. for 10% enter 10 |
RoundPricesTo5sAnd9s | If Y, round prices ending in 0-4 to end in 5, 6-8 to end in 9' |
FtpHost | Hostname of the Instacart ftp server |
FtpUser | Provided by Instacart for each customer |
FtpPassword | Provided by Instacart for each customer |
FtpProtocol | Ftp or Sftp |
Sample Configuration File
Filename
C:\Program Files (x86)\SmartGrocer[HQ|SS]ExportInstacart.exe.config
Content
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="global.config">
<add key="ExportDir" value="d:\SmartGrocer\Instacart"/>
<add key="ArchiveDir" value="d:\SmartGrocer\Instacart\Archive"/>
<add key="Stores" value="100,200"/>
<add key="MovementDays" value="356"/>
<add key="SeasonalGroupType" value="ONLINE ORDERING SEASONS"/>
<add key="ExcludeDepartments" value="901,902"/>
<add key="ExcludeDiscontinued" value="Y"/>
<add key="PercentIncreasePercent" value="12"/>
<add key="RoundPricesTo5sAnd9s" value="N"/>
<add key="FtpDir" value="/inventory-files/customer-files"/>
<add key="FtpHost" value="sftp.instacart.com"/>
<add key="FtpUser" value="user"/>
<add key="FtpPass" value="password"/>
<add key="FtpProtocol" value="Sftp"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>