Feature Data Import Examples

In this section we will show various examples of how data can be imported to Perfion.

Import examples will show how to achieve various import goals. We will show the data before the import, the import data and the data after the import using various Perfion features and concepts, e.g. selectable features, multi-value features, inheritable features, localizable features, import when Stage and Parent features are in use, import with goal to delete data, etc.

In all examples we use the default import options unless other options are defined explicitly. The default options:

  • Feature to import to” option is set to “Product”. “Product” feature is the import feature of String base data type and it has Localizable, Inheritable, Selectable and Hierarchical (Allow Hierarchy) data properties.

  • Import method” option is set to “Keep existing values when missing in import”.

  • Keep the first occurrence of records with duplicate keys” option is not set.

  • Selectable feature validation” option is set to “No validation”.

All examples will be shown using small amount of data to show the concept of how it can be done, but the procedure would be the same also with large amounts of data.

Example Using Import Feature ID

Example will show how to import data to Perfion by using import feature item IDs as keys.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one will know which ID each item has by opening item and checking ID value.

Item ID

Data1

Data2

1

Data11

Data21

2

Data12

Data22

3

Data13

Data23

4

Data14

Data24

In order to update items with ID 2 and 3 the import data will be used as shown in the table below.

_ID

Data1

Data2

2

Data12_new

 

3

Data13_new

Data23_new

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

Data1

Data2

1

Data11

Data21

2

Data12_new

Data22

3

Data13_new

Data23_new

4

Data14

Data24

Data which was updated is shown in red color.

Data which was not updated is shown in orange color. The import data had empty field for this data and the “Import Method” option was chosen as “Keep existing values when missing in import”. The import in this case will ignore any empty values in import file and will not update the data for those fields.

Data which was not touched by import procedure is shown in green color. When importing data, Perfion will update only the data, which was addressed by import data. In this case it was item IDs with values 2 and 3. This means that items with ID values 1 and 4 will not be touched by Perfion during import.

Let’s say that we have another example of import data as shown in the table below.

_ID

Data1

Data2

2

Data12_new

 

5

Data15_new

Data25_new

With this data import will fail, because item ID with value 5 does not exist in Perfion and import will stop with error message.

One more example when duplicate item IDs are used in import data.

_ID

Data1

Data2

3

Data13_new

Data23_new

3

Data13_new1

Data23_new1

4

Data14_new

Data24_new

In this case import will skip any duplicate keys (_ID values equal to 3 in this case) and import only those keys, which are unique. The data after import in Perfion will look like shown in the table below.

Item ID

Data1

Data2

1

Data11

Data21

2

Data12

Data22

3

Data13

Data23

4

Data14_new

Data24_new

Data which was updated is shown in red color.

Data which was not updated is shown in orange color. The data defined with item ID value 3 will not be updated.

Example Using Import Feature Base Value

Example will show how to import data to Perfion by using import feature item values (base values) as keys.

Let’s say we have “Product” import feature data in Perfion as shown in table below. The “Product (en)” and “Product (de)” columns shows import feature base values for different localizations (English and German in this case).

Product (en)

Product (de)

Data1

Data2

Item1

Artikel1

Data11

Data21

Item2

Artikel2

Data12

Data22

Item3

Artikel3

Data13

Data23

Item4

Artikel4

Data14

Data24

In order to update items with English values “Item2” and “Item3”, the import data will be used as shown in the table below. Since “Product” import feature has Localizable data property, its base value have multiple values, e.g. one value for each language defined in Perfion. To target correct “Product” items one has to choose the language code suffix next to “_value” keyword and then use actual key values, which match values in chosen language. We will use English language values as keys for this import example. 

_value_EN

Data1

Data2

Item2

Data12_new

Data22_new

Item3

Data13_new

Data23_new

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

Data1

Data2

Item1

Artikel1

Data11

Data21

Item2

Artikel2

Data12_new

Data22_new

Item3

Artikel3

Data13_new

Data23_new

Item4

Artikel4

Data14

Data24

Data which was updated is shown in red color.

Example Using Stage Feature

Example will show how to import data to Perfion by using Stage feature. As an extra parameter one has to setup “stage” feature for the import feature (“Product”).

Let’s say we have “Product” import feature data in Perfion as shown in table below. The “Product (en)” and “Product (de)” columns shows import feature base values for different localizations (English and German in this case).

Product (en)

Product (de)

stage

Data1

Data2

Item1

Artikel1

Prod

Data11_p

Data21_p

Item1

Artikel1

Dev

Data11_d

Data21_d

Item2

Artikel2

Prod

Data12_p

Data22_p

Item2

Artikel2

Dev

Data12_d

Data22_d

