Skip to content

Freshop

Overview

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

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

  • Determine stores to export
  • For each store
    • Export Price file
    • Export Ad file
    • Save archive copies of exported files
    • Upload to Freshop via SFTP

Freshop's integration guidlines are here: http://freshop.freshopsites.com/knowledge-base/freshop-incoming-file-guidelines

SFTP upload is performed by WinSCP.exe

File Layouts

Only 2 of the possible Freshop files are supported:

  • Price (items, flags, and regular retails)
  • Ad (dated price batches)

  • 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 Freshop_T_NNNNNN_YYYY-MM-DD-HHMMSS.txt where
    • T is 'Price', 'Ad'
    • 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
Field Name Data Type Notes
Store # Integer  
Upc Integer No check digit
Brand Name Text  
Item Description Text  
Size Decimal eg. 1.0, 250
Unit of Measure Text
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  
Wic Boolean 1=Yes, 0=No
WicCvv Boolean 1=Yes, 0=No

Ad File

  • Price batches must have end dates to be considered. Start-Date only batches are not exported, these are future-dated changes to regular retail which is on the item file
  • Limited to price methods A,B
  • Limited to linked IBM coupons with :
    • Price Method 'A' and '91' limits (cents off)
    • Price Method 'E' and '91' limits and coupon price < 900 (net value)
  • Linked coupons calculated, i.e. the net price is calculated for 'Price Amount'
  • Multiple overlapping prices may exist for any item, and Freshop must determine correct price to use (recomment lowest price)
Field Name Data Type Notes
Store # Integer  
Batch Id Integer SmartGrocer reference field
Batch Description Text SmartGrocer reference field
Start Date Date yyyy-MM-dd
End Date Date yyyy-MM-dd
Upc Text  
Price Multiple Integer  
Price Amount Decimal 2 decimal places
Multi Price Group (Mix Match Code) Integer Blank if none
Batch Type Text Ad, InStore, TPR, etc

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
ExcludeDiscontinued Y=Do not export discontinued items, N=export discontinued items
FtpHost Hostname of the Freshop ftp server
FtpUser Provided by Freshop for each customer
FtpPassword Provided by Freshop for each customer

Sample Configuration File

Filename

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

Content

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings  file="global.config">
    <add key="ExportDir" value="D:\SmartGrocer\Freshop\Export"/>
    <add key="ArchiveDir" value="D:\SmartGrocer\Freshop\Archive"/>
    <add key="Stores" value="100,200,300"/>
    <add key="MovementDays" value="356"/>
    <add key="SeasonalGroupType" value="ONLINE ORDERING SEASONS"/>
    <add key="ExcludeDiscontinued" value="Y"/>
    <add key="FtpHost" value="sftp.freshop.com"/>
    <add key="FtpUser" value="userid"/>
    <add key="FtpPass" value="password"/>
  </appSettings>
  <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>