Skip to main content

XML Configuration Examples

The following examples show complete standardImport XML configurations. These directly show how the configuration, maps to the structure of the table that is to be imported.

For the full attribute reference, see XML Configuration.

Example 1: Generic Import Profile (Default)​

This is the XML mapping configuration for the Generic Import Profile (Excel) file format. Use this as the starting point when your import file follows the Generic Import Profile column structure (Bucket_*, KeyValue_*, MediaAsset_*).

A Default import configuration using the Generic Import Profile column structure. Includes transformations to split Bucket_Context, KeyValue_Context and into separate language and country values, and a key value label translation sheet.

<!-- Default Import -->
<standardImport configId="Default" mode="delete">
<structure>
<bucket mappingId="bucket"/>
</structure>
<mappings>
<transformations>
<transformation column="Bucket_Context" id="bucket_language" value="substring-before(@Bucket_Context, '_')"/>
<transformation column="Bucket_Context" id="bucket_country" value="substring-after(@Bucket_Context, '_')"/>
<transformation column="KeyValue_Context" id="keyvalue_language" value="substring-before(@KeyValue_Context, '_')"/>
<transformation column="KeyValue_Context" id="keyvalue_country" value="substring-after(@KeyValue_Context, '_')"/>
</transformations>
<translations>
<translation applyFor="KEYVALUE" contextColumn="Context" keyColumn="Key" sheet="KeyValueTranslation" valueColumn="Label"/>
</translations>
<bucket>
<mapping id="bucket" sheet="Data">
<attribute name="identifier">
<value column="Bucket_identifier" type="row_value"/>
</attribute>
<attribute name="parentBucketId">
<value column="Bucket_parentBucketId" type="row_value"/>
</attribute>
<attribute name="entityBucketId">
<value column="Bucket_entityBucketId" type="row_value"/>
</attribute>
<attribute name="label">
<value column="Bucket_label" type="row_value"/>
</attribute>
<attribute name="template">
<value column="Bucket_template" type="row_value"/>
</attribute>
<attribute name="pageTemplateId">
<value column="Bucket_pageTemplateId" type="row_value"/>
</attribute>
<attribute name="sequence">
<value column="Bucket_sequence" type="row_value"/>
</attribute>
<context mappingId="bucket-context"/>
<keyValue mappingId="bucket-keyvalue"/>
<mediaAsset mappingId="bucket-media-asset"/>
<metadata mappingId="bucket-content-metadata"/>
</mapping>
</bucket>
<keyValue>
<mapping endWith="MediaAsset_;Price_;Text_;Cord_;Metadata_" id="bucket-keyvalue" sheet="Data" startWith="KeyValue_" type="column_list">
<attribute name="bucketId">
<value column="Bucket_identifier" type="row_value"/>
</attribute>
<attribute name="entityKeyValueId">
<value column="KeyValue_entityKeyValueId" type="row_value"/>
</attribute>
<attribute name="key">
<value type="column_name"/>
</attribute>
<attribute name="value">
<value type="row_value"/>
</attribute>
<attribute name="keyLabel">
<value type="column_name"/>
</attribute>
<attribute name="template">
<value column="KeyValue_template" type="row_value"/>
</attribute>
<attribute name="sequence">
<value column="KeyValue_sequence" type="row_value"/>
</attribute>
<context mappingId="keyvalue-context"/>
</mapping>
</keyValue>
<mediaAsset>
<mapping endWith="KeyValue_;Price_;Text_;Cord_;Metadata_" id="bucket-media-asset" startWith="MediaAsset_entityMediaAssetId" type="column_list">
<attribute name="bucketId">
<value column="Bucket_identifier" type="row_value"/>
</attribute>
<attribute name="entityMediaAssetId">
<value column="MediaAsset_entityMediaAssetId" type="row_value"/>
</attribute>
<attribute name="origin">
<value column="MediaAsset_origin" type="row_value"/>
</attribute>
<attribute name="sequence">
<value column="MediaAsset_sequence" type="row_value"/>
</attribute>
<attribute name="template">
<value column="MediaAsset_template" type="row_value"/>
</attribute>
<attribute name="label">
<value column="MediaAsset_label" type="row_value"/>
</attribute>
<mediaObject mappingId="media-object"/>
</mapping>
</mediaAsset>
<mediaObject>
<mapping id="media-object">
<attribute name="path">
<value column="MediaAsset_path" type="row_value"/>
</attribute>
<attribute name="filename">
<value column="MediaAsset_filename" type="row_value"/>
</attribute>
<attribute name="type">
<value column="MediaAsset_type" type="row_value"/>
</attribute>
</mapping>
</mediaObject>
<metadata>
<mapping id="bucket-content-metadata" sheet="Data" startWith="Meta_" type="column_list">
<attribute name="entitymetadataId">
<value column="Meta_entitymetadataId" type="row_value"/>
</attribute>
<attribute name="key">
<value column="Meta_key" type="row_value"/>
</attribute>
<attribute name="value">
<value column="Meta_value" type="row_value"/>
</attribute>
</mapping>
</metadata>
<!-- mapping context -->
<context>
<mapping id="bucket-context">
<attribute name="language">
<value column="Bucket_Context" transformId="bucket_language" type="row_value"/>
</attribute>
<attribute name="country">
<value column="Bucket_Context" transformId="bucket_country" type="row_value"/>
</attribute>
</mapping>
<mapping id="keyvalue-context">
<attribute name="language">
<value column="KeyValue_Context" transformId="keyvalue_language" type="row_value"/>
</attribute>
<attribute name="country">
<value column="KeyValue_Context" transformId="keyvalue_country" type="row_value"/>
</attribute>
</mapping>
</context>
</mappings>
</standardImport>