In order to update items with English values “Item1” and “Item2” for “Prod” stage, the import data will be used as shown in the table below. Since “Product” import feature has Localizable data property, its base value have multiple values, e.g. one value for each language defined in Perfion. To target correct “Product” items one has to choose the language code suffix next to “_value” keyword and then use actual key values, which match values in chosen language. We will use English language values as keys for this import example.

_value_EN

stage

Data1

Data2

Item1

Prod

Data11_p_new

Data21_p_new

Item2

Prod

Data12_p_new

Data22_p_new

The single key value is not enough when Stage feature is set up with import feature, because every import feature base value may have duplicate values. There can exist the same item in different stages, e.g. in our example “Item1” exist in production stage “Prod” and also in development stage “Dev”. To target data one has to use combined key, which consist of import feature base value and Stage feature value.  In our example we will update only “Prod” stage items.

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

stage

Data1

Data2

Item1

Artikel1

Prod

Data11_p_new

Data21_p_new

Item1

Artikel1

Dev

Data11_d

Data21_d

Item2

Artikel2

Prod

Data12_p_new

Data22_p_new

Item2

Artikel2

Dev

Data12_d

Data22_d

Data which was updated is shown in red color.

NOTE: If one imports data using import feature item ID values as keys, then stage column is not necessary, because all item IDs are unique.

Another example when item referred by base value and Stage feature value does not exist. Let’s say we import data as shown below.

_value_EN

stage

Data1

Data2

Item1

NewStage

Data11_p_new

Data21_p_new

Item2

Prod

Data12_p_new

Data22_p_new

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

stage

Data1

Data2

Item1

Artikel1

Prod

Data11_p

Data21_p

Item1

Artikel1

Dev

Data11_d

Data21_d

Item1

<not set>

NewStage

Data11_p_new

Data21_p_new

Item2

Artikel2

Prod

Data12_p_new

Data22_p_new

Item2

Artikel2

Dev

Data12_d

Data22_d

Data which was updated is shown in red color. The item referred using stage “NewStage” did not exist in Perfion, therefore Perfion have created a new item. The new item will have all the data which was defined in import data, but all other values (e.g. “Product (de)” value) will not be set.

Example Using Parent Feature

Example will show how to import data to Perfion by using Parent feature.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” and “Parent Item ID” columns in the table cannot be shown in Perfion, because they are not feature values. “Item ID” is feature item ID and one can find its value by opening item details window. “Parent Item ID” is ID of another item, the current item belongs to. This ID is not accessible for users directly, but when one opens item details window, it will show to which other item the current item belong to and from there one can find out what is the ID of that parent item.

“Parent Item ID” will be used to create or modify hierarchy in Perfion. In this example, items with ID values 2, 3 and 4 are set so that they belong to item with ID value 1. This also means that item with ID value 1 is a virtual item and all other items are normal items.

Product (en)

Product (de)

Item ID

Parent Item ID

Data1

Data2

Item1

Artikel1

1

 

Data11

Data21

Item2

Artikel2

2

1

Data12

Data22

Item3

Artikel3

3

1

Data13

Data23

Item4

Artikel4

4

1

Data14

Data24

In this example we will show how one can change hierarchy in Perfion when it is already set up. We will change hierarchy setup for items with ID values 3 and 4 and at the same time will update “Data1” and “Data2” data for those items.

To change hierarchy we will use “_parent” column as shown in import data below. The first table shows how to do it using item ID as import data key.

_ID

_parent

Data1

Data2

3

2

Data13_new

Data23_new

4

2

Data14_new

Data24_new

The same result can also be achieved using import feature base value as import data key. “_parent” column refers to the same data and type as import key feature column. If key feature column is item ID, then “_parent” column will also be used as item ID. If key feature is import feature has base value, then “_parent” column will also use base value to find other items to relate the current item to.

_value_EN

_parent

Data1

Data2

Item3

Item2

Data13_new

Data23_new

Item4

Item2

Data14_new

Data24_new

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

Item ID

Parent Item ID

Data1

Data2

Item1

Artikel1

1

 

Data11

Data21

Item2

Artikel2

2

1

Data12

Data22

Item3

Artikel3

3

2

Data13_new

Data23_new

Item4

Artikel4

4

2

Data14_new

Data24_new

Data which was updated (overwritten) is shown in red color. “Parent Item ID” column values for items with ID value 3 and 4 were update so, that now these items belongs to “Item2”, which become a virtual item after update.

Another example where we use the same data for update as in previous example, but where “_parent” column is not used. Import data is shown below.

_ID

Data1

Data2

3

Data13_new

Data23_new

4

Data14_new

Data24_new

In this case “Parent Item ID” column values will not be affected by import and all import feature items will have the same hierarchy as before import. The data after import is shown below.

Product (en)

Product (de)

Item ID

Parent Item ID

Data1

