Skip to main content

XML Configuration

Overview​

The Standard Import can map any Excel or CSV structure. The Generic Import Profile is the default standardized column structure (Bucket_*, KeyValue_*, MediaAsset_*). Projects with a custom Excel layout define their own mapping here instead.

For complete configuration examples, including the Generic Import Profile (Default) and a custom project structure, see XML Configuration Examples.

If you want to understand how the mapping configuration works, or you want to apply it for your customer import, have a look at the reference below.

Where to find the configuration​

Inside the ISON application, navigate to the configuration file for the standard import:

com.priint.accpack.standardimport.StandardImportPlugin/WerkII/default/accpackStandardImport.xml

Editing this file in ISON will allow you to view and adjust the structure.

The configuration is split into the following parts, each described below.

Standard Import​

Defines which project and config ID this configuration applies to, and whether the import file is Excel or CSV.

<standardImport projectIdentifier="aio" configId="aio_standard" fileType="excel">
VersionAttributeDescription
1.1.*mode

delete: if root bucket exists, deletes everything before import

insert: does not touch existing bucket/content; inserts new bucket and content

update: same as insert but also updates existing bucket/content

default: delete

1.0.*projectIdentifier (removed from 1.4.7)Project identifier
configIdIdentifier for this configuration. Must match the configId of the import profile in the planner.
fileType (removed from 1.4.7)excel or csv
Example: fileType="excel" or fileType="csv"
charSetEncoding of the CSV data file. Not used for Excel.
Example: charSet="ISO-8859-1" (default: UTF-8)
delimiterColumn delimiter for CSV files.
Example: delimiter=";" (default: ,)

Structure​

Defines the bucket tree. Must mirror the entity model hierarchy. The import process walks this structure to create buckets and their content for each row.

Multi-level bucket tree (one bucket hierarchy per row):

<structure>
<bucket type="root" mappingId="AktionPreise">
<bucket mappingId="Aktion">
<bucket mappingId="Artikelnummer" />
</bucket>
</bucket>
</structure>

Single bucket per row (e.g. when importing from a multi-sheet Excel file where parent relationships are defined by the data):

<structure>
<bucket mappingId="bucket" />
</structure>
AttributeDescriptionExample
typeUse type="root" if the bucket tree has a static root bucket. Omit if the root bucket depends on data (e.g. multi-sheet Excel).type="root"
mappingIdReferences the mapping that defines how to populate this bucket.

Mapping​

Defines how to set attribute values for buckets and their content. Values can be transformed before being written.

Wrap mappings in the matching tag: <bucket>, <keyValue>, <context>, <mediaAsset>, <mediaObject>. Tag names are case-sensitive.

From version 1.4.*, add a validationId attribute to a <mapping> to enable row validation before import.

Bucket mapping​

Defines how to populate a bucket entity. The example below sets the bucket identifier, a concatenated label, and references key value, media asset, text, price, and metadata mappings.

If no sequence is configured, the row index of the input file is used.

<mapping id="Artikelnummer">
<attribute name="entityBucketId">
<value type="static" value="Preis"/>
</attribute>
<attribute name="label">
<value type="row_value" column="Aktion"/>
<value type="static" value="_"/>
<value type="row_value" column="Artikelnummer"/>
</attribute>
<keyValue mappingId="Preis_Attribute" />
<mediaAsset mappingId="Preis_Image" />
<text mappingId="Preis_Text" />
<price mappingId="Preis_Price" />
<metaData mappingId="Preis_MetaData" />
</mapping>
AttributeDescription
nameBuilt-in name of the bucket entity attribute. See entityMappingReference.xml for the full list per entity type.
Example: name="entityBucketId": the entity identifier
typeWhere the value comes from.
type="static" value="Preis": hard-coded text
type="row_value" column="Aktion": value from a column in the row
type="column_name" column="": the column name itself
transformIdReferences a transformation to apply before writing the value.
<attribute name="country">
<value type="row_value" column="priint_product_name" transformId="transform_country" />
</attribute>

KeyValue mapping​

Same as bucket mapping, with additional options.

To create multiple key values per row using a column range:

VersionAttributeDescription
1.3.0refKeyValueInsert a unit reference for a key value.
<mapping id="variant_thickness">
<refKeyValue mappingId="thickness_unit" />
</mapping>
<mapping id="thickness_unit">
<attribute name="identifier">
<value type="static" value="THICKNESS_UNIT" />
<value type="static" value="_" />
<value type="row_value" column="CODE" />
</attribute>
<attribute name="key">
<value type="static" value="unit" />
</attribute>
<attribute name="value">
<value type="row_value" column="THICKNESS_UNIT" />
</attribute>
</mapping>
ALL versionstype

range: use columns from colFrom to colTo (0-based index).

