Shophero
Overview
SmartGrocer integrates with ShopHero via flat-file interface, with files generated by the command-line program ExportShopHero.exe.
This program is typically run 1x daily, with the exact time determined by the customer & ShopHero together.
The basic processing flow is:
- For Each Store
- Export Item file to working dir
- Export Movement file working dir
- Export Price Batch/TPR File working dir
- Copy working dir files to archive dir
- Move working dir files to 'hot' dir where it will be uploaded later by ShopHero's own process.
File Layouts
- All files are text with UTF-8 encoding
- Separate files sent per-store
- Files are not compressed
- 1 record per line
- | (pipe) delimited fields
- Files named YYYYMMDDHHMMSS_XXX[_YYYY].txt where
- 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
- XXX is item, movement, tpr
- YYYY is Store #, only specified for item, tpr
Item File
- All items in SmartGrocer database included / nothing is excluded
| Field Name |
Data Type |
Notes |
| Store # |
Integer |
|
| Upc |
Integer |
No check digit |
| Brand Name |
Text |
|
| Item Description |
Text |
|
| Size |
Decimal |
eg. 1.0, 250 |
| UomCd |
Text |
eg OZ, ML |
| Department # |
Integer |
|
| Department Name |
Text |
|
| POS Description |
Text |
|
| Normal Price Mult |
Integer |
|
| Normal Price Amount |
Decimal |
2 decimal places |
| TaxA |
Boolean |
1=Yes, 0=No |
| TaxB |
Boolean |
1=Yes, 0=No |
| TaxC |
Boolean |
1=Yes, 0=No |
| TaxD |
Boolean |
1=Yes, 0=No |
| TaxE |
Boolean |
1=Yes, 0=No |
| TaxF |
Boolean |
1=Yes, 0=No |
| Bottle Deposit Amt |
Decimal |
0 if none |
| Restrict Sale Hours (Alcohol Flag) |
Boolean |
1=Yes, 0=No |
| Age 18 Check (Tobacco Flag) |
Boolean |
1=Yes, 0=No |
| Pos Valid (Item on point-of-sale) |
Boolean |
1=Yes, 0=No |
Movement/Active Item File
- Most recent movement date for all items that have ever sold
| Field Name |
Data Type |
Notes |
| Upc |
Text |
|
| Store # |
Integer |
|
| Last Sold Date |
Date |
yyyy-MM-dd |
Price Batches / TPRs
- SmartGrocer price batches with only start-dates not exported, these are future-dated changes to regular retail which is on the item file
- Limited to SmartGrocer IBM price methods A,B
- Only SmartGrocer price batches that have start and end dates
- Limited to Linked IBM coupons with '91' limits
- Linked IBM coupons for cents-off are calculated, in other words the net price is send in 'Price Amount'
| 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 |
Configuration Options
| Option |
Purpose |
| ExportDir |
Directory to write export file before transmitting |
| ArchiveDir |
Directory to keep copies of exported files |
| HotDir |
Directory where ShopHero process looks for file to upload |
Sample Configuration File
Filename
C:\Program Files (x86)\SmartGrocer[HQ]ExportShopHero.exe.config
Content
<?xml version="1.0"?>
<configuration>
<appSettings file="global.config">
<add key="ExportDir" value="D:\SmartGrocer\ShopHero\Export"/>
<add key="ArchiveDir" value="D:\SmartGrocer\ShopHero\Archive"/>
<add key="HotDir" value="D:\SmartGrocer\ShopHero\Hot"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>