Data2

Item1

Artikel1

1

 

Data11

Data21

Item2

Artikel2

2

1

Data12

Data22

Item3

Artikel3

3

1

Data13_new

Data23_new

Item4

Artikel4

4

1

Data14_new

Data24_new

Data which was updated is shown in red color.

Example Using Stage and Parent Features

Example will show how to import data to Perfion by using Stage and Parent features at the same time.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” and “Parent Item ID” columns in the table cannot be shown in Perfion, because they are not feature values. “Item ID” is feature item ID and one can find its value by opening item details window. “Parent Item ID” is ID of another item, the current item belongs to. This ID is not accessible for users directly, but when one opens item details window, it will show to which other item the current item belong to and from there one can find out what is the ID of that parent item. “Parent Item ID” will be used to create or modify hierarchy in Perfion. In this example, none of items have hierarchy. Item “VirtualItem” is an empty virtual item and all other items are normal items.

Product (en)

Product (de)

Item ID

Parent Item ID

stage

Data1

Data2

Item1

Artikel1

1

 

Prod

Data11

Data21

Item1

Artikel1

2

 

Dev

Data11

Data21

VirutalItem

VirtuellArtikel

3

 

Prod

 

 

Item2

Artikel2

4

 

Prod

Data12

Data22

Item3

Artikel3

5

 

Prod

Data13

Data23

In this example we will show how one can change hierarchy in Perfion when it is already set up. We will change hierarchy setup for items with ID values 4 and 5 and at the same time will update “Data1” and “Data2” data for those items.

To update hierarchy from this data we will use “_parent” column as shown in import data below. The table below shows how to do it using item ID as import data key. Note: when item IDs are used as import feature keys, then Stage feature column is not necessary. All item IDs have unique values and therefore there can be only one item with the same ID regardless of Stage feature values.

_ID

_parent

Data1

Data2

4

3

Data12_new

Data22_new

5

3

Data13_new

Data23_new

The same result can also be achieved using import feature base value as import data key. This time, however, one has to use Stage feature value as a secondary key in order to correctly address chosen items. In this case import feature base values are not unique, and this is why Stage feature values has to be used. “_parent” column refers to the same data and type as import key feature column and since in this case we use two values (base value and Stage value) as key, then Parent feature value will also correspond to the same combined key value.

_value_EN

_parent

stage

Data1

Data2

Item2

VirutalItem

Prod

Data12_new

Data22_new

Item3

VirutalItem

Prod

Data13_new

Data23_new

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

Item ID

Parent Item ID

stage

Data1

Data2

Item1

Artikel1

1

 

Prod

Data11

Data21

Item1

Artikel1

2

 

Dev

Data11

Data21

VirutalItem

VirtuellArtikel

3

 

Prod

 

 

Item2

Artikel2

4

3

Prod

Data12_new

Data22_new

Item3

Artikel3

5

3

Prod

Data13_new

Data23_new

Data which was updated is shown in red color. “Parent Item ID” column values for items with ID value 4 and 5 were update so, that now these items belongs to virtual item “VirutalItem”.

Example Using Normal Feature

Example will show how to import data to Perfion by using feature item values (base values) as keys, but in this case feature is not import feature, but a feature, which belongs to import feature.

Let’s say we have “Product” import feature data in Perfion as shown in table below. The “Product (en)” and “Product (de)” columns shows import feature’s base values for different localizations (English and German in this case) and columns “Data (en)” and “Data (de)” shows normal feature’s base values for different localizations.

Product (en)

Product (de)

Data (en)

Data (de)

Info

Item1

Artikel1

Data11_en

Data21_de

Info1

Item2

Artikel2

Data12_en

Data22_de

Info2

In order to update “Info” feature data, the import data will be used as shown in the table below. The normal feature “Data” is localizable, therefore its base value have multiple values, e.g. one value for each language defined in Perfion. To target correct items one has to choose the language code suffix next to “Data” feature name and then use actual key values, which match values in chosen language. We will use English language values as keys for this import example. 

Data_EN

Info

Data11_en

Info1_new

Data12_en

Info2_new

If this data is imported to Perfion, then results will look like shown in the table below.

Product (en)

Product (de)

Data (en)

Data (de)

Info

Item1

Artikel1

Data11_en

Data21_de

Info1_new

Item2

Artikel2

Data12_en

Data22_de

Info2_new

Data which was updated is shown in red color.

To achieve the same result one could also use import feature base value, e.g. like shown below.

_value_EN

Info

Item1

Info1_new

Item2

Info2_new

Example Using Binary Feature

Example will show how to import binary data to Perfion, e.g. to import data to feature, which has base type File or Image.

