Configuration Boolean Attributes
Overview
Boolean attributes allow you to define a field as any two choice option. Common uses are to indicate true/false, either/or, valid/invalid or to include/not include.
The following images show the different display options available for Boolean attributes.
-
Legacy Display Type: Checkbox
-
JET Display Type: Switch, Checkbox, Radio Button Horizontal, or Radio Button Vertical
Note: When a Boolean attribute is part of an attribute set, the Boolean attribute is displayed as Checkbox, regardless of the attribute setting.
Administration
Add a Boolean Attribute
-
Navigate to the Attributes Administration List page.
-
Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation column, select Attributes and then click List.
The Attributes Administration List page opens.
-
-
Click Add. The Attribute Editor page opens.
-
Enter information for the fields listed below.
Note: Fields preceded by an asterisk (*) are required.
Field Description *Name
Enter the attribute name.
*Variable Name
The Variable Name field populates automatically. Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.
Note: Customers should not use any of the following names for Configuration attribute variable names. Using these values may cause issues with customer configurations and could possibly alter site functionality.
- action_id
- bm_cm_process_id
- _bom_
- bs_id
- commerce_doc_url_params
- commerce_list_id
- document_id
- document_number
- folder_id
- formaction
- from_config
- scrollTop
- shopping_cart_id
- step_id
- token
- version_id
*Category Select Configurable Attribute or Signed Punch-in Attribute.
A Signed Punch-in Attribute functions identically to Configuration attributes except they require verification of digital signature data before pricing data is provided to the end customer. See Signed Punch-in Attributes for more information.
Array Type
Select this checkbox if the attribute can be used as a column in an array set.
Refer to Managing Arrays and Sets for more information.*Data Type
Select Boolean.
Attribute Type Select Text Field. Part Information
This section is used to associate a Configuration Integer Attribute or a Boolean Attribute to a single Parts database record, without the use of Recommended Item Rules. Refer to Attribute - Part Association for more information.
Field Description Part Number
Begin typing in the desired associated Part Number. The Part Number field will auto-suggest Part Numbers from the Parts database.
A green check mark indicates the entered part is valid. A red X icon indicates the entered part is invalid because it does not exist in the Parts database.
Comment
The Comment field is grayed out if the Part Number is invalid; it will remain uneditable until the Part Number is valid.
-
Click one of the following:
- Cancel to return to the Attributes List page without saving changes.
- Add and New to save changes and create another attribute.
- Add to save changes and open the Boolean Attribute Editor, proceed to Edit a Boolean Attribute.
Edit a Boolean Attribute
-
Navigate to the Configurable Attributes Administration List page.
-
Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation column, select Attributes and then click List.
The Attributes Administration List page opens.
-
-
Click the name of an attribute with Text in the Attribute Type column, or create a new attribute.
The Text Attribute Editor page opens.
Note: The Attribute Editor defines the default display type properties for all layouts.
Field Description Name
The name of the attribute
The Name value appears as the attribute label when this item is added to a Configuration layout.Display Type
The following Display Types are available:
- Legacy Display Type: Boolean Checkbox
-
JET Display Type: Switch, Check Box, Radio Button Horizontal, and Radio Button Vertical.
Note: When a Boolean attribute is part of an attribute set, the Boolean attribute is displayed as Checkbox, regardless of the attribute setting.
Description
The attribute description.
When an attribute Help Icon is displayed on a layout, the description appears when the user hovers over the help icon. Refer to Help Icons for more information.
Field Description Set Type - None: The user can input any value without encountering an error message.
-
Set: A recommendation rule can change the value entered by the user unless the attribute is locked by the user.
-
Auto Lock - When Auto Lock is on, user selections made to an attribute after a Recommendation rule “Set” the attribute to a different value will be retained if the Recommendation Rule is fired again (such as upon an Update). Auto Lock Example
- Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Attribute X retains its value of B. The recommendation message defined in Recommendation rule 1 for option A will appear.
- Auto Lock is on by default for all Recommendation rules that have a set type of “Set.” The Admin can turn Auto Lock off within an attribute by selecting “Set” for the set type and by not selecting Auto Lock. If this were done to Attribute X, the user would experience the following:
- Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Recommendation rule 1 runs and sets Attribute X to A.
-
- Forced Set: A recommendation rule will change the value of the attributes regardless of what the user enters and if the attribute is locked or not.
Hidden This attribute will not appear to the user. It can be used in rules.
Auto Update This will by updated by the system without the user invoking an action.
Hide Transaction
This attribute is hidden within a commerce document.
Status
-
Active: An attribute that is active will appear to the buyer and/or be included in rules.
All attributes are active by default.
- Inactive: An inactive attribute cannot appear in a rule to the user.
- Internal: An internal attribute will only appear to FullAccess users.
-
Show Start/End Dates: Click to specify how long the attribute will remain in the chosen status.
If no duration is specified, the attribute maintains its status until the administrator changes it.
This section is used to associate a Configuration Integer Attribute or a Boolean Attribute to a single Parts database record, without the use of Recommended Item Rules. Refer to Attribute - Part Association for more information.
Field Description Part Number
Begin typing in the desired associated Part Number. The Part Number field will auto-suggest Part Numbers from the Parts database.
A green check mark indicates the entered part is valid. A red X icon indicates the entered part is invalid because it does not exist in the Parts database.
Comment
The Comment field is grayed out if the Part Number is invalid; it will remain uneditable until the Part Number is valid.
Default: Select True or False as the attribute default selection.
-
Select one of the following options:
-
If translations are required, click Translations and provide translated values for the label and description fields.
- Click Apply to save changes and remain on the Attribute Editor page.
-
Click Update to save changes and return to the Configurable Attributes Administration List.
-
Click Update and New to define another attribute.
-
Click Back to return to the Configurable Attributes Administration List without saving changes.
-
Use Cases
Boolean attributes can be used in the condition, action, condition input, and action input like other configuration attributes. There are a couple of things to be aware of:
- Boolean attributes can be used in both advanced and simple conditions.
- When used in the simple condition,
=
andNot =
are Operators - Recommendations, Constraints, and Hiding rules can be defined on Boolean attributes.
- Only simple action is available for constraint rules.
$BM_UNCHANGED_BOOLEAN$
is not supported
Adding a Boolean Attribute in a Rule
Here is a simple use case for adding a Boolean attribute in a rule. This assumes you have already created a Boolean attribute.
Goal: You don't want to display the desserts array on the UI unless Would You Like a Dessert = TRUE.
-
Navigate to the Hiding Attribute: Rules List page.
- Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
Ensure that Product Families is selected in the Navigation column and click List.
The Supported Product Families page opens.
-
For the Product Family containing desserts, select Hiding Attributes in the Navigation column and click List.
The Hiding Attribute: Rules List page opens.
-
Click Add.
The Hiding Rule: New Rule page opens.
-
Enter a Name, Variable Name and Description.
The Variable Name field populates automatically. Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.
-
In the Condition section, select the condition type Simple Condition.
An Add Row section appears.
-
Click Add Row and enter the following:
- Set Row Grouping.
-
In the Action section, add the Actions that you will hide when the condition is met.
In this example, the attributes with the red X next to them are the parts of the User Interface that will be hidden when "Would you like a dessert?" is false, or unchecked.
- Click Add.
Example of the User-Side (Hidden Array - Condition is met)
Example of the User-Side (Visible Array - Condition is not met)
Notes
Boolean attributes are displayed to the user as a checkbox; this functionality differs from Commerce when attributes are read-only.
When set as read-only, Boolean attributes display as a disabled checkbox.