ISON config​

ISON import config

Input Excel file​

default-input-excel-file.png

Output bucket tree​

Output bucket tree

Example 2: Custom Project Format​

This example shows a project-specific XML configuration for a custom Excel structure that does not use the Generic Import Profile column naming.

<standardImport configId="custom" fileType="excel" mode="update" >
<structure>
<bucket mappingId="brand">
<bucket mappingId="range">
<bucket mappingId="sku"/>
</bucket>
</bucket>
</structure>
<mappings>
<validations>
<validation id="sku_attribute" type="object" value="plugin(globalName='com.priint.project.demo.custom.datamapping.ImportTransformPlugin',methodName='validateSkuAttribute')"/>
<validation id="sku_image" value="plugin(globalName='com.priint.project.demo.custom.datamapping.ImportTransformPlugin',methodName='validateSkuImage')"/>
</validations>
<transformations>
<transformation column="Range" value="plugin(globalName='com.priint.project.demo.custom.datamapping.ImportTransformPlugin',methodName='getRangeValue')"/>
</transformations>
<bucket>
<mapping id="brand" sheet="Bucket">
<attribute name="identifier">
<value column="Brand" type="row_value"/>
</attribute>
<attribute name="entityBucketId">
<value type="static" value="brand"/>
</attribute>
<attribute name="label">
<value column="Brand" type="row_value"/>
</attribute>
<keyValue mappingId="brand_identifier"/>
</mapping>
<mapping id="range" sheet="Bucket">
<attribute name="identifier">
<value column="Brand" type="row_value"/>
<value type="static" value="_"/>
<value column="Range" type="row_value"/>
</attribute>
<attribute name="entityBucketId">
<value type="static" value="range"/>
</attribute>
<attribute name="label">
<value column="Range" type="row_value"/>
</attribute>
<keyValue mappingId="range_identifier"/>
</mapping>
<mapping id="sku" sheet="Bucket">
<attribute name="identifier">
<value column="Item code" type="row_value"/>
</attribute>
<attribute name="entityBucketId">
<value type="static" value="sku"/>
</attribute>
<attribute name="label">
<value column="Name" type="row_value"/>
</attribute>
<keyValue mappingId="sku_identifier"/>
<keyValue mappingId="sku_attribute"/>
<mediaAsset mappingId="sku_image"/>
</mapping>
</bucket>
<keyValue>
<mapping id="brand_identifier">
<attribute name="identifier">
<value column="Brand" type="row_value"/>
<value type="static" value="_"/>
<value type="static" value="identifier"/>
</attribute>
<attribute name="entityKeyValueId">
<value type="static" value="attribute"/>
</attribute>
<attribute name="key">
<value type="static" value="identifier"/>
</attribute>
<attribute name="value">
<value column="Brand" type="row_value"/>
</attribute>
<attribute name="keyLabel">
<value type="static" value="identifier"/>
</attribute>
</mapping>
<mapping id="range_identifier">
<attribute name="identifier">
<value column="Brand" type="row_value"/>
<value type="static" value="_"/>
<value column="Range" type="row_value"/>
<value type="static" value="_"/>
<value type="static" value="identifier"/>
</attribute>
<attribute name="entityKeyValueId">
<value type="static" value="attribute"/>
</attribute>
<attribute name="key">
<value type="static" value="identifier"/>
</attribute>
<attribute name="value">
<value column="Range" type="row_value"/>
</attribute>
<attribute name="keyLabel">
<value type="static" value="identifier"/>
</attribute>
</mapping>
<mapping id="sku_identifier">
<attribute name="identifier">
<value column="Item code" type="row_value"/>
<value type="static" value="_"/>
<value type="static" value="identifier"/>
</attribute>
<attribute name="entityKeyValueId">
<value type="static" value="attribute"/>
</attribute>
<attribute name="key">
<value type="static" value="identifier"/>
</attribute>
<attribute name="value">
<value column="Item code" type="row_value"/>
</attribute>
<attribute name="keyLabel">
<value type="static" value="identifier"/>
</attribute>
</mapping>
<mapping columns="B2B Short description;Act for green;Warranty;Embedded Technologies;Comercial Name;B2B Claim;Long Description;Benefits B2B 1;Benefits B2B 2;Benefits B2B 3;Benefits B2B 4;Benefits B2B 5;Benefits B2B 6;Benefits B2B 7;Benefits B2B 8;Benefits B2B 9;Benefits B2B 10;B2B Commercial Name;Thermal tripping;Thermical time;Rated current;Power Supply;Riveting position distance;Unwrapped length;Noise level (db);Unwrapped product weight;Protection Index;Approval;Minimum working temperature;Maximum working temperature;Short designation;B2B Long Description;Kit Content;Limit of use;Speed;Torque;Diameter" id="sku_attribute" type="column_list" validationId="sku_attribute">
<attribute name="entityKeyValueId">
<value type="static" value="sku_attribute"/>
</attribute>
<attribute name="key">
<value type="column_name"/>
</attribute>
<attribute name="value">
<value type="row_value"/>
</attribute>
<attribute name="keyLabel">
<value type="column_name"/>
</attribute>
</mapping>
</keyValue>
<mediaAsset>
<mapping id="sku_image" sheet="Media" validationId="sku_image">
<attribute name="identifier">
<value column="Product Item Code" type="row_value"/>
<value type="static" value="_"/>
<value column="Media ID" type="row_value"/>
</attribute>
<attribute name="bucketId">
<value column="Product Item Code" type="row_value"/>
</attribute>
<attribute name="entityMediaAssetId">
<value type="static" value="sku_image"/>
</attribute>
<attribute name="label">
<value column="Media Creation Name" type="row_value"/>
</attribute>
<mediaObject mappingId="sku_image_object"/>
<metaData mappingId="sku_image_type"/>
</mapping>
</mediaAsset>
<mediaObject>
<mapping id="sku_image_object">
<attribute name="url">
<value column="Image link" type="row_value"/>
</attribute>
<attribute name="type">
<value column="Relationship Type" type="row_value"/>
</attribute>
</mapping>
</mediaObject>
<metaData>
<mapping id="sku_image_type">
<attribute name="entityContentMetaDataId">
<value type="static" value="sku_image_type"/>
</attribute>
<attribute name="key">
<value type="static" value="Product Relation"/>
</attribute>
<attribute name="value">
<value column="Product Relation" type="row_value"/>
</attribute>
</mapping>
</metaData>
<cord>
<mapping id="accessory" sheet="Cord">
<attribute name="entityCordId">
<value type="static" value="accessories"/>
</attribute>
<attribute name="sourceBucketId">
<value column="Main product Item Code" type="row_value"/>
</attribute>
<attribute name="sourceBucketEntityId">
<value type="static" value="sku"/>
</attribute>
<attribute name="destinationBucketId">
<value column="Related product Item Code" type="row_value"/>
</attribute>
<attribute name="destinationBucketEntityId">
<value type="static" value="sku"/>
</attribute>
</mapping>
</cord>
</mappings>
</standardImport>

Input Excel file​

input Excel file

Output bucket tree​

output bucket tree