Let’s say we have “Product” import feature data in Perfion as shown in table below. To import data we will use import feature item IDs as keys. In this example “Image” feature is a feature which has Image base type and “Files” feature is a feature which has File base type and also have Multi-value data property. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find ID value by opening item details window.

Item ID

Image

Files

1

 

 

2

 

 

In order to add new binary data, the import data will be used as shown in the table below. The value for binary feature must be a path to file or image location in the local system and it must exist and available for use (e.g. not locked by operating system or other application). The “Files” feature may have several values, therefore we can import more than one file at the same time. In this case we use the same values like we would define for single value, but here we separate each additional value with semicolon character (;).

_ID

Image

Files

1

C:\image1.jpg

C:\file1.txt;C:\file2.txt

2

C:\image2.jpg

C:\file21.txt;C:\file22.txt

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

Image

Files

1

image1.jpg

file1.txt, file2.txt

2

image2.jpg

File21.txt, file22.txt

Data which was updated is shown in red color. During import binary data will be uploaded to Perfion and assigned to where it belongs. The path to binary data will be used to get the name of the binary data, but only the name of the file will be used from the path (e.g. without path prefix) as shown in the table above.

NOTE: Binary features are special and import procedure is different than for normal features.

Example Using ID to Import to Selectable Feature

Example will show how to import data to Perfion by using feature item IDs as keys, but in this case feature is not import feature, but another feature, which belongs to import feature. This feature can only be a feature which has Selectable data property.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Item ID

SelectableFeature

1

 

2

 

The “SelectableFeature” is a selectable feature which has four default values as shown in the table below.

Default item ID

Default item value

10

a

11

b

12

c

13

d

In order to update “SelectableFeature” feature data, the import data will be used as shown in the table below. In this example, we will set “SelectableFeature” value to “a” for item with ID value 1 and “c” for item with ID value 2.

_ID

SelectableFeature_ID

1

10

2

12

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

SelectableFeature

1

a

2

c

Data which was updated is shown in red color.

To achieve the same result one could also use selectable feature’s default values directly like shown in the table below.

_ID

SelectableFeature

1

a

2

c

NOTE: “SelectableFeature” feature default item ID values if used for data update must exist, e.g. one cannot create new selectable feature default values with custom (not existing) ID values. ID value creation is handled by Perfion.

NOTE: If “SelectableFeature” feature during import are updated with values, which does not exist as default selectable feature values, then these values will be created as new selectable feature default values.

Example Using Localizable Feature

Example will show how to import data to Perfion to localizable feature.

Let’s say we have “Product” import feature data in Perfion as shown in table below. The “Data (en)” and “Data (de)” columns shows explicit feature’s base values for different localizations (English and German in this case). The “Data2 (en)” and “Data2 (de)” columns shows selectable feature’s base values for different localizations. The import of localizable data to explicit and localizable features differs. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Item ID

Data (en)

Data (de)

Data2 (en)

Data2 (de)

1

Data11_en

Data21_de

Data31_en

Data41_de

2

Data12_en

Data22_de

Data32_en

Data42_de

In order to update “Data” feature data for all languages and “Data2” for only one language, the import data will be used as shown in the table below. The normal feature “Data” is localizable, therefore its base value have multiple values, e.g. one value for each language defined in Perfion. To target correct items one has to choose the language code suffix next to “Data” feature name. The same is valid also for selectable localizable feature “Data2”, but in this case one can use only one data column. When there is selectable localizable feature, then one cannot import values for multiple languages at the same time, because the data in selectable features are referenced differently. For selectable features, when one imports data to one language, the values of other languages are automatically assigned with empty values. In order to fill those values one can only do this by importing to selectable feature directly.

_ID

Data_EN

Data_DE

Data2_EN

1

Data11_en_new

Data21_de_new

Data31_en_new

2

Data12_en_new

Data22_de_new

Data32_en_new

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

Data (en)

Data (de)

Data2 (en)

Data2 (de)

1

Data11_en_new

Data21_de_new

Data31_en_new

 

2

Data12_en_new

Data22_de_new

Data32_en_new

 

Data which was updated is shown in red color. The values for column “Data2 (en)” did not exist before, therefore new default selectable values for English language have been created and corresponding values for other languages (German in this case) got default blank (empty) values.

To update localizable feature’s all language values one has to import localizable data directly to selectable feature using its base values. The data to update localizable feature is shown below. In addition one has to select import parameter “Import to” as “Data2” instead of “Product”.

_value_EN

_value_DE

Data31_en_new

Data41_en_new

Data32_en_new

Data42_en_new

After the second import the final data will look like shown in the table below.

Item ID

Data (en)

Data (de)

Data2 (en)

Data2 (de)

1

Data11_en_new

Data21_de_new

Data31_en_new

Data41_de_new

2

Data12_en_new

Data22_de_new

Data32_en_new

