Product Information Manager : Attributes


Access

To get access to the Attributes tab, you can use the following options:

  • On the Product Search page:
    • Click to open the Product Editor on the Master Data tab, then click the Attributes tab.
    • Click the icon (next to ) to open the Attributes tab directly.
  • On the Product Preview page:
    • Click the icon (next to ) and select the Attributes option.

Contents

Overview

An Attribute is a qualification that defines the property of a product, product element or file. It usually consists of a name and a value of an element, a type or class name of a file. Group Attribute values are displayed in the Product Editor Attributes tab where it is possible to edit them, select Attribute language, status, assign Attribute order number, etc.

It is also possible to edit attribute values from the Attributes section on the Preview page.

See the Common Toolbar section of the Product Editor page for more info on the generic actions.

Attributes Assignment

There are two ways of assigning attributes to a product:

  • via the Classification Group assignment
  • by importing products and their attributes
  • by adding the attribute

Assign Classification Group

You can assign a Classification Group to a product on the Classifications tab of the Product Editor.

All the attributes assigned to the Classification Group will be automatically added to the product.

The attributes which are added to the Classification Group (manually on the Classifications - Setup page or using Import Master Data functionality) after the product was assigned to this Classification Group, will also be automatically added to the product.

Also in this case attribute values data, such as:

  • Default values
  • Expressions
  • Value lists

set for the attributes (if any) will be automatically added.

Importing Products with Attributes

When importing products with attributes assigned to Classification Groups, the relevant attributes are imported.

In this case the default value, if any, of the imported attributes will be displayed on the Attributes tab.

Find more information about import functionality in Import Products and Prices.

Add Attribute

To add a new attribute value, click the button and a new line for the attribute selection appears.

For multi-language attributes, the icon is available in Actions column. Click this icon to create a new line below the existing multi-language attribute and add one more value.

In this way, you don't need to select the attribute from the list every time you need to create a value for a particular language as the attribute information is prefilled.

Fill in or view the parameters for the cells:

  • Attribute: enter the Attribute (ID) and select the appropriate option from the opened autocomplete drop-down list. Start with this column before you complete any other attribute information.
  • Language: enter the language key of the attribute language and select the appropriate option from the opened autocomplete drop-down list.
  • Value: click the Value input field to enter the attribute value directly or use the edit icon by the field to open the relevant attribute value editor, when available. Note that the type of the Value input field and the type of editor correspond to the attribute type.

There is a SOLR Indexer limitation of 32766 symbols per value. To ensure the workability of product search and product reindexing, exclude the attributes, which have the values over this limit, from SOLR. Find more on the Attributes - Setup page.

Please note that there can be stricter DB limitations for different types of entry fields.

  • UoM: shows the Units of Measure defined for the attribute on the Attributes - Setup page, if any.
  • Groups: contains the Classification and Classification Group; is read-only.
  • Is Expression: select the check box in case an attribute value is an expression.
  • Variant: select the Variant from the drop-down list to assign the attribute value to the selected product variant.
  • Status: select the attribute value status from the drop-down list.
  • Tags (hidden by default): enter a tag and press Enter. Multiple tags can be used for one attribute value. You can use Tags defined on Tags page using the autocomplete function.

