ECommerce Mapping – Base value

We learned from Your first mappings that we can write the name of Feature here and the value of that feature will be sent to output. Since this is where the data comes from, this is also called the from-value of a mapping.

Besides features, there are three more sources of data as shown in the following table:

What can be written

Example

Description

The name of a feature

Description

The value of the Description-feature will be copied to output. 99% percent of all mappings are likely to be of this kind.

 

Note that the feature must exist in Perfion, but does not necessarily need to have any values on the entities nor be configured on the base value.

A *  (a “star” meaning a wild card)

*

From Perfion 2019 R1 a * can be written. This will map all features in a Perfion Standard View. Read more about using *.

Literal

‘1’

The character between the quotes are simply copied to output, in this case the digit “1” (without quotes).

 

May only be used with Output Kind Field.

Attribute

.id

This will copy the value of the XML-attribute on the Perfion Item named id. This id contains the internal Perfion ID of the item and is guaranteed to be unique.

 

Can only be used with Output Kinds Field and KeyField.

 

Other attributes available are:

  • parentId: If Perfion Item is a child of another Perfion Item its id is available using this.

  • order: When “Custom ordering” is enabled on the feature this will contain the order of the Perfion Item among its siblings. Is “0” is if Custom Ordering is not enabled.

  • modifiedDate: Contains the timestamp on when the Perfion Item was last modified.

  • createdDate: Contains the timestamp on when the Perfion Item was created.

  • And more! Check the Perfion API documentation for which attributes that are available on the resulting data rows in a Perfion Query.

Feature Attribute

VolumeL:unit

From Perfion 4.5 2019 R2 it is possible to map the attributes of features. This allows you to map the unit, caption, alt-caption, help text or other useful information about the feature.

This can be especially useful when decorating mappings as described in Attribute, but can also be used to map attributes to Fields.

The attributes available (in the example we use “unit”) are exactly those output by a Perfion Query. The most important are:

  • id: Id of the Feature

  • caption: Caption of the feature

  • captionAlternative: The alternative caption of the feature

  • unit: The unit for the feature.

  • help: The help text on the feature

  • abbr: The abbreviation of the feature.

  • dataType: The Perfion data type of the feature (string, number, date, text etc.)

Notice that many of the above attributes are inherently localizable, i.e.. the unit for, say, “VolumeL” may be different in different languages. The ECommerce API will pick the unit in the primary language, i.e.. the first one listed in setting “Languages”.

Comment

#Newfeature

A mapping can be commented out simply by beginning its name typing a #-sign (hash sign).

A commented out mapping is simply ignored by EC.