Skip to content

DoorDash

Overview

SmartGrocer integrates with DoorDash via flat-file interface, with files generated by the command-line program ExportDoorDash.exe.

This program is typically run 1x daily, with the exact time determined by the customer & DoorDash together. The basic processing flow is:

  • Determine stores to export
  • For each store
    • Export Price file
    • Save archive copies of exported files
    • Upload to DoorDash

FTP/SFTP upload is performed by WinSCP.exe

File Layouts

2 files are exported fror DoorDash:

  • Price (items, flags, and regular retails)
  • Sales (Items that sold in last N days)

  • All files are text 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 T_NNNNNN_YYYYMMDD.csv where
    • T is 'Price' or 'Sales'
    • NNNNNN is DoorDash's customer #
    • YYYY is 4-digit year
    • MM is 2-digit month (01-Jan, 02-Feb...)
    • DD is 2-digit day of month

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
TODO  

Sales File

Field Name Data Type Notes
TODO  

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
DoorDashStoreId-XXXX Map SpartanNash customer # to a DoorDash Customer #
ExportSalesFiles 'Y' if the customer signed up this with DoorDash
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
FtpDir Directory to upload to on DoorDash's server
FtpHost Hostname of the DoorDash ftp server
FtpUser Provided by DoorDash for each customer
PrivateKeyPath Full path to a public key file for this specific customer for signing into DoorDash's FTP server

FTP Configuration Notes

DoorDash 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 DoorDash
    • They configure the public key in their FTP server
  • Put the .PPK file on the SmartGrocer server in D:\SmartGrocer\DoorDash and put the path to that into ExportDoorDash.exe.config
  • DoorDash will provide a "user name" that gets plugged into ExportDoorDash.exe.config in the 'FtpUser' setting
  • SFTP login uses the user name + the private key

More info about this is availabe here: DoorDash_SFTP_FOR_POS_PROVIDERS.pdf

Sample Configuration File

Filename

C:\Program Files (x86)\SmartGrocer[HQ|SS]ExportDoorDash.exe.config

Content

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings file="global.config">
    <add key="ExportDir" value="D:\SmartGrocer\DoorDash\Export"/>
    <add key="ArchiveDir" value="D:\SmartGrocer\DoorDash\Archive"/>
    <add key="Stores" value="1021"/>
    <add key="DoorDashStoreId-1021" value="23019352"/>
    <add key="ExportSalesFile" value="Y"/>
    <add key="MovementDays" value="90"/>
    <add key="SeasonalGroupType" value="ONLINE ORDERING SEASONS"/>
    <add key="ExcludeDepartments" value=""/>
    <add key="ExcludeDiscontinued" value="Y"/>
    <add key="FtpDir" value=""/>
    <add key="FtpHost" value="sftp.static-edge.doordash.com"/>
    <add key="FtpUser" value="whatever_user"/>
    <add key="PrivateKeyPath" value="D:\SmartGrocer\Doordash\DoorDash_whatever_M####.ppk"/>
  </appSettings>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
    </startup>
</configuration>