Constraint Rules
Use constraint rules to enforce the components selection for a Commercial bundle and Service bundle. Defining these rules restricts the choices the users can make at runtime while configuring the cart.
Defining constraint rules lists or limits the choices the user can make when working with relationships, product offerings, or with attributes in product offerings.
For example, a constraint rule may prevent a user from selecting an attribute value, say a color or size, for a component that doesn’t support that color or size value.
You can access constraint rules from the Rules card in the administration menu.
To configure constraints, you must first select a template and then configure the constraint rule based on that template using a graphical builder.
Select a constraint rule template
The supported constraint templates that you can use to create a constraint rule are:
Rules template | When to use the template |
---|---|
Attribute expression | Use this template to create an expression where the value of an attribute requires or excludes a value of another attribute. For example, the attribute value of red isn’t available for attribute value of large. |
Attribute value | Use this template where an attribute equals a value. For example, more than three OTT services would require a router that support at least 100Mbps |
Relationship quantity | Use this template to determine the number of entities that can be included in a relationship. For example, you can define that for 02 mobile phones the customer must purchase 02 quantities of both voice and data. |
Excludes | Use this template when a resource or an expression must exclude another resource or an expression. For example, a premium service does not support 16 GB memory size. |
Requires | Use this template when a resource or an expression must include another resource or an expression. For example, a premium service requires a 100 Mbps router. |
Requires (Mutual) | Use this template when any two resources or expressions must mutually include each other. For example, when two interdependent products can’t be sold independently |
Model the rule using constraint rule Graphical builder
The constraint builder contains logical or comparison operators along with expressions to help you build your constraint rule.
- Selected product offering, relationship, an expression using the entities within the relationship, or attributes within a relationship
- The constraint type as requires, requires (mutual), or excludes. Requires is the default setting
- Selected product offering, relationship, an expression using the entities within the relationship, or attributes within a relationship
If your configuration spans across multiple nodes within the construct builder, you can take help from the textual construct of the configuration that simultaneously appears on the UI.