<mapping id="Artikel_Attribute" type="range" colFrom="0" colTo="5">
column_list: list specific column names, delimited by semicolons.
empty: use the row data as-is.


1.4.7column_list with startWith and endWith:
<mapping id="bucket-keyvalue"
type="column_list"
startWith="KeyValue_"
endWith="MediaAsset_;Price_;Text_">

MediaAsset mapping​

Same as bucket mapping. If both url and path are configured, url takes priority.

Example 1: file path

<mapping id="bucket-media-object">
<attribute name="path">
<value type="static" value="C:\PubServer_Base_<version>-Windows\userdata\images"/>
</attribute>
<attribute name="filename">
<value type="column" value="File Name"/>
</attribute>
<attribute name="media">
<value type="column" value="Media Name"/>
</attribute>
</mapping>

Example 2: URL

<mapping id="bucket-media-object">
<attribute name="url">
<value type="static" value="http://priint.com/images"/>
</attribute>
<attribute name="filename">
<value type="column" value="File Name"/>
</attribute>
<attribute name="media">
<value type="column" value="Media Name"/>
</attribute>
</mapping>

Price mapping​

The validFrom and validTo date attributes require a format matching the date string in the Excel file.

<mapping sheet="Price" id="bucket-price">
<attribute name="bucketId">
<value type="row_value" column="BucketID"/>
</attribute>
<attribute name="identifier">
<value type="row_value" column="identifier"/>
</attribute>
<attribute name="entityPriceId">
<value type="row_value" column="entity"/>
</attribute>
<attribute name="label">
<value type="row_value" column="label"/>
</attribute>
<attribute name="price">
<value type="row_value" column="price"/>
</attribute>
<attribute name="priceUnit">
<value type="row_value" column="price unit"/>
</attribute>
<attribute name="validFrom" format="M/dd/yyyy">
<value type="row_value" column="valid from"/>
</attribute>
<attribute name="validTo" format="M/dd/yyyy">
<value type="row_value" column="valid to"/>
</attribute>
<context mappingId="default-context" />
</mapping>

Text mapping​

Supports range and column_list types, same as key value mapping.

<mapping sheet="Text" id="bucket-text">
<attribute name="bucketId">
<value type="row_value" column="BucketID"/>
</attribute>
<attribute name="identifier">
<value type="row_value" column="identifier"/>
</attribute>
<attribute name="entityTextId">
<value type="row_value" column="entity"/>
</attribute>
<attribute name="text">
<value type="row_value" column="text"/>
</attribute>
<context mappingId="default-context" />
</mapping>

ContentMetaData mapping​

Supports range and column_list types, same as key value mapping.

<metaData>
<mapping id="Preis_MetaData" type="column_list" columns="ArtBez;GueltigAb">
<attribute name="entityContentMetaDataId">
<value type="static" value="Preis_MetaData"/>
</attribute>
<attribute name="key">
<value type="column_name" column=""/>
</attribute>
<attribute name="value">
<value type="row_value" column=""/>
</attribute>
</mapping>
</metaData>

Context mapping​

Example 1: static context

<mapping id="static-context">
<attribute name="country">
<value type="static" value="DE"/>
</attribute>
<attribute name="language">
<value type="static" value="deu"/>
</attribute>
</mapping>

Example 2: dynamic context from row data

<mapping id="default-context">
<attribute name="country">
<value type="row_value" column="Country"/>
</attribute>
<attribute name="language">
<value type="row_value" column="Language"/>
</attribute>
</mapping>

Example 3: file context: language and country detected from the import file name

<mapping id="file-context" type="file" contextDelimiter="_" country="" language="true" />
AttributeDescriptionExample
typeFixed valuetype="file"
contextDelimiterDelimiter between country and language in the file name_
country / languagetrue if the file name contains that value, empty otherwise

Cord mapping​

Version: 1.4.*

After importing buckets and bucket content, the process walks all imported buckets and creates cords.

Required attributes: entityCordId, sourceBucketId, sourceBucketEntityId, destinationBucketId, destinationBucketEntityId. If label is not defined, the label of the destination bucket is used. Cord mapping also supports context and metadata.

<cord>
<mapping sheet="Cord" id="accessory">
<attribute name="entityCordId">
<value type="static" value="accessories"/>
</attribute>
<attribute name="sourceBucketId">
<value type="row_value" column="Main product Item Code"/>
</attribute>
<attribute name="sourceBucketEntityId">
<value type="static" value="sku"/>
</attribute>
<attribute name="destinationBucketId">
<value type="row_value" column="Related product Item Code"/>
</attribute>
<attribute name="destinationBucketEntityId">
<value type="static" value="sku"/>
</attribute>
</mapping>
</cord>