This topic explains how to merge fields from the SQL Extension interface with fields from the main ERP interface. Certain key fields need to match between the main ERP and Extension interfaces; these can be configured with these merge settings. Note that SQL Extension will only work with the same document types and documents as the main ERP interface.
StarShip merges the main ERP interface document to the SQL Extension document using the Document Key (<Use Document Key> in the Merge Settings) by default.
You can set a different field by which to merge, such as Order Number. It is only necessary to set up a merge field if you will be supporting merging multiple orders and not using the default setting. Merging related orders can be set in Financial System Interface Setup under Options > 'Retrieve related documents (those having the same ship-to address) when shipping'.
You can also manually add documents to a shipment using the Shipping Assistant or from the Order View in StarShip.
When Extension is enabled, there must be a matching Extension Document Key for the Main document key entered by the user. If there is no match, neither document will be imported and the user will receive an error.
See also : For more information about shipping against multiple documents with the Shipping Assistant, see Add Documents.
A merged field should be defined when both the main ERP interface and SQL Extension document mappings will be used. StarShip will ignore any SQL Extension Interface line items that do not correspond to the main ERP interface line items by the selected merge field.
Line Items merge settings have a field called <Use Line Number>. This is NOT a default. The fields within <> are internal fields and are not found in main ERP interface Field List.
Line Items merge has no default field. It must be defined in order to merge main ERP document line items to Extension line items. When line item fields are only coming from either the Extension database OR the main ERP interface database, you do not have to define a merge field for line items.
If you do not have an appropriate field from the ERP interface to use, such as ItemID, you could set the merge field to <Use Line Number>. In this case, StarShip will use the sequence index of StarShip line items and the sequence index of Extension line items to merge. Each line item in the main ERP document will be merged with its corresponding line item in the Extension document ( 1 <-> 1, 2 <->2, etc.). Please note that because the sequence of items cannot always be guaranteed, the line items may not be a match but the fields will be merged regardless of this.
UOM : The UOM may be provided, as well as the Item Code, if it is possible that you have duplicate items with different UOMs.
Sequence : When using the line number sequence, it is possible that line items from the main ERP interface will be imported in a different order than how they are stored in the Extension database. Therefore, a mismatch is possible.
Define a merged field when both the main ERP interface and SQL Extension document mappings will be used. If you are mapping to only one or the other, you do not need to define anything here.
If the Extension interface does not have a field called Package ID, select which Extension field to match with the main ERP imported Package ID, or StarShip's Package Number (if Package ID is not provided by the main ERP interface).
The fixed field called Package ID more easily allows interface developers to update package level information in the ERP interface upon write-back. If importing Packages with SQL Interface you can designate a Field in the Field List as "Package ID". You would then map this field to table.field in your custom database that would store a Package ID. When used, it should represent a unique identifier for the package. StarShip will return a Package ID field ({WBPackage.Package ID} ) containing the package ID you imported.
Using this field is optional. If you do not specify a Package ID field in your field list and import, StarShip uses the Package Number as the value for the {WBPackage.Package ID}.
Guidelines for using Package ID :
The Document file is the input file from the ERP interface. When Package ID is specified, it will be used as a unique identifier for the package. This field will also be preserved in the Shipment File with the same value for the package. This field does NOT have to be listed in the Field List xml to be recognized. A Package ID field added to the Field List in the SQL Interface Builder will be used in the same way.
The Shipment File is the output or write-back from StarShip to the ERP interface. For SQL FSI interfaces, this would be the Write-Back SQL statements.
When Package ID is specified, it will be used as an Index number for imported packages. For packages added manually by the user, the value will always be -1. If the Document file imported contains a Package ID field with a valid value, the same value is returned in the Shipment file. If no Package ID was initially imported, this field will use the Package Number value instead. This field does NOT have to be listed in the Field List xml to be recognized.
Batches from the SQL Extension interface are ignored.