Versions Compared
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 demandWhen importing data, 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.
XASN files are routed configurations.
Note |
---|
Before version 1.3.1, entries are case sensitive. Make sure to enter these values as they appear. |
Comments
Comments are indicated by the '#' character and continue to the end of the line and can be at the beginning of a line, or at the end.
Paste code macro | ||
---|---|---|
| ||
# This is a comment
OriginName=0,CXT Software # This is also a comment |
Configuration Items
Paste code macro |
---|
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)
This value is set to the number of concurrent data files to be processed and will tell the system how many parallel processes to attempt to create. If this value is set to -1 it will tell the system to create as many as it can.
Can be used in both the XINI and XASN file types.
Note |
---|
If this value is NOT set, it will default to 1 to mimic current functionality. |
Paste code macro | ||
---|---|---|
| ||
ConcurrentDataFiles=-1 |
ConcurrentProcesses:
Expand |
---|
Can be set in the X Stream definition to run multiple XASN/XINI files at the same time. |
DataMask: Required
Specifies the extension of the import files (e.g., xml, txt, *).
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.
Paste code macro | ||
---|---|---|
| ||
DataMask=xml |
DataPath: Required
Directory to monitor for incoming files. If the directory is not on local machine, the fully qualified URI (\\server1\customer1\inbox) must be used.
Paste code macro | ||
---|---|---|
| ||
DataPath=c:\ximport\inbox |
Inherit: Optional
Specifies whether files moved to the “ProcPath” directory should inherit the permissions of that directory when moved. A value of “1” indicates files should inherit permissions, while a value of “0” indicates the file should retain its current permissions (default behavior).
Paste code macro | ||
---|---|---|
| ||
Inherit=1 |
Delimiter: Required
This specifies the type of file to be processed, and must be one of:
- “XML”: The input file is an XML formatted document
- “0”: The input file is a fixed-width file
- “TAB”: The input file is tab delimited
- “,”: The input file is in standard CSV format (See also: "Qualifier" item)
- Any other character: The input file will be split on this character.
Info |
---|
Starting version 1.3.0, the Delimiter value can be set to “Excel” to tell the import process to import Excel formatted files. This process supports Excel 2003 and Excel 2007 or newer files (*.XLS, *.XLSX, *.XLSB and *.XLSM). |
This functionality will require the installation of the 32 bit Microsoft Access Database Engine 2010 Redistributable.
Info |
---|
In versions prior to 1.4.3, the CSV file was limited to 201 columns. After 1.4.3, the CSV file can an unlimited number of columns. |
Paste code macro | ||
---|---|---|
| ||
Delimiter=XML |
ErrPath: Required
Directory in which to store any error log files for the import.
Paste code macro | ||
---|---|---|
| ||
ErrPath=c:\ximport\errors |
NumLinesSkipped: Optional
Indicates how many lines to skip from the top on an imported flat file. This allows you to bypass header rows in data files.
Paste code macro | ||
---|---|---|
| ||
NumLinesSkipped= |
PreProcessor: Optional
Full path to the preprocessor executable.
Paste code macro | ||
---|---|---|
| ||
PreProcessor=c:\ximport\plugins\eTracPreProcessor.ex |
Note |
---|
If running the preprocessor from a batch file, you must include the full path to the specified preprocessor within the batch file and not use a referential path. Example: c:\ximport\plugins\eTracPreProcessor.exe - would run properly from a batch file .\eTracPreProcessor.exe - would not run properly from a batch file |
ProcPath: Required
Directory in which to store copies of original import file and the log of XML requests used to place order.
Paste code macro | ||
---|---|---|
| ||
ProcPath=c:\ximport\processed |
Qualifier: Optional
Qualifier defaults to the double-quote character and should almost never be modified. The corner case where Qualifier may need to be specified is if import file format is a hybrid CSV file where escaped data is surrounded with a character other than the double-quote. This case is exceedingly rare.
Paste code macro | ||
---|---|---|
| ||
Qualifier=" |
URL: Required
Full URL to the XMLListener.asp file deployed by XInternet.
Paste code macro | ||
---|---|---|
| ||
URL=http://127.0.0.1/XMLListener.asp |
BaseNode: Optional; Required if using XML and Routed Only
The XML node used to indicate the base node.
Paste code macro | ||
---|---|---|
| ||
BaseNode=/OrdersXASN |
OrderNode: Optional; Required if using XML only
The XML node used to indicate orders. If listed, relative to BaseNode. Otherwise, it is an absolute path from the root of the document. See DATA ITEMS (XML) below.
Paste code macro | ||
---|---|---|
| ||
OrderNode=/Orders/Order |
ParcelNode: Optional; Required if using XML only
The XML node used to indicate parcels. See DATA ITEMS (XML) below. ParcelNode is relative to OrderNode if used in XINI or if BaseNode is specified in routed. Otherwise, it is an absolute path from the root of the document.
Info |
---|
This node supports XPath statements. These statements are powerful method to extend the capability of returning data. Example: if you wanted the ParcelNode to find all subnodes that start with “D_87”, you could use an XPath statement such as this: S_MAN[D_88_1="W"]/*[contains(local-name(),'D_87')] This statement only looks a S_MAN nodes that have a D_88_1 node that is set to “W” and then returns all sub nodes that start with “D_87”. |
StripBeginningQualifier: Optional; XML only
If the XML file submitted is wrapped in leading characters, this will prevent X Import from processing the document. This is because having leading characters is not valid XML. In order to modify the file into becoming valid XML, you can specify a mask of characters to strip out from the very beginning of the file if they are found. Note that this could be more than one character. Also note that this is not a dynamic field, so do not wrap the value in quote or begin it with 0,. StripBeginningQualifier is available beginning in X Dispatch 12.1.3 X Import.
Paste code macro | ||
---|---|---|
| ||
StripBeginningQualifier=” |
StripEndingQualifier: Optional; Required if using XML only
If the XML file submitted is wrapped in trailing characters, this will prevent X Import from processing the document. This is because having trailing characters is not valid XML. In order to modify the file into becoming valid XML, you can specify a mask of characters to strip out from the very end of the file if they are found. Note that this could be more than one character. Also note that this is not a dynamic field, so do not wrap the value in quote or begin it with 0,. StripBeginningQualifier is available beginning in X Dispatch 12.1.3 X Import.
Paste code macro | ||
---|---|---|
| ||
StripEndingQualifier=” |
SkipLinesIfBeginsWith: Optional
Expand | |||||
---|---|---|---|---|---|
A regular expressions used to test each line to see if it should be processed. If the regular expression matches the current line, it will be skipped and not be processed. This is only processed for fixed width and delimited imports. It will not be considered in an XML import. Available in XINI beginning with 12.1.4. Available in 12.0.0 for XASN. Here is a good reference for regular expressions: http://www.regular-expressions.info/reference.html
That regular expression matches any line that does not begin with a double quote ("). Therefore, any line beginning with something other than a double quote would not be processed by X Import. |
LogRetentionDays: Required, best practice to set between 3 and 7 days. (max set to 7 days for cloud except Amazon)
The number of days to keep files that are in the ProcPath (.proc, .original) and ErrPath (.err) directories (EdiProcessedPath (.proc, .original) and EdiErrorsPath (.bad) for EDI). If this settings is omitted from the configuration file the number of days to keep the files defaults to 90. If the value in the configuration file cannot be parsed as an Integer the number of days to keep the files defaults to 90. The minimum allowed value is 5. If the value in the configuration file is less than 5, only files older than 5 days will be deleted.
Paste code macro | ||
---|---|---|
| ||
LogRetentionDays=7 |
MaxReimport: Required with X Dispatch 14.2.4 or newer
The number of times to attempt to re-import orders that failed the attempt. Omitting this item or setting it to 0 will have no change on import functionality. Any numeric value higher than 0 will tell XImport to try X number of times to re-import the failed data before giving up.
This feature will only re-import failed orders/stops. Any successfully imported orders/stops will not be re-imported.
Paste code macro | ||
---|---|---|
| ||
MaxReimport=3 |
Data Items
There are three types of Data Items: static, dynamic, and macro.Imports can use XSLT on an Excel file. Make sure that the XSLT file is in a folder location that is accessible by the import process or by putting the XSLT file as an attachment and putting the attachment is in the import file (XINI/XASN).
The following is for both XINI and XASN file types unless otherwise noted.
Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CommentsComments are indicated by the '#' character and continue to the end of the line and can be at the beginning of a line, or at the end. Example
General Configuration ItemsConfiguration items are set using a Key=Value format. Example
File FailuresThe import plugin will move any failing data files to the ERRORS folder.
Example
Data Item TypesThere are three types of data items: static, dynamic, and macro. Static Data ItemsStatic 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:. Example
Dynamic Data ItemsDynamic data items allow you to set an item’s value based upon the type of input file. Macro Data ItemsMacro data items allow you to populate fields with certain pre-defined macros. Currently, the only supported macros are the following:
Expand | This would be useful if the time zone of the system running X Import does not line up with the time zone of X Dispatch. For example, if a customer on Cloud is set for Eastern time but the server running their instance is set to Pacific or central time.
Example
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:
The syntax for this type of macro manipulation is in the following form: Item=Macro&[OffsetHours:]OffsetMinutes|Transformation Where:
Note |
NOW is a macro that pulls the SERVER time, not the time local to the customer. The server time for Cloud customers is always AZTUTC 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 34 hours to the syntax example: Example
Dynamic data items allow you to set an item’s value based upon the type of input file. Make different hidden excerpts for each type with examples...maybe. |
On This Page:
Table of Contents | ||
---|---|---|
|
Related Articles:
Child pages (Children Display) | ||
---|---|---|
|
Search related import documentation
Live Search | ||||
---|---|---|---|---|
|