If there are attribute values with a single tag and the same tag in a combination, only the most recently saved attribute value with this tag can be used to find products by the attribute value on the Search Product page.

  • Section: contains the Attribute Section name. Attribute Sections are created in Attribute Section editor ( - >Setup - >Attribute Sections (in the Classification section) and assigned to Attributes via Attribute editor ( - >Setup - > Attribute (in the Classification section). It is read-only.
  • Type: contains info on the attribute value type and other info (e.g. multi-language). It is filled in automatically according to the selected attribute.
  • Info Text (hidden by default): contains a long description of the attribute in the Content Language, if available.
  • Info Icon (hidden by default): hover over the icon to see the  long description of the attribute in the Content Language.

The visibility and the order of columns can be managed by the table configuration settings. See details in Column Settings section on the Product Editor page.

Click to save the changes.

After saving attribute values in the relevant attribute value editors, don't forget to click in the attribute grid to save the changes from the editors into the grid.

In case an attribute is added manually (not via classification assignment) attribute values data (expressions, value lists) will not be added.

However, the default values of such attributes will appear on the Attributes tab when adding the attribute. The default value is shown, but not automatically saved.

Attributes Handling

Attribute handling depends on the attribute type, its properties ('Is multi-language', 'Is multi-valued', etc.) and whether or not it contains an expression, default value, etc.

Non-multi-language attribute values are not expected to be language-dependent, therefore:

  • their values should not have any language defined
  • if their values (for text-table, markdown type attributes or values with expressions) contain terms, they stay unresolved (except for PDF export and Product Preview, where all values are resolved according to the content language).

Expressions

Select the Is Expression check box in case an attribute value has to be an expression.

Double-click the Value cell to enter the expression directly in the grid or click the icon to open the Expression Editor dialog window.

The following notations can be used in the expressions:

Data Type Notation Example
Product Field product.<productFieldId> product.productId
Product Attribute Value product.attributeValue('<attributeId>') product.attributeValue('19010107_11')
Term term('$<termId>') term('$blau')
Boilerplate boilerplate('<boilerplateId>') boilerplate('Vorwort')
Boileplate in markdown new Markdown(boilerplate('<boilerplateId>')) new Markdown(boilerplate('Vorwort'))
Custom JS Functions <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.

Product attribute value expression may include a reference to a particular language and a tag. For example: product.attributeValue('LongDescription','en-GB','tag1') will refer to a product's long description in en-GB with tag1; product.attributeValue('LongDescription',null,'tag1') will refer to the value without the defined language and tag1.

Expressions referring to terms and boilerplates may also include a reference to a particular language. For example: term('$Action','de-DE') will refer to the term translation in de-DE language.

Reverse Relations are not available in the expressions for product attribute values for the moment (will be done later).

If the data type used in the expression is multi-language (multi-language attribute), the result pane will show the value for:

  • the language defined for the attribute value entry in the Language field
  • the content language

The result of the expression's evaluation will return an error if there is an error in expression or it can return 'null' in the following cases:

  • when there is no referenced value for the defined parameters (language, tag) (empty value)
  • when there is no such a referenced element (there is no such a product attribute, term, etc.)
  • when the result of the calculation is 'null'

In case the expression is used for the variant attribute value, the expression editor shows the variant product the expression is used for (hovering the cursor over the variant ID also shows the info as a tooltip).

The expression in the variant attribute value will refer to the relevant product attribute value for the variant. The expression used in the attribute value for the master product will refer to the relevant attribute value of the master product.

All attribute value editors also show the attribute value Status, attribute value Tags (if any) and attribute details in Further Information section.

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

See the Attributes - Setup page for details on the Expressions creation.

Enter the expression and click to see the result of its execution. If the expression is correct, click to save it.

Text-table values usage in expressions

There is an ability to use the text-table attribute values in other attributes. For this, enter the appropriate expression into the Value field (an attribute should have Is expression flag checked).

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

If you want to refer to several values from the table (row/column, etc.), the string attribute which uses the relevant expression in its value should be multi-valued.

col1|col2|col3
-|-|-
11 | 12 | 13
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
product.attributeValue('text-table').value() [11, 12, 13, 21, 22, 23, 31, 32, 33]

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

[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

Multi-valued Attributes

In case an attribute is multi-valued you will be able to set the additional values in the following way:

  • Click the  icon, which appears after clicking the value cell, to open the multi-valued attribute value editor.

Add the appropriate values using the  icon. Use  to remove values.

You can change the order of entries by dragging the relevant entry to the desired position using  .

Click the  button to save the changes.

Multi-language Attributes

In case an attribute is multi-language, it is possible to change its value in a target language in the following way:

  • Click the value cell and edit the value directly in the grid.

OR

  • Click the  icon, which appears after clicking the value cell, to open the multi-language attribute value editor.

You can edit the value of the attribute in the left column and compare it against a reference language value on the right.

The reference language is the Content Language as set up on the User Menu and can be changed by selecting the language from the drop-down list. The order of languages in the drop-down list is also determined by the order of languages in the Content Language section of the User Menu or in the jcatalog.dataContentLanguages.order (string) attribute.

The reference language pane shows the following:

No fallback logic is applied to the values shown in the reference language pane of the multi-language attribute value editor.

  • In case there is a value defined for the reference language available: the value for this reference language.
  • In case the value in the reference language is an expression: a relevant notification message that the value cannot be shown as it is an expression.
  • In case the attribute value is a value for the product variant: the value in the reference language for the relevant variant.
  • In case the attribute value has a tag: the value in the reference language with the identical tag.

In case of the multi-language attribute of markdown type, the reference language pane shows the value in plain text format with unresolved terms and products. In this way it is easy to see where the term, product, link or other element is used. The data from the reference language pane can be copied and then pasted into the editing area for the target language (left pane). The editing pane has rich-text tools, see the Markdown Attributes section below.

In case the attribute is multi-language and multi-valued, no reference language value of the attribute will appear in the value editor window.

Edit the value, when necessary, and click to save the changes.

String Attributes

In case an attribute is of string type, it is possible to change its value in the following way:

  • Click the value cell and edit the value directly in the grid.

OR

  • Click the  icon, which appears after clicking the value cell, to open the string attribute value editor.

Non-multi-language attribute should not have any language defined.

Edit the value, when necessary, and click button to save the changes.

Markdown Attributes

In case an attribute is of markdown type, it is possible to change its value in the following way:

You can find more information on markdown syntax at https://guides.github.com/features/mastering-markdown/ or other Internet resources.  

  • Click the value cell and edit the value directly in the grid.

OR

  • Click the  icon, which appears after clicking the value cell, to open the markdown attribute value editor.

Edit Mode

The markdown attribute value editor opens in editing mode.

The editor's header includes the attribute description, attribute ID and attribute image, when available, (see Attributes - Setup).

The markdown attribute value editor is a rich-text editor allowing to:

  • Enter a text in bold, italic and strike-through formats

To use the abovementioned styles for referenced terms and products, use the square brackets as follows (e.g. for italics):

Object Format Example Result
Term
_$[termID]_
_$[Action]_
Action
Product
_#product.[productID].[catalogID]_
_#product.[5658741].[lap001]_

5658741 (lap001)

Product description
_#product.[productID].[catalogID]:DESC_
_#product.[5658741].[lap001]:DESC_
iPad 3

In the product references entered using the autocomplete function or product reference search, product and catalog IDs are encapsulated into square brackets by default.

  • Include links (in the following format: [link text]( http://example.com))
  • Arrange the text into sections with headers
  • Make bullet and numbered lists
  • Use Terms
  • Use Products

There are 3 ways to include Terms and Products into the markdown attribute value:

  1. Type the Term ID into the text area directly preceded by " $" or type the product reference in the following format:  #product.[<ProductID>].[<CatalogID>]
  2. Use autocomplete function: type " $" for the term or " #" for the product and start entering the data, then select from the drop-down list.
  3. Click or to open Term or Product reference search windows respectively and select the relevant term or product.

For multi-language markdown attribute values, the editor has an additional field with a reference language. See Multi-language Attributes section for details.

Preview Mode

You can view the resolved attribute value as it will appear on the Product Preview page by clicking .

The preview for non-multi-language markdown attribute shows the value for the current content language, which is specified above the value.

Terms and product references used in non-multi-language attribute values are resolved for the current content language in the Preview mode, however, they are not resolved in external product exports.

Clicking the button for multi-language markdown attribute value shows the attribute value preview for the selected language (or content language, if no language selected) and the reference language on the adjacent pane.

Clicking the Preview button again, brings you back to the editing mode of the markdown attribute editor.

Edit the value, when necessary, and click to save the changes.

Text-table Attributes

In case an attribute is of the text-table type you will be able to edit the attribute value in the following way:

  • Click the Value cell and edit the value directly in the grid.

OR

  • Click the  icon, which appears after clicking the value cell, to open the text-table attribute value editor.

The text-table attribute value editor page consists of 2 parts (sections):

You can switch the sections view mode using the buttons located between the sections:

  • : to place the Preview section to the right of the Editor section;
  • : to place the Preview section under the Editor section (default view).

Editor Section

In the Editor section, you can edit the text-table attribute values.

The Editor has two tabs:

  • Table Editor: allows adding rows, columns, references to Terms and Products via UI (using the appropriate buttons) and enter the information cell-by-cell
  • Text Editor: allows managing text-table manually (as a simple text format)

The content added in the Editor section is transformed and displayed in the Result section in its final look.

You can add new entries into the Editor section in the following way:

  • Click to add a new row. The table header and one empty row with one column will be added to the editor. In case the Schema has been defined for the current attribute, the predefined header and columns set will be added.

The predefined columns set together with header names and value options list depend on the Schema ID selected on the General tab of the Attribute editor when creating the attribute of the text-table type ( - > Setup - > Attributes). You can manage Schemas using the groovy script located in the Customization Area under the path: ./integration/text-table/schemas/schemas.groovy.

  • Click  to add a new column, it will be added after the existing columns (as the rightmost column).

In case the Schema ID has been defined for the text-table, is not available, as the columns set has been already preset by the table schema.

To delete a row, use at the end of the relevant row.

To delete a column, use by the relevant column header title.

The deletion of a single available column returns the text-table editor to an 'empty' value state.

To resize the column, click the border line between the columns and drag it to the required size.

Click the  button to search for and add a term to the text-table attribute value or select the desired term manually with the help of the autocomplete function; to do so, enter $<TermID>.

Click the  button to open a product reference search, select and add a product to the attribute value grid or choose  the desired product manually with the help of the autocomplete function; for this, enter #product.[<ProductID>].[<CatalogID>].

By default, in the product reference selected by product reference search or autocomplete function, the product ID and catalog ID are encapsulated into square brackets to ensure proper resolution of references that include special characters in IDs and other cases. For example: #product.[X53SV-SO951V].[lap001].

In case you need:

  • Product image to be displayed instead of the Attribute ID on the Preview page - add :IMG after the product link, e.g.  #product.[X53SV-SO951V].[lap001]:IMG
  • Product description to be displayed instead of the Attribute ID on the Preview page - add :DESC after the product link, e.g.  #product.[X53SV-SO951V].[lap001]:DESC
  • To repeat the same content as in the cell above you can use ellipses ( ...). The appropriate value will be displayed instead of the ellipses (...) in the Result section.

Also you can switch to the Text Editor view and add or delete columns, rows and enter the table content manually.

Terms and Products autocomplete functionality (after typing "$" or "#"), as well as buttons for Terms and Products reference search are also available in Text Editor mode.

Tables should be defined in the following format:

|Column Header 1|Column Header 2|
|-|-|
|Table Data 1:1|Table Data 1:2|
|Table Data 2:1|Table Data 2:2|
|Table Data 3:1|Table Data 3:3|
 In case of incorrect text-table format, the error message is displayed and no preview is available in the Result section.

Result Section

In the Result section you can see the preview of the attribute values from the Editor section.

The Result section shows terms translations and product references, if used, in the UI language.

Terms and product references used in non-multi-language text-table attributes are resolved in the Result Section, however, they are not resolved in external product exports.

The attribute value content can be displayed in the Result section according to the preview type selected in the Neutral drop-down list box.

The preview options can be customized using layouts.groovy file located in ./integration/text-table/layouts folder in the Customization Area.

The following variants of the preview are available:

  • Neutral
  • Join first and second columns
  • Hide first column
  • Replace Product with Image (first column)
  • Replace Product with Description (first column)
  • Suppress duplicated products (first column)

Suppress duplicated products option removes the duplicated products from the first column when they occur one-below-the other and shows the product's image at the first occurrence of the product.

Click to save changes. Click  to close the attribute value editor.

Product Attribute Value Versions

Click to show information on the version of the Attribute and history of its changes.


The functionality to view the product's attribute value versions is unavailable in case product versioning is disabled (when the configuration attribute is set to 'false').

Delete Attributes

Click to remove the selected attribute entry. Click , to save the changes.