IMPORT.FEATUREDATA

IMPORT.FEATUREDATA was introduced in Perfion 5.5 2024-R2. It takes Input from a Excel file or the Table-format and imports it into any base feature.

Properties

From

The Path to excel file.
… or …
The name of the Input Data Source. Default = 'FROM'

To

The name of the feature to import data to (e.g. Product, Category etc.)

NOTE: The destination can also be assigned dynamically from the content of a variable, e.g. by writing {=$MyVariableName}.

Parameters

All parameters are optional, but can be defined to alter the default behavior of the import.

@KeyFeatureColumn

Column in excel file or input data source containing values to be used as import keys. The key feature column can be located anywhere in the input data source.

Key Feature Requirements:

  • String or Number Key feature must be one of these data types

  • Explicit Key feature must be explicit (not selectable, see exception below)

  • Non-inheritable Key feature must be non-inheritable (not inheritable)

  • Single value Key feature must be single value (not allow multiple)

Base feature exception:

The base feature (= the feature to import to) can naturally also be used as key feature. This feature will always be selectable as it holds the items you want to update. The base feature can also be inheritable and allow multiple, and it data types Image, File and Date are also supported.

Possible values:

  • [FeatureName] Example: EAN

  • [FeatureID] Example: 101

  • [FeatureName]_[Language] Example: ProductName_EN

  • [FeatureID]_[Language] Example: 101_EN

  • [BaseFeatureName] Example: Product (or _Value)

  • [BaseFeatureName]_[Language] Example: Product_EN (or _Value_EN)

  • [BaseFeatureName].ID Example: Product.ID (or _Value.ID)

  • [BaseFeatureID] Example: 100

  • [BaseFeatureID]_[Language] Example: 100_EN

  • [BaseFeatureID].ID Example: 100.ID)

NOTE: if the parameter @KeyFeatureColumn is not specified, the importer will use the first non-excluded column as key.

@NewItemHandling

By default, new items in the input data source are created in Perfion.
Possible values:

  • CreateItem New items are created (default)

  • IgnoreItem New items are ignored - updates to existing items are imported

  • Fail Import will stop and throw an error if input data source contains new items

@EmptyCellHandling

By default, the importer ignores empty cells in the input data source

Possible values:

  • KeepValues Empty cells are ignored = existing values in Perfion are left untouched (default)

  • DeleteValues Empty cells are respected = existing values in Perfion are deleted

NOTE: If a cell in the input data source contains the value [DeleteValues], the importer will delete the existing value in Perfion for that particular cell even if KeepValues is used.

@MultiValueHandling

By default, the importer will merge values in input data source with existing values in Perfion for multivalue features.

Possible values:

  • Merge New values will be merged with existing values (default)

    • If feature is sortable, new values will be placed after existing values

  • Replace Existing values in Perfion will be replaced by new values

    • If feature is sortable, new values will be sorted according to order in the input data source

@UnknownSelectableValueHandling

By default, the importer will create new selectable items in Perfion when unknown selectable values are found in input data source.

Possible values:

  • Create Unknown selectable values are created as selectable items (default)

  • Ignore Unknown selectable values are ignored - no selectable items are created and no values are assigned to main items.

  • Fail Import will stop and throw an error if input data source contains unknown selectable values

@ValidationViolationHandling

By default, the importer will fail and throw an error if values in input data source violate “hard” validation rules on features.

Possible values:

  • Fail Import will stop and throw an error if input data source contains values that violate feature validation rules (default)

  • CreateValue Importer will create values that violate feature validation rules

  • IgnoreValue Importer will ignore values that violate feature validation rules and keep existing values in Perfion

NOTE: “Soft” validation rules are not respected by the importer. Values that violate soft validation rules will always be imported.

@DateFormat

By default, the importer will accept and understand dates from Excel without specifying a specific format. If dates are imported from other systems - or imported to multivalue date features - you must specify the date format found in the input data source.

Possible values:

  • None (default)

  • ddMMyy Example values: 24-12-96 or 24/12/96

  • ddMMyyyy Example values: 24-12-1996 or 24/12/1996

  • MMddyy Example values: 12-24-96 or 12/24/96

  • MMddyyyy Example values: 12-24-1996 or 12/24/1996

  • yyddMM Example values: 96-12-24 or 96/12/24

  • yyMMdd Example values: 96-12-24 or 96/12/24

  • yyyyddMM Example values: 1996-24-12 or 1996/24/12

  • yyyyMMdd Example values: 1996-12-24 or 1996/12/24

@DecimalSeparator

By default, the importer will accept and understand numbers from Excel without specifying a decimal separator. If numbers are imported from other systems - or imported to multivalue number features - you must specify the decimal separtor found in the input data source.

Possible values:

  • None (default)

  • , (comma)

  • . (dot)

NOTE: When specifying a decimal separator, you must also specify a group separator

@GroupSeparator

By default, the importer will accept and understand numbers from Excel without specifying a group separator. If numbers are imported from other systems - or imported to multivalue number features - you must specify the group separtor found in the input data source.

Possible values:

  • None (default)

  • , (comma)

  • . (dot)

NOTE: When specifying a group separator, you must also specify a decimal separator

@ZippedBinariesFile

The Path to a zip file for importing binary files.

NOTE: Binary files will be imported from zip file when file references in input data source do not include paths (e.g. image1.jpg)

@EmptyDataTableHandling

By default, the importer will ignore empty input data sources as long as column headers are valid.

Possible values:

  • Ignore Import will validate column headers but ignore the fact that no data is found (default)

  • Succeed Importer will not validate column headers and ignore the fact that no data is found = import will succeed even though input data source contains invalid headers and no data

  • Fail Importer will fail if input data source contains no data

@OperationMode

By default, the importer will validate column headers and data AND import the data.

Possible values:

  • Normal Importer will validate column headers and data AND import the data (default)

  • ValidateOnly Importer will validate column headers and data but NOT import the data. This can be useful when debugging actions.

NOTE: ValidateOnly will usually take the same time to run as Normal. This is because the importer still goes through all import steps but then roll back the entire transaction at the end.

Map

This Command does not use any value mappings.