Data42_de_new

Data which was updated is shown in red color.

We recommend to always update default data for all localizable selectable features first and only then to import data to other features, which use selectable features in their configuration, e.g. “Product” feature from our example.

Example Using Commented Column Names

Example will show how Perfion will handle import data with commented column names.

Let’s say we have “Product” import feature data in Perfion as shown in the table below.

#_value_EN

_ID

Data_EN

#Data_DE

Data_DAN

#Info

Item1

1

Data11_en

Data21_de

Data21_dan

Info1

Item2

2

Data12_en

Data22_de

Data22_dan

Info2

The columns “#_value_EN”, “#Data_DE” and “#Info” starts with hash character (#), which means that those columns are commented columns and will not be used during import. The import data shown in the table above is equivalent and will be treated in the same way as import data shown in table below.

_ID

Data_EN

Data_DAN

1

Data11_en

Data21_dan

2

Data12_en

Data22_dan

Example Using Multi-values

Example will show how to import data to Perfion to features, which have Multi-value data property.

Let’s say we have “Product” import feature data in Perfion as shown in table below. The “Data” feature is explicit feature and “Data2” feature is selectable feature. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find it by opening item details window.

Item ID

Data

Data2

1

 

 

2

 

 

Feature which have Multi-value data property may have several values instead of just one, therefore we can import more than one data value at the same time. In this case we use the same values like we would define for single value, but here we separate each additional value with semicolon character (;).

_ID

Data

Data2

1

a;b;c

data1;data2

2

d;e;f

data21;data22

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

Data

Data2

1

a;b;c

data1;data2

2

d;e;f

data21;data22

Data which was updated is shown in red color. Multi-value data for explicit and localizable features can be updated in the same way, but there are some differences in some cases. For example, if selectable feature is localizable, then only one language data can be updated during import, while explicit feature allows updating data for all languages in the same import.

Example Using Hierarchical Values

Example will show how to create hierarchical data in Perfion by using Parent feature.

To create hierarchy in Perfion a feature should have Selectable and Hierarchical (Allow Hierarchy) data properties.

Let’s say we have “HierarchicalFeature” import feature data in Perfion as shown in table below. The feature has Selectable and Hierarchical (Allow Hierarchy) data properties and does not have any hierarchy (data columns “HierarchicalFeature parent item base value” and “Parent Item ID” are empty). Note: the “Item ID” and “Parent Item ID” columns in the table cannot be shown in Perfion, because they are not feature values. “Item ID” is import feature item ID and one can find its value by opening item details window. “Parent Item ID” is ID of another item, the current item belongs to. This ID is not accessible for users directly, but when one opens item details window, it will show to which other item the current item belong to and from there one can find out what is the ID of that parent item. “Parent Item ID” will be used to create or modify hierarchy in Perfion. If an item has child item(s), it is called a virtual item.

HierarchicalFeature

item base value

HierarchicalFeature parent item base value

Item ID

Parent Item ID

Data

Item1

 

1

 

Data1

Item2

 

2

 

Data2

Item3

 

3

 

Data3

VirtualItem1

 

4

 

 

VirtualItem11

 

5

 

 

VirtualItem12

 

6

 

 

VirtualItem2

 

7

 

 

Example of how this data looks in Perfion is shown in Figure 7.

Figure 7: Creating hierarchy - before

In this example we will create hierarchy as shown in Figure 8.

Figure 8: Creating hierarchy - after

To create a hierarchy as it is shown in Figure 8 we will use import data as shown in the table below.

_value

_parent

Item1

VirtualItem11

Item2

VirtualItem12

Item3

VirtualItem2

VirtualItem1

 

VirtualItem11

VirtualItem1

VirtualItem12

VirtualItem1

VirtualItem2

 

The same results can be also achieved by importing data using item IDs instead of item base values. The import data is shown in the table below.

_ID

_parent

1

5

2

6

3

7

4

 

5

4

6

4

7

5

If this data is imported to Perfion, then results will look like shown in the table below.

HierarchicalFeature

item base value

HierarchicalFeature parent item base value

Item ID

Parent Item ID

Data

Item1

VirtualItem11

1

5

Data1

Item2

VirtualItem12

2

6

Data2

Item3

VirtualItem2

3

7

Data3

VirtualItem1

 

4

 

 

VirtualItem11

VirtualItem1

5

4

 

VirtualItem12

VirtualItem1

6

4

 

VirtualItem2

 

7

 

 

After import, the items with names “VirtualItem1”, “VirtualItem11”, “VirtualItem12” and “VirtualItem2” became virtual items and “Item1”, “Item2” and “Item3” remains normal items.

If the selectable hierarchical feature has no data, then the same hierarchy can be built when importing data to another feature, where selectable hierarchical feature is used in configuration as normal feature.

