Commerce Attribute Groups
Overview
Commerce Integer, Float, and Currency attributes can be added to Attribute Groups. Attribute Groups can contain one or more attributes and can be referenced in SUM and AVG aggregation functions in Formulas.
When an Attribute Group is referenced in a SUM or AVG function, all attributes within the Attribute Group are included in the function’s calculation, eliminating the need to explicitly list every attribute in the function. In many cases, pricing logic will become simpler to administrate, since admins can modify Attribute Groups as needed instead of having to restructure Formulas by adding or removing attributes.
Administration
Groups Panel in the Attribute Editor
The General tab of Integer, Float, and Currency attributes now has a Groups panel. An attribute will be in each Attribute Group that is listed in the Groups List of its Groups panel.
|
Attribute Groups are created and searched for in the search field. Typing a new, valid Attribute Group name in the search field will produce a Create {GroupName} Group option in a drop-down from the search field, where {GroupName} is the text in the search field. Selecting the Create Group option and then clicking Add will create the Attribute Group and add the attribute that is currently open to the Attribute Group.
Typing in the search field will produce suggested, existing Groups in a drop-down below the search field. Selecting an existing Attribute Group and then clicking Add will add the attribute that is currently open to the selected Attribute Group.
|
|
The Groups list contains all Attribute Groups that the attribute in. Selecting an Attribute Group within the Groups list and then clicking Remove will remove the attribute from the Attribute Group and the Attribute Group will no longer appear in the Groups list.
|
All changes made within the Groups panel (including the creation of an Attribute Group), will not be saved unless the attribute is saved.
Groups Panel in Formula Management
A Groups panel appears in the left panel of Formula Management. All existing Attribute Groups will be listed in the Groups pane. If many Attribute Groups exist, the admin can filter the list by typing an Attribute Group’s name in the Filter field.
For more information on using Attribute Groups in formulas, see Formula Management Overview.
Clicking an Attribute Group in the Groups panel will open the Group dialog box, shown below.
Group Window in Formula Management
Attributes can be added to the Attribute Group via the Add to Group field. Admins can type an attribute’s name into the Add to Group field and select the attribute when it is suggested in the drop-down below the Add to Group field in order to add it to the Attribute Group. The attribute will then show up in the attribute list in the Group dialog box.
Clicking the Remove icon () of an attribute will remove the attribute from the Group dialog box, and the attribute will no longer be a part of the Attribute Group.
Clicking Save applies the changes made to the Attribute Group, while clicking Cancel reverts all changes.
For more information on using Attribute Groups in formulas, see Formula Management Overview.
Creating, Modifying, and Referencing Attribute Groups
Creating an Attribute Group
-
Navigate to the Attribute List page.
- Click Admin to go to the Admin Home Page.
-
Click Process Definition in the Commerce and Documents section.
The Processes page opens.
-
For the process you are interested in, confirm that Documents is selected in the Navigation drop-down menu, and click List.
The Document List page opens.
-
For the main document, confirm that Attributes is selected in the Navigation drop-down menu, and click List.
The Attribute List page opens.
- Click the Name of an Integer, Float, or Currency attribute that will be in the Attribute Group.
- On the attribute’s General tab, locate the Groups panel.
-
Enter a name for the Attribute Group in the search field.
Attribute Group names can only contain alphabetical characters, numerical characters, and underscores. Attribute Group names cannot contain spaces.
- Click Create {GroupName} Group, where {GroupName} is the name of the group entered by the user.
-
Click Add.
The Attribute Group has been created and will now appear in the Groups List.
-
Click Apply or Update to save the attribute.
The Attribute Group will not be created if the attribute is not saved.
Adding an Attribute to an Attribute Group
There are two places in the system where an attribute can be added to an Attribute Group:
- Within the attribute
- Within Formula Management.
- Open the attribute that must be added to the Attribute Group.
- On the attribute’s General tab, locate the Groups panel.
- Begin typing the name of the Attribute Group into the Search field.
Existing Attribute Groups will be suggested below the Search field.
-
When the correct Attribute Group appears below the Search field, click the Attribute Group to select it.
The full Attribute Group name will appear in the Search field.
- Click Add to add the attribute to the selected Attribute Group.
- Click Apply or Update to save the attribute.
To remove an attribute from an Attribute Group, select the Attribute Group from the Groups List inside the attribute, click Remove, and then Apply or Update the attribute.
- Open Formula Management.
-
Click Groups in the left panel to expand the Groups pane.
The Groups pane will show all Attribute Groups that have been created.
-
Click the Attribute Group that needs an attribute added to it.
The Attribute Group window appears.
-
Begin typing the name of the attribute that must be added to the Attribute Group into the Add to Group field.
Attributes will be suggested below the Add to Group field.
- When the correct attribute appears below the Add to Group field, click the Attribute to select it.
- Click Save to save the Attribute Group.
To remove an attribute from an Attribute Group from within Formula Management, open the Attribute Group, click the
Remove icon on the attribute, and save the Attribute Group.
For more information on using Attribute Groups in formulas, see
Formula Management Overview.
Referencing an Attribute Group in Formula Management
Attribute Groups can be referenced within SUM and AVG functions in a Formula. To add an Attribute Group to a SUM or AVG function:
- Open Formula Management.
-
Click on a SUM or an AVG function within a Formula to open the function.
The Sum or Avg window appears.
-
Begin typing the name of the Attribute Group into the Parameters field.
A combination of literal values, main document attributes, sub-document attributes, and Attribute Groups will be suggested below the Parameters field.
-
When the correct Attribute Group appears below the Parameters field in the Attribute Groups section, click the Attribute Group to select it.
The Attribute Group is added as a parameter, and all attributes within the Attribute Group will be used in the calculation of the function.
- Click Save to save the function.
- Click the Save Formula icon ( ) to save the Formula.
To remove an Attribute Group from a function in Formula Management, open the function, click the
Remove icon on the Attribute Group, save the function, and save the Formula.
For more information on using Attribute Groups in formulas, see
Formula Management Overview.
The value of empty Attribute Groups that are referenced as parameters in SUM or AVG functions will be equal to 0 when used in function calculations.
Notes
Attribute Groups that do not contain at least one attribute and are not referenced in Formula Management will automatically be deleted upon deployment of the Commerce Process.
Related Topics
See Also