Custom Orders Export for LSH
Version | Created by | Date | Notes |
---|---|---|---|
1.0 | Danail Deltchev | 16.10.2024 | First Publish |
The purpose of this page is to detail the custom Order export we need to create for LSH
General Info
We want to use our currently built functionality for Custom Exports by selecting “Custom” = Yes in an Automatic Export creation and from the dropdown then select the new Export with a name “LSH Orders Export”
Functionality should then work as everything else for an Export - FTP details to be picked from the Hemi Automatic Export record, email (if file needs to be sent to email) picked from there too.
As an Order Export we will want to employ the standard order export unique functionality as well, meaning we will want to track for each order exported with this Automatic Export, and store it in Automatic Exported Orders
- with the functionality of “Re Export Order” also working (if flag selected the order should be picked as if it is not previously exported and then the record for this specific OrderID should be updated again with the new export log ID, date, dropping the flag) and marking each successfully exported order by raising the flag Orders > Exported = Yes
for clear visibility on the order too (just a note - the flag Orders > Exported
should not be part of the blockers for selection - uniqueness should be tracked only by the table Automatic Exported Orders
)
The file that we need to export (the only reason why we are doing this as custom in the first place) is broken down in two sections
- Header row - containing information about the order in general
- Content information - a single row for each order item exported
Please note: in essence there are no “normal” headers in the file so any naming of headers below are for our benefit so we know about which field we are talking about
Example file:
20240521120317_shoppinglist.xfr
The file is a simple txt file just with the extension “.xfr” instead of “.txt” (.xfr should be picked from the standard name in the Automatic Export in Hemi)
Below you can also check a file with the fields and an “example” file I provided with LSH’s feedback (just in case it helps for anything) - field names will be used as per this filed in mapping below
Mapping & Specification
Mapping will be split in 2 sections - header mapping and order mapping
Header mapping:
File header | Hemi mapping | Hemi Note |
---|---|---|
File Name | * | This is one of the mandatory bits - as we generate the name for the file (which will be done through Automatic Exports > File Name ) we need to take the same value and put it in this field too. This information is then used by their system to check file name and this header for validity so it must be the same |
User | C5ERADOS | Hardcoded |
FILE | N/A | Empty value |
FileFormatIndicator | 1 | Hardcoded |
CustomerNumber | E0009 | Hardcoded |
CustomerName | Ebay Bham | Hardcoded |
OrderReference | N/A | Empty value |
OrderTitle | N/A | Empty value |
OrderType | 0 | Hardcoded |
DeliveryType | 2 | Hardcoded |
OrderDate | * | Use Current Date of the export in the format DDMMYYYY (16102024) |
OrderNumber | * | Use same value as OrderDate |
Currency | Orders > Currency | If Empty in Hemi hardcode to “GBP” |
Orders mapping:
File header | Hemi mapping | Hemi Note |
---|---|---|
PartNumber | Item > MPN | We need to map from the Product on Order to the Item by the SKU so we can pick the correct MPN to export |
Designation | Product on Order > Title | |
Quantity | Product on Order > Quantity | |
END | N/A | Empty value |
FILE | N/A | Empty value |
FILE | N/A | Empty value |
FILE | N/A | Empty value |
FILE | N/A | Empty value |
FILE | N/A | Empty value |
ListPrice | Product on Order > Item Trans Price | |
NetPrice | Product on Order > Item Trans Price | |
ReturnValue | N/A | Empty value |
DiscountGroup | 00 | Hardcoded |
Discount | 0.00 | Hardcoded |
PromotionDiscount | 0.00 | Hardcoded |
ItemNote | N/A | Empty value |
Specifications:
- File must be pipe delimited
- There should be no special escaping or enclosing symbols
- Wherever we export “empty value” the field should be there just ensure it is empty value
- We must export everything without the bundle item - meaning standard items and components must be exported, not the actual bundles