Let’s say that we have “Product” import feature data in Perfion as shown in table below.

Item ID

HierarchicalFeature

Data

1

 

Data1

2

 

Data2

3

 

Data3

“HierarchicalFeature” feature in this new example does not have any values at this point as shown in the table below.

HierarchicalFeature

item base value

HierarchicalFeature parent item base value

Item ID

Parent Item ID

-

-

-

-

In order to create hierarchy like from previous example the import data will be used as shown in the table below.

_ID

HierarchicalFeature

1

VirtualItem1|VirtualItem11|Item1

2

VirtualItem1|VirtualItem12|Item2

3

VirtualItem2|Item3

The hierarchy can be built directly by using pipe character (|) in between different hierarchy levels. The data in the table above will create the same hierarchical structure in “HierarchicalFeature” feature as it was shown in previous example. Refer to Figure 8.

If this data is imported to Perfion, then results will look like shown in the table below.

Item ID

HierarchicalFeature

Data

1

Item1

Data1

2

Item2

Data2

3

Item3

Data3

Data which was updated is shown in red color.

“HierarchicalFeature” feature data after import is shown in the table below.

HierarchicalFeature

item base value

HierarchicalFeature parent item base value

Item ID

Parent Item ID

Item1

VirtualItem11

11

15

Item2

VirtualItem12

12

16

Item3

VirtualItem2

13

17

VirtualItem1

 

14

 

VirtualItem11

VirtualItem1

15

14

VirtualItem12

VirtualItem1

16

14

VirtualItem2

 

17

 

Data which was updated after import is shown in red color. Note: item IDs are automatically assigned by Perfion.

Example Using Sortable Values

Example will show how to import data to Perfion, which has order.

Let’s say we have “Product” import feature data in Perfion as shown in table below. “Data1” feature has Multi-value data property but has no Sortable data property. “Data2” feature has Multi-value and also Sortable data properties. In this example we will compare how Perfion will sort data in both cases and how the order can be changed. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Item ID

Data1

Data2

1

a;b;c;d

a;b;c;d

2

d;c;b;a -> a;b;c;d

d;c;b;a

The data shown in table above will be shown differently in Perfion. “Data1” feature is not sortable and therefore, its values have not specific order and can be in some places shown in the order as they were created (added to database) and in other places values can be shown sorted alphabetically. This depends on where in Perfion values are shown. The “Data1” feature data for item with ID value 2 practically will be the same data as for item with ID value 1. Perfion will assume it is the same data. “Data2” feature is sortable and its data always will be shown in the same way as it was created. From this example, the data in the table above for “Data2” feature will be shown exactly as it was defined. For “Data2” feature one can also change value order from Perfion.

In order to change the order we will use the import data as shown in the table below.

_ID

Data1

Data2

1

b;a;d;c

b;a;d;c

2

f;c;a;e

f;c;a;e

When importing multi-value data, it is important to correctly select “Import method” parameter value, because import results will depend on this value. If “Keep existing values when missing in import” option is selected (default), then all existing feature values will be kept in Perfion and all new values will be added (merged with existing values). The table below shows results if this option is selected.

Item ID

Data1

Data2

1

a;b;c;d

a;b;c;d

2

d;c;b;a;f;e

d;c;b;a;f;e

Data which was updated is shown in red color. “Data1” and “Data2” feature data for item with ID value 1 will not be updated, because the import data was the same as in Perfion in both cases. The data for item with ID value 2 will be updated by adding two extra values (“f” and “e”). The following update procedure is used to determine which values and how will be added:

  1. If incoming new value exist in Perfion, then import of that value will be skipped.

  2. If incoming new value does not exist in Perfion, then the value will be added at the end of data in the same order as it is defined in import.

If the same data will be imported by using “Delete existing values when missing in import” option, then all existing feature values will be replaced with incoming data values. The table below shows results if this option is selected.

Item ID

Data1

Data2

1

a;b;c;d

b;a;d;c

2

c;a;f;e

f;c;a;e

Data which was updated is shown in red color. The update procedure for “Data1” feature is similar to previous example. The item with ID value 1 was not updated, because there were no new values. The item with ID value 2 data had two new values, which were added and the other two values (“d” and “b”) were removed. The order of “Data1” feature values is not saved, so even if the data is shown as “c;a;f;e”, it may be shown differently in other places in Perfion. In most cases values will be shown sorted alphabetically.

The update procedure for “Data2” is different. Since the order is important, then all existing data will be removed and then all new data will be added in the same order as it was defined in the import data.

Example Using Keep and Delete Options

Example will show how to import data to Perfion by using different “Import method” import parameter values.

Parameter “Import method” is used to control if data during import will be updated or deleted in case the import data is blank (empty). Deletion in Perfion works by setting data value to blank (empty) value.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Item ID

