>Product Information Manager : Attributes - Setup


Access

To manage attributes, click  - > Setup - > Attributes (in the Classification section).

Contents

Overview

Attributes are not predefined. Customers can use attributes the way they need them for their requirements. To simplify the customization, some attributes are shipped together with the application. Attributes are data items which describe properties of products. An attribute can be used in multiple classifications. You can assign attributes to classification groups. Afterwards the attribute values can be edited within the product editor.

For example: a car can be described by its attributes make, model, color, and more.

See the Basic Actions page for more info on standard actions (search, sort, edit, delete etc.).

Create Attributes

To create a new attribute, click  to open the Attribute Editor. It consists of the tabs: General, Values and Presentation.

General Tab

Attribute ID can only contain alphanumeric characters (letters A-Z, numbers 0-9), hyphens ( - ), underscores ( _ ) and dots (.).

On the General tab, enter the Attribute ID (which can be defined only in creation mode) and select the attribute Type from the drop down list. Both these fields are mandatory.

Click to manage various values' properties, default values or select the attribute value options list for the newly created attribute.


  • Min/Max length: enter the length limits for the value.
  • Pattern: enter value pattern using the standard signs.
  • UoM: Unit of Measure - this value will be added to the entered value by default in case selected
  • Value List: select the predefined Value List. See Value Lists page in PIM for more info.

Depending on the Type selected, different input fields are rendered. Default Value field is rendered for all types of attributes.

Default values are not applicable for Classification Group Attribute Values and compatibility constraints (compatibility attribute values).

The default value (for string, markdown or text-table attributes) cannot exceed 2000 characters, unless stricter Max Length parameter is set.

Only one default value can be provided for a multi-valued attribute.

Min/Max fields rendered for integer, decimal and long types and Min/Max Length fields rendered for string type define the minimum/maximum input numbers/characters limits.

For the attributes of the Text Table type in the dialog opened by clicking the button, you can set the Schema ID to be used, which will define a set of columns and data available for selection when filling in the text-table attribute value.

You can manage Schemas using the groovy script located in the Customization Area page under the path: ./integration/text-table/schemas/schemas.groovy.
For details on the text-table attribute values handling see the Text-table Attributes handling section of the  Attributes tab of the PIM Product editor page.

If required, fill in data for the following fields:

  • External Attribute ID: can be used for attributes which have different Units of Measures (UoMs) in different languages where each attribute needs a separate ID.
  • Description and Long Description: select the desired language from the drop down list of options. Click  to add descriptions in several languages and  to delete the entry.
  • Description Fallback: enter a description which will be used in case of no Description in a specified language is available. Terms can be used in a Description Fallback. See more on the Terms page in PIM.
  • Document - reference to a document, uploaded into the Work Area. Select Document using icon. In particular, the image assigned here can be used:
    • as an attribute image to be displayed in attribute value editors (for string and markdown attributes, including multi-language but not multi-valued, and when the attribute value 'is expression')

JPG, BMP, GIF, PNG file formats are supported for attribute previews in attribute value editors. TIF format is displayed in IE browser only.

    • as an attribute icon to be displayed on the Search Product page (relevant for the boolean attributes set to 'true')

The list of the attributes, for which icons are displayed on the Search Product page, can be configured in the jcatalog.productSearch.searchResult.settings (string) configuration attribute. The default attributes are: "IsChemical", "IsFreeShipping", "IsSafety", "isNew", "IsEnvironmentallyPreferred".

  • External Default Name - parameter name by which the attribute may be identified; sometimes default values are not static but depend on context, e.g. default values can be passed to the application using OCI in url. So url may contain USERDATA_NAME=Frank; in this case if extDefaultName of attribute is USERDATA_NAME, then default value for this attribute will be Frank.
  • Section - select the Attribute Section using the icon or the autocomplete functionality. Sections can be managed on the Attribute Sections page.

Attribute sections allow:

  • Filtering the product's attributes by their section on the Attributes tab in Product Editor
  • Displaying the attributes according to the assigned sections on the Product Preview page and PDF export
  • Displaying the attributes according to their sections in the list of attributes assigned to the classification group in the Classification Group Editor
  • Order No -  global key for attributes in the system, which controls the place where this attribute is displayed in the Product Editor later.
  • Facet Order No - determines the attribute's order in the Attribute faceted search on Search Product page in PIM.

If the facet order number is >=0, the attribute can be listed in the attribute faceted search. If the Facet Order No field has no value, it is treated as '0'.

If the facet order number is <0, the attribute does not appear in the attribute faceted search.

The attributes with equal facet order number are sorted depending on the number of occurrences in products (attributes with higher occurrence rate are displayed above the attributes with lower occurrence).

The attributes with facet order numbers are sorted out in descending order.

Click to select the required check boxes for:

  • Is Multi-valued - means this attribute can have multiple values which can be entered in the product editor.
  • Is Required - marks the attribute as obligatory in OPC.
  • Is Multi-language - means attribute values can be defined in multiple languages like English, German etc. (This attribute property can be defined only in create mode, and it is not editable).
  • Is Variable - marks an attribute which is to be filled on the detail page in the OPC application - e.g. if a wooden stamp or business cards are ordered, the required text lines must be specified. In case a product contains at least one attribute with flag isVariable='Y', it is called a SmartForm.
  • Is Supplier Response - the flag is used for attributes that should not be filled in by Customer during RFQ creation/editing process in OPC/PROC/SDP.
  • Is Readonly - means the attribute is read-only purely for information purposes. This attribute property is used in OPC.
  • Exclude from PIM product search - means that this attribute will be excluded from PIM product search and attribute facets.

