Versions Compared
Version | Old Version 1 | New Version Current |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
When importing data into X Dispatch, it is important to know the structure of an X Import configuration file. There are two types of files, which can be distinguished by their file extension. XINI files are On Demand configurations, while XASN files are routed. Both types of files will be discussed below. The structure is as follows:
Note |
---|
Before version 1.3.1, these entries are case sensitive. Please make sure to enter these values as they appear. |
Comments
Comments are indicated by the '#' character and continue to the end of the line
Comments can begin at the beginning of a line, or after an Item.
Expand | ||
---|---|---|
| ||
# This is a comment OriginName=0,CXT Software # This is also a comment |
Configuration Items
There are two different types of items: Configuration Items, and Data Items. This section deals with configuration items. Data Items will be more thoroughly examined in the following sections.
DataPath=C:\ximport\inbox # example comment
DataMask=XML
Inherit=0
ProcPath=C:\ximport\Processed
ErrPath=C:\ximport\Errors
# another comment
URL=http://127.0.0.1/SampleWeb/XMLListener.asp
Delimiter=XML
Configuration items are set using a Key=Value format, where key must be one of:
ConcurrentDataFiles: Optional (starting in version 1.2.0)
Expand | ||
---|---|---|
This value is set to the number of concurrent data files to be processed. This value will tell the system how many parallel processes to attempt to create. The system will only create up to that many of processes at one time. If you set this value to -1 it will tell the system to create as many as it can. This value can be used in both the XINI and XASN file types.
EX: ConcurrentDataFiles=-1 |
ConcurrentProcesses:
Expand |
---|
Can be set in the X Stream definition to run multiple XASN/XINI files at the same time. |
DataMask: Required
Expand |
---|
Specifies the extension of the import files (e.g., xml, txt, *). N.B.: To disregard the file extension, you may use '*', however the DataMask item should be set whenever possible to prevent the processing of unintended files. Many times, third-party companies sending the import files will upload the file with a ".tmp" extension and rename the file to the correct extension only once the upload has been completed. If the DataMask is set to '*' these temporary files may be processed before they have been completely transferred. EX: DataMask=xml |
Data Items
There are three types of Data Items: static, dynamic, and macro.
Static Data Items
Static data items allow you to populate fields with known values. For example, if all of the deliveries sent in on an ASN will be assigned the same order type, origin address, etc. Static data items can be set by prepending the argument with “0,” followed by the static value.
EX: UserID=0,ximport-mckesson
Macro Data Items
Macro data items allow you to populate fields with certain pre-defined macros. Currently, the only supported macros are the following:
NOW will return the current timestamp at the time of processing, e.g. “04/20/2008 11:11”
Expand |
---|
AKA "Server Time" This would be the time of the server on which X Import is running. Time may be added and subtracted in minute increments by appending the appropriate math after the “NOW” routekeyword
|
TODAY will return the current date at the time of processing with the time set to 12:00 AM, e.g. “04/20/2008 00:00”
CXTNOW will return the current date at the time of processing within cxtAsp.
EX:
PickupDate= NOW+360
DeliverDate=TODAY+2
Macro data items can also be manipulated to add time offsets. For example, if you receive an ASN for same day delivery and the file comes in at inconsistent times (11 PM one day and 1 AM the next), using the above macros may not be sufficient. For these cases, it is possible to add a time offset and then apply a date transformation.
If you want to accept a same day ASN before 3 PM, but roll everything after 3 PM to the next day, you could do the following:
EX: PickupDate=NOW&09:01|DAYFLOOR
The syntax for this type of macro manipulation is in the following form: Item=Macro&[OffsetHours:]OffsetMinutes|Transformation
Where:
Item is a valid Data Item for the configuration file.
Macro must be one of: NOW (see NOTE below) or TODAY.
OffsetHours specifies the number of hours to add to the evaluated macro (required)
OffsetMinutes specifies the number of minutes to add to the evaluated macro (required)
Transformation is one of:
DAYFLOOR: Set the resulting time to 00:00
DAYUPPER: Set the resulting time to 00:00 and adds one day
WEEKDAYFLOOR: Behaves similarly to DAYFLOOR. If the time, after adding the OffsetHours and OffsetMinutes, is on a Saturday or Sunday, it will be pushed to the following Monday and then set the resulting time to 00:00 (NOTE: WEEKDAYFLOOR was added in 12.0.6 in ticket MAIN-2096)
NOTE: NOW is a macro that pulls the SERVER time, not the time local to the customer. The server time for Hosted customers is always AZT and the imported files will show the time local to the customer. In the example above, if the customer’s local time is EST you would need to add 3 hours to the syntax example:
EX: PickupDate=NOW&12:01|DAYFLOOR
Dynamic Data Items
Dynamic data items allow you to set an item’s value based upon the type of input file and are discussed in the following two sections.The syntax for the routed ASN configuration is slightly different than on demand, however many similarities exist.
The primary difference is that routed ASN configuration files introduce the concept of using two nodes, one to represent the order information and the other for the parcel information (usually rsMaster and rsSecondary, set with the Nodes configuration item.) In the following examples, the node names of rsMaster and rsSecondary are assumed:
Example
Code Block |
---|
Nodes=rsMaster,rsSecondary |
General
Insert excerpt | ||||
---|---|---|---|---|
|
Data Items
Data items are set using a Node|Key=Value format.
The syntax of Value varies based on the Delimiter item (i.e., whether the input file is XML, delimited, or fixed-width).
Data Item | Description | ||
---|---|---|---|
rsMaster|EncryptedPassword | Required Specifies whether the Internet User's password has been encrypted. Most of the time, this should be set to true. Example
| ||
rsMaster|Password | Required Password for the Internet User used for placing orders. Example
| ||
rsMaster|UserID | Required Internet User to use for placing the orders. Example
| ||
rsMaster|CustID | Required Customer ID used to place the order. Example
|
Route Stop Details
Data Item | Description | ||||||
---|---|---|---|---|---|---|---|
rsMaster|Address | Required The address to use for the current route stop. | ||||||
rsMaster|Address2 | Required The address line 2 to use for the current route stop. | ||||||
rsMaster|BOL | Optional The BOL (Bill of Lading) data to which route stops may be associated. Maximum length = 50. Example
| ||||||
rsMaster|City | Required The city to use for the current route stop. | ||||||
| Optional The primary reference for looking up route translations (See Configuration: X Import Translations.) | ||||||
| Optional The secondary reference for looking up route translations (See Configuration: X Import Translations.) | ||||||
rsMaster|RouteSortRuleID | Optional If a fixed RouteID is not set, and CustRouteID/CustSecondary lookup is not utilized or fails to find a match, the database tries to find the lowest OrderTypeID that contains a destination sort rule and uses that sort rule to try and determine the route.
RouteSortRuleID allows you to explicitly set the route sort rule used to set the route in that case. This means you can use an existing route sort rule instead of setting up translations or can set a specific sort rule to use as a fallback should the route translations fail. This uses the RouteStop Prefered time when using the sort rule to get the stop of a route. | ||||||
rsMaster|OverrideGLAccountID | Optional On a dynamic route stop, it is possible to set a specific GL account to assign to that stop. In order to override the GL account for an imported route stop, set this optional field to the ID of the GL Account you wish to use as the override. | ||||||
rsMaster|RateChartOverrideLookup | Optional This value sets the rate chart override lookup value, to be checked against values in the X Stream Route Mappings section. If the values match, the Translation field of the route mappings will be used as the stamp rate chart ID for rating all items on that route stop, rather than the customer’s default stamp rate chart ID. | ||||||
rsMaster|RateChartSecondaryLookup | Optional This value sets the rate chart secondary override lookup value, to be checked against values in the X Stream Route Mappings section’s Reference2 field, and if the values match, the Translation field of the route mappings will be used as the stamp rate chart ID for rating all items on that route stop, rather than the customer’s default stamp rate chart ID. If specified, this will be required in order to match.
| ||||||
rsMaster|RateChartSecondaryLookup | Optional Whether address should be geocoded to retrieve latitude and longitude, as well as validate the postal code up to 9 digits. This should generally be set to true. Example
| ||||||
rsMaster|Name | Required The name to use for the imported route stop. | ||||||
rsMaster|NodeName | Required The master node name should always be set to “ProcessRouteASN” Example
| ||||||
rsMaster|Pieces | Optional The number of pieces on the order. If this is not specified or is less than the number of parcels sent in for the route stop, the piece count will be set by the number of parcels specified in the request | ||||||
rsMaster|PK | Required The PK field sets the primary key for linking the rsMaster and rsSecondary data sets. rsMaster|PK should match rsSecondary|FK. The best fields to use for the primary key will generally be the original tracking or order number from the ASN. | ||||||
rsMaster|Plus4 | Optional The 4-digit postal code extension for the stop. | ||||||
rsMaster|PostDate | Required The date on which this route stop should be posted. | ||||||
rsMaster|Reference1 | Optional User-defined reference field 1. | ||||||
rsMaster|Reference2 | Optional User-defined reference field 2. | ||||||
rsMaster|RouteID | Optional The route ID onto which the route stops should be placed (See Configuration: X Import Translations, CustRouteID, CustSecondaryLookup.) | ||||||
rsMaster|Sequence | Optional The sequence number for the route stops. Generally, it is better to leave this item out of your configuration file and let the stops be auto sequenced on import. As such, if you wish for stops to sequence on your specified value here, then you must disable auto sequencing. | ||||||
rsMaster|State | Required The state to use for the imported route stop. | ||||||
rsMaster|StopNotes | Optional Stop-specific notes (e.g., “Dock 12”) | ||||||
rsMaster|StopTime | Optional The time at which this stop should be scheduled. This field can be set to “0,” which will set it to blank value and utilize the stop time preferred mappings or the current system time (at time of import). | ||||||
rsMaster|StopTimeFallback | Optional The time at which this stop should be scheduled if the StopTime set to “0,” which will set it to a blank value. If this field is not set, then the system will use the current system time (at time of import). | ||||||
rsMaster|StopType | Optional The stop type. Defaults to 1 (Delivery) if not specified or if an invalid stop type (anything other than 0-6) is specified. | ||||||
rsMaster|Weight | Optional The net weight of all parcels on this route stop. If this field is not specified, the cumulative weight of all parcels sent in will be used instead. | ||||||
rsMaster|Length | Length used in dimensional weight calculator. Data: ParcelLength stored in tblOrderRouteStop. It is displayed on the dimensional weight calculator on the route stop form as Length. | ||||||
rsMaster|Width | Width used in dimensional weight calculator. Data: ParcelWidth stored in tblOrderRouteStop. It is displayed on the dimensional weight calculator on the route stop form as Width. | ||||||
rsMaster|Height | Height used in dimensional weight calculator. Data: ParcelHeight stored in tblOrderRouteStop. It is displayed on the dimensional weight calculator on the route stop form as Height. | ||||||
rsMaster|DimWtDenominator | Dimensional weight denominator. Data: DimWtDenominator is stored in tblOrderRouteStop as DimWtDenominator. It is displayed on the dimensional weight calculator on the route stop form as Denominator. | ||||||
rsMaster|UseCalculatedDimensionalWeight | A flag if the Length, Width, and Height values are set to tell the import to calculate the Dimensional Weight. | ||||||
rsMaster|Zip | Required The postal code of the route stop.Secondary | ||||||
rsMaster|StopTimeMin | Optional Min stop time. | ||||||
rsMaster|StopTimeMax | Optional Max stop time. | ||||||
rsMaster|ShortRemarks | Optional Short remarks. | ||||||
rsMaster|LongRemarks | Optional Long remarks. | ||||||
rsMaster|EmailPod | Optional Email pod. | ||||||
rsMaster|XMobileSecondaryLookup | Optional Secondary lookup for X Mobile. | ||||||
rsMaster|ForceLocationScan | Optional Force Location Barcode (Mobile Secondary Lookup) checkbox, for Nextstop workflow. Example
When configured as true, this feature sets the driver requirement to perform a location scan for the route stop. | ||||||
rsMaster|CustomerRouteID | Optional Customer route ID. | ||||||
rsMaster|CustomerStopID | Optional Customer stop ID. | ||||||
rsMaster|CustomerAccountID | Optional Customer account ID. | ||||||
rsMaster|RouteOverride | Optional Route pay override. Example
The following will add an Override Settlement of $0.00 if LD is present in the S502 element but if not, will not function at all. Replace the 0 with a dollar amount if you want to include an Else scenario: rsMaster|RouteOverride=IIF(S502;"LD";"0.00";0)The following will add an Override Settlement of $0.00 if LD is present in the S502 element but if not, will not function at all. Replace the 0 with a dollar amount if you want to include an Else scenario: rsMaster|RouteOverride=IIF(S502;"LD";"0.00";0) | ||||||
rsMaster|AutoSequence | Optional Flag that determines if the route stops should be auto sequenced (based on the preferred time). True value is '1', False value is '0'. Defaults to '1' if the value is omitted from the file. | ||||||
rsMaster|AdvancedFallbackLookup1 | Optional Data: AdvancedFallbackLookup1 is stored in tblOrderRouteStops in the AdvancedFallbackLookup1 column. It is the ALF1 field under the miscellaneous tab in the Operations App. | ||||||
rsMaster|AdvancedFallbackLookup2 | Optional Data: AdvancedFallbackLookup2 is stored in tblOrderRouteStops in the AdvancedFallbackLookup2 column. It is the ALF2 field under the miscellaneous tab in the Operations App. | ||||||
rsMaster|RateChartOverrideLookup | Optional Data: RateChartOverrideLookup is stored in tblOrderRouteStops in the RateChartOverrideLookup column. It is the Rate Chart Lookup under field under the miscellaneous tab in the Operations App. | ||||||
rsMaster|ConsolidateStops | Optional Flag determines if stops Consolidate. Set to '1' to turn on consolidation. Intended to consolidate stops from separate ASN files that would have consolidated if they were contained in the same ASN file. RouteID, PostDate, CustID, Address, City, State, Zip are used to identify stop to consolidate with. This searches any route for consolidation keys newer than 30 days from current date. The behavior will allow stops to be created and NOT consolidate.Mapping Please note that this feature only works if the RouteID is being passed in from the ASN directly. If Route Mappings and/or Route Sort Rules are utilized, the Consolidation will fail. Example
| ||||||
rsMaster|ConsolidationText | Optional Intended to consolidate stops between ASN files. Use any string to set consolidation value - can be at any level. Example
ConsolidationText creates record in database in cxtData.dbo.tblOrderRouteStops_Consolidated. ConsolidationText should include the date since the consolidation text will try to look up anything that matches within the last 30 days. | ||||||
rsMaster|ODSyncField[XINI field name] | Optional The following 'ODSyncField' fields are available to match for synchronization with on demand orders. Each field is optional. If a match is found the stop is not imported. The field name is 'rsMaster|ODSyncField' prepended to the XINI field name found in the on demand section of this document. Example
| ||||||
rsMaster|ValidationFailOver | Optional When used, returns at the minimum the specified value information when the address does not validate as an exact match. Valid types are:
Example
| ||||||
rsMaster|MiscData|[...] | Optional This is a dynamic field, which will store any amount of data as properties in a JSON object in the database. The [...] above can be replaced with any string and used as many times as needed. Data can be queried using a function that engineering has created.
ExamplesUsing the following in a XASN will store data as a property in a JSON object. rsMaster|MiscData|testfield1=0,sampledata Execute SELECT dbo.ParseJSONField(MiscData, 'testfield1') AS testfield1 FROM tblAdditionalData Returns “sampledata” Using the following in a XASN will store data as a property in a JSON object. rsMaster|MiscData|IntegrationData1=0,SampleA rsMaster|MiscData|IntegrationData2=0,SampleB rsMaster|MiscData|IntegrationData3=0,SampleC Execute SELECT |
Accessorials
Data Item | Description | ||||
---|---|---|---|---|---|
rsMaster|Accessorial1ID | Optional Used to include accessorial items imported from an ASN via XASN. This will be checked against the assigned rate chart and the rate will populate on the route stop. Maps to MiscItem1 on tblOrderRouteStops.
Example
| ||||
rsMaster|Accessorial1Quantity | Optional Used in conjunction with rsMaster|Accessorial1ID to specify the quantity for the items imported from an ASN via XASN. This will be checked against the assigned rate chart and the rate will populate on the route stop. Maps to MiscQty1 on tblorderRouteStops.
Example
| ||||
rsMaster|Accessorial2ID | Optional Used to include accessorial items imported from an ASN via XASN. This will be checked against the assigned rate chart and the rate will populate on the route stop. Maps to MiscItem2 on tblOrderRouteStops.
Example
| ||||
rsMaster|Accessorial2Quantity | Optional Used in conjunction with rsMaster|Accessorial2ID to specify the quantity for the items imported from an ASN via XASN. This will be checked against the assigned rate chart and the rate will populate on the route stop. Maps to MiscQty2 on tblorderRouteStops.
Example
|
User Field
Data Item | Description |
---|---|
rsMaster|UserField1 | Optional User data field 1. |
rsMaster|UserField2 | Optional User data field 2. |
rsMaster|UserField3 | Optional User data field 3. |
rsMaster|UserField4 | Optional User data field 4. |
rsMaster|UserField5 | Optional User data field 5. |
rsMaster|UserField6 | Optional User data field 6. |
Secondary
Data Item | Description | ||
---|---|---|---|
rsSecondary|FK | Required The FK field sets the foreign key for linking the rsMaster and rsSecondary data sets. rsMaster|PK should match rsSecondary|FK. The best fields to use for the primary key will generally be the original tracking or order number from the ASN.
| ||
rsSecondary|NodeName | Required The secondary node name should always be set to “Parcel”. Example
| ||
rsSecondary|ParcelPieces | Optional The number of pieces or items contained within this parcel. | ||
rsSecondary|ParcelReference | Optional Parcel-level barcode. | ||
rsSecondary|ParcelType | Optional The carrier-defined parcel type to use for the imported parcel. The ParcelType text can be the numeric ParcelTypeID from tblParcelTypes or the Description from tblParcelTypes - Description performs a wildcard search and used the first ParcelTypeID found where the Description contains the ParcelType text. | ||
rsSecondary|ParcelWeight | Optional The weight associated with this parcel. | ||
rsSecondary|PK | Required The PK field on the secondary node is used when aggregating parcels onto route stops. Generally, this item should be set to a unique parcel-level barcode, or a combination of route, stop, or any other uniquely identifying information. | ||
rsSecondary|ParcelDescription | Optional Description of the parcel. | ||
rsSecondary|ParcelReference2 | Optional Secondary reference field for the parcel. | ||
rsSecondary|ParcelMasterBarcode | Optional Secondary reference field for the parcel. This sets the Parcel Consolidation Barcode. | ||
rsSecondary|ParcelConsolidationBarcode | Optional This sets the Parcel Consolidation Barcode 2 | ||
rsSecondary|MiscData|[...] | Optional This is a dynamic field, which will store any amount of data as properties in a JSON object in the database. The [...] can be replaced with any string and used as many times as needed. Data can be queried using a function that engineering has created.
ExamplesUsing the following in a XASN will store data as a property in a JSON object. rsSecondary|MiscData|testfield1=0,sampledata Execute SELECT dbo.ParseJSONField(MiscData, 'testfield1') AS testfield1 FROM tblAdditionalData Returns “sampledata” Using the following in a XASN will store data as a property in a JSON object. rsSecondary|MiscData|IntegrationData1=0,SampleA Execute SELECT |
Example
Code Block | ||
---|---|---|
| ||
DataPath=E:\ximport\CardinalOD
DataMask=XML
ProcPath=e:\ximport\Processed
ErrPath=e:\ximport\Error
URL=http://127.0.0.1/XMLListener.asp
Delimiter=XML
NumLinesSkipped=0
Nodes=rsMaster,rsSecondary
rsMaster|UserID=0,test
rsMaster|Password=0,TESTTEST
rsMaster|EncryptedPassword=0,1
rsMaster|CustID=0,1218
rsMaster|CustRouteID=230,6
rsMaster|CustSecondaryLookup=0,x
rsMaster|ContractID=0,69290
rsMaster|NodeName=0,ProcessRouteASN
rsMaster|PK=Route$RouteNumber,Route/Stop$StopNumber,Route/Stop/Customer$CustomerNumber
rsMaster|BaseNode=/CardinalDistributionShipmentFile/Shipment
rsMaster|Address=Route/Stop/Customer$CustomerAddress
rsMaster|City=Route/Stop/Customer$CustomerCity
rsMaster|GeoCode=0,1
rsMaster|Name=Route/Stop/Customer$CustomerName1
rsMaster|PostDate=Route/Stop/Customer$InvoiceDate
rsMaster|Reference1=Route/Stop/Customer$CustomerNumber
rsMaster|State=Route/Stop/Customer$CustomerState
rsMaster|StopNotes=Route/Stop/Customer$CustomerName2
rsMaster|StopTime=0,12:00
rsMaster|Zip=Route/Stop/Customer$CustomerZip
rsSecondary|NodeName=0,Parcel
rsSecondary|PK=Route/Stop/Customer/ToteCase$ToteCaseID
rsSecondary|FK=Route$RouteNumber,Route/Stop$StopNumber,Route/Stop/Customer$CustomerNumber
rsSecondary|ParcelReference=Route/Stop/Customer/ToteCase$ToteCaseID
rsSecondary|ParcelPieces=1
|
On This Page:
Table of Contents | ||
---|---|---|
|
Related Articles:
Child pages (Children Display) | ||
---|---|---|
|
Search related import documentation
Live Search | ||||
---|---|---|---|---|
|