UberEats
Overview
SmartGrocer integrates with UberEats via CSV interface, with files generated by the command-line program ExportUberEats.exe
.
This program is typically run 1x daily, with the exact time determined by the customer & UberEats together. The basic processing flow is:
- Determine stores to export
- For each store
- Export Item file
- Save archive copies of exported files
- Upload to UberEats
SFTP upload is performed by WinSCP.exe
File Layouts
1 single item file is exported fror UberEats with these specs:
- Text files with UTF-8 encoding
- Separate files sent for each store
- Files are not compressed
- 1 record per line
- CSV delimited fields
- Item description fields are "quoted"
- All other fields are un-quoted
- Files named uber.products.NNNN.YYYYMMDD.hhmmss.csv where
- NNNN is the SmartGrocer store #
- YYYY is 4-digit year
- MM is 2-digit month (01-Jan, 02-Feb...)
- DD is 2-digit day of month
- hhmmss is the current 24-hour (military) time
Item 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_number | integer | |
brand_name | string | |
item_name | string | |
eComm_department_key | integer | Department # |
eComm_department | string | Department Name |
size | string | size and uom |
price | decimal | unit price |
cost_unit | string | lb or each |
alcoholic | boolean | True of False |
deposit | decimal | bottle deposit amount |
tax_rate | decimal | tax rate from config file (6% should be .06) |
last_sold_date | date | date of last sale, MM/dd/yyyy format |
sale_price | decimal | low price of all active price batches |
start_date | date | start date of low active price batch MM/dd/yyy format |
end_date | date | end date of low active price batch MM/dd/yyy format |
lookup_code | string | upc |
tobacco | boolean | tobacco flag |
Sales File
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. Also controls total movement exported in Movement field |
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 |
TaxRate | State-specific tax rate |
FtpDir | Directory to upload to on UberEats server |
FtpHost | Hostname of the UberEats SFTP server |
FtpPort | Port number to use when connecting to SFTP server |
FtpUser | Provided by UberEats for each customer |
PrivateKeyPath | Full path to a private key file for this specific customer for signing into UberEats FTP server |
FTP Configuration Notes
UberEats uses an SFTP server, and login is with user name and public/private key encryption. Here's how that works:
- Use PuttyGen to create a private key file (.PPK)
- Start PuttyGen
- Click 'Generate'
- Key -> Parameters for Saving Files -> PPK File Version should be 2
- Save Private Key to a .PPK file
- Select text in the 'public key' field and copy to clipboard.
- Should start with 'ssh-rsa'.
- Be sure to select all of the public key
- Email the public key to UberEats
- They configure the public key in their FTP server
- Put the .PPK file on the SmartGrocer server in D:\SmartGrocer\UberEats and put the path to that into ExportUberEats.exe.config
- UberEats will provide a "user name" that gets plugged into ExportUberEats.exe.config in the 'FtpUser' setting
- SFTP login uses the user name + the private key
Sample Configuration File
Filename
C:\Program Files (x86)\SmartGrocer[HQ|SS]ExportUberEats.exe.config
Content
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings file="global.config">
<add key="ExportDir" value="D:\SmartGrocer\UberEats\Export" />
<add key="ArchiveDir" value="D:\SmartGrocer\UberEats\Archive" />
<add key="MovementDays" value="365" />
<add key="SeasonalGroupType" value="ONLINE ORDERING SEASONS" />
<add key="StoreId" value="ONLINE ORDERING SEASONS" />
<add key="TaxRate" value=".06" />
<add key="ExcludeDepartments" value="" />
<add key="ExcludeDiscontinued" value="Y" />
<add key="FtpDir" value="" />
<add key="FtpHost" value="sftp.uber.com" />
<add key="FtpPort" value="2222" />
<add key="FtpUser" value="" />
<add key="PrivateKeyPath" value="" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>