You are here: Configuration > Attributes and Arrays > Boolean Attributes

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.

Boolean attributes can be used for a variety of purposes. One use case would be to include a checkbox within an array, possibly for an add-on item. In the example below, the Boolean attribute is Add Nuts?.

ClosedExample of a Boolean Attribute in an Array


ADMINISTRATION

ClosedAccessing the Boolean Attribute Editor Page

  1. ClosedNavigate to the Configurable Attributes Administration List page.

    1. Click Admin to go to the Admin Home Page.

    2. Click Catalog Definition in the Products section.

      The Supported Products page appears.

    3. In the Navigation column, select Configurable Attribute and then click List.

      The Configurable Attributes Administration List page appears.

  2. Click the name of an attribute that has Boolean in the Attribute Type column, or create a new attribute.

    The Boolean Attribute Editor page appears.


ClosedUsing the Boolean Attribute Editor Page

The Boolean Attribute Editor page has the following sections under the General tab: Main Information, Properties , and Default Data.

ClosedMain Information Section

  1. Edit the Name of the attribute.
  2. Enter a Description.

    If Help Icon is checked for the attribute in the Configuration Flow Editor, the description appears when the user hovers over the help icon.

    For more information, see Configuration Flows.

ClosedProperties Section

  1.  Choose the 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.
    • 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.
  1. Select the appropriate checkbox for:
    • Required This will require the user to enter a value before proceeding to a commerce transaction.
    • 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 In Transaction This attribute is hidden within a commerce document.
  1. Choose the Status of the attribute:
    • 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.
  1. Click Show Start/End Dates to specify how long the attribute will remain in the chosen status.

      If no duration is specified, the attribute maintains its status until the admin changes it.

ClosedDefault Data Section

Use the Default drop-down to select either True or False, if you wish the attribute to default to one of these selections.


USE CASES

Boolean attributes can be used in the condition, action, condition input, and action input like other configurable attributes. There are a couple of things to be aware of:

ClosedAdding 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.

  1. ClosedNavigate to the Hiding Attribute: Rules List page.

    1. Click Admin to go to the Admin Home Page.
    2. Click Catalog Definition in the Products section.

      The Supported Products page appears.

    3. Ensure that Product Families is selected in the Navigation column and click List.

      The Supported Product Families page appears.

    4. For the Product Family containing desserts, select Hiding Attributes in the Navigation column and click List.

      The Hiding Attribute: Rules List page appears.

  2. Click Add.

    The Hiding Rule: New Rule page appears.

  3. Enter a Name, Variable Name and Description.

    The Variable Name field populates automatically, but you can change the entry.

  4. In the Condition section, select the condition type Simple Condition.

    An Add Row section appears.

  5. Click Add Row and enter the following:

  6. Set Row Grouping.
  7. 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.

  8. Click Add.

ClosedExample of the User-Side (Hidden Array - Condition is met)

ClosedExample of the User-Side (Visible Array - Condition is not met)


NOTES

Have as few attributes "auto-update" as possible.

    There is no option to hide/show a label.

RELATED TOPICS

Related Topics Link IconSee Also