Info

1

Info1

2

Info2

3

Info3

In order to update “Info” feature data, the import data will be used as shown in the table below. 

_ID

Info

1

Info1_new

2

 

3

Info3_new

If this data is imported to Perfion and “Keep existing values when missing in import” value is selected in “Import method” select box (default), then results will look like shown in the table below.

Item ID

Info

1

Info1_new

2

Info2

3

Info3_new

Data which was updated is shown in red color. The import data with empty data fields will be ignored (item with ID value equal to 2 in this case).

If the same data is imported to Perfion and “Delete existing values when missing in import” value is selected in “Import method” select box, then results will look like shown in the table below.

Item ID

Info

1

Info1_new

2

 

3

Info3_new

Data which was updated is shown in red color. Item with ID value 2 data was deleted (overwritten to blank value).

Example Using Keep Duplicate Option

Example will show how to import data to Perfion by using different “Keep the first occurrence of records with duplicate keys” import parameter values.

Parameter “Keep the first occurrence of records with duplicate keys” has meaning only if import data have duplicate keys.

Let’s say we have “Product” import feature data in Perfion as shown in table below. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Item ID

Info

1

Info1

2

Info2

In order to update “Info” feature data, the import data will be used as shown in the table below. The import feature item ID will be used as key feature and there is one duplicate key present in import data, e.g. there are two identical “_ID” column values equal to 1.  

_ID

Info

1

Info1_new

1

Info1_new2

2

Info2_new

If this data is imported to Perfion and “Keep the first occurrence of records with duplicate keys” checkbox is not checked (default), then results will look like shown in the table below.

Item ID

Info

1

Info1

2

Info2_new

Data which was updated is shown in red color. The data with duplicate keys will not be imported (item with ID value equal to 1 in this case). There will be information in import log with all duplicate keys, which were not imported.

If the same data is imported to Perfion and “Keep the first occurrence of records with duplicate keys” checkbox is checked, then the item with the first duplicate key will be imported and all the other items with duplicate key values will be skipped. The results of import is shown in the table below.

Item ID

Info

1

Info1_new

2

Info2_new

Data which was updated is shown in red color.

Example Using Selectable Feature Validation Option

Example will show how to import data to Perfion by using “Selectable feature validation” option. In this example “Selectable feature validation” parameter will be used to show how feature data import works when this parameter has values “No validation” and “Validate selected features”.

Parameter “Selectable feature validation” will affect only the import data related to selectable features. This validation will check existing selectable feature default data values and compare them to incoming data values for equivalent selectable feature in the import data. If any new values are coming from the import data which is not yet available in Perfion, then the import will report an error and will stop the import procedure.

Let’s say we have “Product” import feature data in Perfion as shown in the table below. The “Data (en)” and “Data (de)” columns shows selectable feature’s base values for different localizations. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window. 

Item ID

Data (en)

Data (de)

1

Data11_en

Data21_de

2

Data12_en

Data22_de

Let’s say that the selectable feature “Data” has the default values as shown in the table below:

Selectable feature item ID

Data (en)

Data (de)

1

Data11_en

Data21_de

2

Data12_en

Data22_de

3

Data13_en

Data23_de

In order to update selectable feature “Data” data, the import data will be used as shown in the table below. The import feature item ID will be used as key feature. The selectable feature in this example is localizable and localizable selectable feature values can be updated by using only one localization. In this case we choose to use “EN” localization and we will also use a new selectable feature value, which does not yet exist in selectable feature’s default value list (shown in green). 

_ID

Data_EN

1

Data11_en

2

Data12_en

3

Data14_en

Results without Using Validation

In the first example we will show how update will work if “Selectable feature validation” parameter is set to “No validation”. In this case, the import will import all data (including the new value) and results in Perfion after import will look like shown in the table below.

Item ID

Data (en)

Data (de)

1

Data11_en

Data21_de

2

Data12_en

Data22_de

3

Data14_en

 

Data which was updated is shown in red color. The new item with ID equal to 3 was added to the data and for “Data” selectable feature two new values have been added. The first one for “EN” localization (“Data14_en”) and the second is for “DE” localization (empty value). The “Data” selectable feature default value list was also updated during import. It has now an extra new row as shown in the table below:

 Selectable feature item ID

Data (en)

Data (de)

1

Data11_en

Data21_de

2

Data12_en

Data22_de

3

Data13_en

Data23_de

4

Data14_en

 

Results Using Selectable Feature Data Validation

In the second example we will show how update will work if “Selectable feature validation” parameter is set to “Validate selected features”. The data in Perfion for this example is the same as it was before the previous example.

In this case import data has to be slightly changed in order to select which data columns has to use validation. The data columns for validation are selected by prefixing data column name with ‘$’ character. The updated import data example is shown in the table below:

