Kourier Integrator Online Help

XML to U2 Import Specification

Purpose

This page is used to define either an XML to U2 data Import Specifications or REST Import Specification. Both are used to import data from an external file or data source in XML format, and then load the data into a U2 file.

REST Imports are typically processed in real-time, rather than as a scheduled process like a standard import. Introduction to Kourier Integrator REST Resources for more information.

A XML to U2 Import Specification has two parts: target file options (qualification, event handlers, import process, etc.) and the import field mapping. The import field mapping lists the fields to be included in the data import file, the column headings to use, data conversions, etc. 

Here's the typical workflow when creating a XML to U2 Import Specification:

  1. Create an Import and add one or more line items to define the target import field mapping to the source XML file.
  2. Use the Test command without the Write to Disk option to verify the import mapping and conversions are working correctly.
  3. Use the Test command with the Write to Disk option to do a final verification that the import is writing to the target file correctly.
  4. An import is typically automated and processed as part of a Kourier Service using the command KMK.IMPORT.

Imports is an advanced feature, please contact Kore Technologies if you need assistance.

Available Toolbar Commands

Click the New icon in the toolbar to save the current import specification and then reset the page for new data entry.

Click the Save icon in the toolbar to save the current import specification and return to the import specifications listing.

 

Click the Save and Stay icon in the toolbar to save the current import specification and continue working.

Click the Save As icon in the toolbar to save the current import specification to a new name. You will be prompted to enter a new name. Click OK to save the import to a new name and then continue editing the import. Click Cancel to return to the existing import without saving.

Click the Delete icon in the toolbar to delete the current import specification. You will be prompted with a "Are you sure you want to delete?" dialog. Clicking Yes will permanently delete the import and then return to the import specifications listing. Click Cancel to return to the existing import without deleting.

Click the Test icon in the toolbar to test an import. Testing an import will perform a sample data import from a test file using all of the information entered on the import specification and then displays the results to the screen where it can be viewed and validated. Typically a test is performed to ensure that the correct data fields are being imported and all data conversions, formats, and formulas are working correctly.

After clicking the Test icon, you will see a dialog requesting additional information:

  • Commit Mode: Select one of the options (Insert, Update, Delete, Upsert) to use in the test.
  • File Name: Browse for the file to use with the test.
  • Transaction Tag: Enter the character to use as the transaction tag for the test.
  • Transactions to sample: Enter the number of records to run through the test.
  • Write records to disk: Enable this checkbox when you are ready to actually write the data to the file as part of the test.
  • Request Headers:   Enter the name(s) of your HTTP request headers followed by a space, followed by it's value. Each header should be entered on a single line.
  • Output As: Select an output format.

Click the Continue button to view the import results or click the Cancel button to return to the Import Specification page.

For this feature to work correctly you will need to: 1) Add the Kourier website as a trusted site so pop-up dialogs appear and 2) enable the automatic prompting for downloads option in your browser's internet options (e.g., for Internet Explorer this setting is found in Security | Custom Level dialog).

 

To see the runtime statistics for an individual import, click the Statistics icon from the toolbar. This will take you to the Import Specifications Listing which displays all import statistics that have been captured for the import. 

Click the Help balloon to open the help for this page.

File/Key Field

KT_IMPORTS/Import Name

Prerequisites

If an import contains user-defined literals, they should be entered using Substitution Literals.

Fields

Field Name

Description - Usage - Notes

Name

Enter a unique name for the Import. By convention, imports are named using an Integration ID such as KS for KommerceServer, followed by an underscore and a string that describes its purpose (e.g., KS_CONTACTS). 

Title

Enter a short descriptive name for this import. This name is displayed in on-line lookups.

Supported Operations

An import is typically designed for specific types of transactions (Insert, Update and Delete), and using the supported operations allows you to indicate what types of transactions you want to allow and Kourier will manage this for you without you having to write any code to enforce the rule.

Select from the drop down list the type(s) of file time operations that can be performed by this Import Specification:

Operation

Usage

Inserts

Only new records can be created.

Updates

Only existing records can be updated.

Deletes

Only existing records can be deleted.

Inserts+Updates

New records can be created, and existing records can be updated.

Inserts+Deletes

New records can be created, and existing records can be deleted.

Inserts+Updates+Deletes

New records can be created, existing records can be updated, and existing records can be deleted.

Updates+Deletes

Existing records can be updated or deleted.

This may override any event handlers if the supported operations are inconsistent with the state of the record after it was read. For example: if after the record was read it is determined that it is a new record, and the Supported Operations do not include Inserts, it will cause an error to be generated.

Log Transactions

Enable the checkbox if you would like to enable transaction logging for this import specification. The default is normally true.

Notes 

Enter a free form comment or note for this Import Specification. If a note is entered, a small icon will display on the Import Specification listing. Hovering your mouse over the icon will display about 40 characters of the note. 

Target File

Enter the name of the file that will be the target for importing data.

Record Tag

The XML Tag that indicates the transaction boundary for records. Example: <Order.SalesOrderHeader>. Enter forward slash "/" if there is not a record tag.

Attribute

Enter the attribute to be used within the XML for processing validation, case is important. Used in combination with Attribute Value below.

Attribute Value

Enter the attribute value to be used in combination with Attribute to determine if the XML document should be processed by this Import Specification.

Event Handler

Select the Event Handler for which you want to view/edit and click the edit icon . Events that contain code will be displayed in angle brackets (e.g., <Before Read>). 

Available Event Handlers are:

Each Event Handler has a specific timing and usage during an import, which is explained in the Import Specification Event Handlers topic. 

Line Item Fields

Click the add button in the line item section command bar to add a new line item field or click the Line number to edit an existing line item. For more information on each individual field, see the help for Import Specification Line Item

Related Topics: 

Import Specification Event Handlers

Kourier Import Processing Guide

Kourier Services

Kourier Import Processing Guide

Kourier Import Services Guide

XML to U2 Import Specification Line Item