VisibilityRule Class

Represents a visibility rule that is evaluated during product configuration. Visibility rules control the visibility of products, attributes, or other UI elements based on configuration conditions.

runtime_industries_cpq

Learn more about the constructor that’s available with the VisibilityRule class.

The VisibilityRule class includes this constructor.

Constructor to create a VisibilityRule instance with the specified visibility rule details.

public VisibilityRule(String stiId, String prcId, String attributeId, String attributePicklistValueId, String target, String scope, String type, List<String> productIds, String message)

stiId

Type: String

The ID of the Sales Transaction Item (STI) associated with this visibility rule.

prcId

Type: String

The ID of the Product Relationship Configuration (PRC) associated with this visibility rule.

attributeId

Type: String

The ID of the attribute associated with this visibility rule.

attributePicklistValueId

Type: String

The ID of the attribute picklist value associated with this visibility rule.

target

Type: String

The target of the visibility rule (for example, product, attribute, or component).

scope

Type: String

The scope of the visibility rule.

type

Type: String

The type of visibility rule (for example, Show or Hide).

productIds

Type: List<String>

List of product IDs affected by this visibility rule.

message

Type: String

The message to display when the visibility rule is applied.

Contains properties to store visibility rule details from configuration rule evaluation.

The VisibilityRule class includes these properties.

Get the ID of the attribute.

public String attributeId {get; set;}

Type: String

Get the ID of the attributepicklistvalue.

public String attributePicklistValueId {get; set;}

Type: String

Get the message value.

public String message {get; set;}

Type: String

Get the ID of the prc.

public String prcId {get; set;}

Type: String

Get the ID of the product.

public List<String> productId {get; set;}

Type: List<String>

Get the scope value.

public String scope {get; set;}

Type: String

Get the ID of the sti.

public String stiId {get; set;}

Type: String

Get the target value.

public String target {get; set;}

Type: String

Get the type value.

public String type {get; set;}

Type: String