It is possible to select/deselect the Exclude from PIM product search check box at any time after creating the attribute. However, the changes will be applied after the products reindexing. See Reindex Products page in PIM for details.

If 'ShortDescription' or boolean attributes, which can be used as info icons in product search results, are marked as excluded from product search, no Short Description values/icons are displayed on the Search Product page in PIM.

Values Tab

On this Tab you can enter the Attribute Expression.

Terms can be used in expressions. See Terms page in PIM for more info.

Expression - these expressions can be used to relate attribute values from other attributes, e.g. for the calculation of attribute values. They can contain properties of a product and references to other attribute values of products.

This field does not apply to items loaded via the subsystem.

For example:

Data Type Notation Example
Product Field product.<fieldId> product.productId
Product Attribute Value product.attributeValue('<attributeId>') product.attributeValue('19010107_11')
Boilerplate boilerplate('<boilerplateId>') boilerplate('Vorwort')
Boilerplate in markdown new Markdown(boilerplate('<boilerplateId>') new Markdown(boilerplate('Vorwort')
Term term('$<termId>') term('$blau')
Custom JS Function <function name>() greeting()

It is possible to use custom JS functions in expressions. The functions should be defined in customJSFunctions.js file in integration/externalProduct folder in the Customization Area.

Expressions with attribute values, boilerplates and terms can refer to the value in a particular language. For example: term('$blau','en-GB').

Expressions with attribute values can also include tags referring to a particular attribute value with a tag. For example: product.attributeValue('19010107_11','en-GB','tag1').

Expressions can be created with the help of any of the following types:

Click the appropriate option to select.

The attribute type, where the expression is used, should correspond to the type of resulting data in the attribute value (boolean, date, integer, string, etc.).

Available Product Fields Expression

Choose Available Product Fields Expression.

It is possible to refer to other product information in expressions.

For example:

  • product.prices[1].price - refers to the second price entry for the product;
  • product.docAssociations[0].description - refers to the description provided for the first document associated with the product, etc.
  • JSON.stringify(product.prices) - refers to all prices and prices info as a string.

Search for Attributes Expression

Choose Search for Attributes Expression.

Available Boilerplates Expression

Choose Available Boilerplates Expression.

Available Operations Expression

Choose Available Operations Expression.

It is also possible to create conditions like: "if field xy = 100, then...".

All JavaScript operators can also be used (see https://www.w3schools.com/js/js_operators.asp for reference).

Text-table values usage in expressions

There is an ability to use the text-table attribute values in the other attributes, for this enter the appropriate expression into the Value field on the Attribute tab of the PIM Product editor (an attribute should have Is expression flag checked).

For example, you need to take some values from the following text-table attribute content.

col1

col2

col3

11 12 12
21 22 23
31 32 33

The following variants of expressions can be used in this case (the ID of the current attribute is text-table, you should change it to the appropriate value when using the expressions):

 Expressions, used in the other attribute Calculated results, displayed on the preview page

product.attributeValue('text-table').value()

[[11 , 12, 13], [21 , 22, 23], [31 , 32, 33]]

product.attributeValue('text-table').value({col:"col1"})

[11 , 21, 31 ]

product.attributeValue('text-table').value({row:0})

[11 , 12, 13 ]

product.attributeValue('text-table').value({row:2})

[31 , 32, 33 ]

product.attributeValue('text-table').value([{col:1, row:1}, {col:2, row:2}])

[[ 22 , 23], [ 32, 33]]

product.attributeValue('text-table').value([{col:1, row:1}, {col:1, row:1}])

[[22]]

product.attributeValue('text-table').value({row:1, col:1})

22

Example

Suppose you need to create the 'Perimeter' attribute of the integer type and configure its value to be calculated by the following formula:

Perimeter = (Width+Height)*2

Width and height attribute values should be taken from the appropriate properties of the current product.

First you need to create an attribute and set its type to ' Integer':

Сlick and go to the Values tab to create an expression calculating the perimeter of the product.

On the Values tab click the button and select the Search for Attributes option from the drop-down.

The Attributes reference search pop will be opened. Select the check boxes for the appropriate attributes and click .

You will see the selected attributes in the Expression field.

Now you need to add the appropriate operators signs and revise formula to calculate the required value.

You can see the list of the available operators in by clicking the button and selecting the Available Operations option from the drop-down. 

This is the final look of the perimeter formula:

product.attributeValue('MC_Width')*2+product.attributeValue('MC_Height')*2

We need to assign the created attribute to some Classifications Group using the Classification editor and then assign the product to this group to make the attribute available on the Attributes tab of the Product Editor.

You will be able to see the result of the calculation:

  • in the expression editor

  • On the Product Preview Page

Presentation Tab

Select the Is Default Overwritable check box to define, whether it is possible to overwrite attribute value by external values (e.g. during OCI login) or not.

Once all data is entered, click  to save the newly added attribute or click to cancel the action. It is also possible to create a new attribute while in edit mode in Attribute Editor by clicking or . Click to duplicate or create a copy of an attribute (this button is available only in edit mode).

Duplicate Attribute

Click the option from the  drop-down menu on the search page to create a copy of the existing attribute. Enter a unique Attribute ID and click to save a duplicated attribute. Click the respective / buttons on the Attribute Editor page to duplicate the respective properties of the existing attribute.