_ID

$Data_EN

1

Data11_en

2

Data12_en

3

Data14_en

During import of this data to Perfion, the importer will report an error, because incoming data value “Data14_en” does not exist in “Data” selectable feature’s default value list. The importer will write to the import log that import data column “Data_EN” have invalid values and will also list all invalid values, which were found during validation. The import process will be stopped and no data will be imported to Perfion. In this case user has two options: to fix the import data by removing all invalid values or to disable validation.

NOTE: If “Selectable feature validation” parameter is set to “Validate all features”, then results will be the same as with “Validate selected features”. The only difference is that in this case one does not need to add an additional prefix to the name of selectable features in import data. This option is useful, when all selectable features in import data has to be validated.

Example Using Duplicate Values in Perfion

Example will show how Perfion will import data if key feature in Perfion has duplicate data, e.g. existing data in Perfion for key feature has multiple items with the same key feature values.

Let’s say we have “Product” import feature data in Perfion as shown in table below.

Data

Data2

Data3

Item1

SomeData1

AnyData1

Item2

SomeData2

AnyData2

Item2

SomeData3

AnyData3

Item3

SomeData4

AnyData4

The normal feature “Data” is used as key feature in this example and it has two items with the same value, which are shown in red color in the table above (“Item2”). Perfion expects only unique keys to be used for import of data and therefore, this import will be performed differently.

In order to update “Data2” and “Data3” feature data, the import data will be used as shown in the table below. 

Data

Data2

Data3

Item1

NewData1

NewData21

Item2

NewData2

NewData22

If this data is imported to Perfion, then results will look like shown in the table below.

Data

Data2

Data3

Item1

NewData1

NewData21

Item2

NewData2

NewData22

Item2

SomeData3

AnyData3

Item3

SomeData4

AnyData4

Data which was updated is shown in red color. Perfion will update only the first found item if there are duplicates. The data shown in orange color shows the other duplicate item values, which were not updated during import, because in this case the duplicate item is the second found duplicate item.

Example of Import to Selectable Feature

To import data to a feature which has Selectable data property one has to import data to it directly, e.g. by selecting “Import to” import option to selectable feature. Then, all default values can be imported using either default item IDs or default item values as key feature values.

Example of Import to Inheritable Feature

Example will show how to import data to Perfion for a feature, which has Inheritable data property.

Let’s say we have “Product” import feature data in Perfion as shown in table below. “DataNotIn” feature does not have Hierarchical (Allow Hierarchy) data property and “DataIn” has it. In this example we will show how Perfion will perform import for both with the same import data values. “Product” feature in this example has Selectable and Hierarchical (Allow Hierarchy) data properties. The items “Item1” and “Item2” are normal items and belong to “VirtualItem1” virtual item, while items “Item3” and “Item4” are normal items and belong to “VirtualItem2” virtual item. Refer to Figure 9 to see how the data looks like before import. Note: the “Item ID” column in the table cannot be shown in Perfion, because it is not a feature value. It is feature item ID and one can find its value by opening item details window.

Product (en)

DataNotIn

DataIn

VirtualItem1

 

 

Item1

 

 

Item2

 

 

VirtualItem2

 

 

Item3

 

 

Item4

 

 

Figure 9: Import to inheritable feature - before

The import data will be used as shown in the table below.

_value_EN

DataNotIn

DataIn

VirtualItem1

a1

b1

Item1

a2

b2

Item2

a3

b3

VirtualItem2

a4

 

Item3

a5

b5

Item4

a6

b6

The data for feature “DataIn” in the table above is defined without any value for “VirtualItem2” virtual item on purpose in order to show how the data is created for normal items when virtual item data is not set. If this data is imported to Perfion, then results will look like shown in the table below and also in Figure 10.

_value_EN

DataNotIn

DataIn

VirtualItem1

a1

b1

Item1

a2

b1

Item2

a3

b1

VirtualItem2

a4

 

Item3

a5

b5

Item4

a6

b6

Data which was updated is shown in red color. The data shown in orange color was created automatically by Perfion. The “DataNotIn” feature import will be as for normal feature, e.g. all item values will be updated. “DataIn” feature import will differ, because the imported values will depend on import feature (“Product”) hierarchy. For inheritable feature, all normal items, which have parent item (virtual item) with value, will get automatically parent item’s value. Therefore, during import, the incoming data values will be ignored for such items. From table above one can see that items “Item1” and “Item2” (“DataIn” feature) got value “b1” from their parent virtual item “VirtualItem1”. The second virtual item in this example (“VirtualItem2” item) had no value in import data and therefore, all child item (“Item3” and “Item4”) values will be set from import data.

Figure 10: Import to inheritable feature - after