
The Formula Builder in SAP CPQ is used to bring automation and accuracy in the process of configuring product offerings, calculating complex pricing, creating tags, and creating expressions.
An expression in CPQ is a combination of values, variables, operators, and functions used to produce a specific result. Expressions are the building blocks of formulas, created to automate calculations or set specific conditions during the CPQ process. Whereas a tag is used in a formula to establish dynamic pricing rules as it represents the unit price and quantity of each item.
The Formula Builder window is divided into two main sections. The top section contains drop-down fields used to build formula. The frame at the bottom, labeled Formula, is where you form the expression, either manually or by selecting the elements provided in the top section.
The Formula Builder is accessed wherever an formula expression can be used. To build an formula, select the kind of data (attribute, value, sequence, or complex tag) you want displayed. Then provide the specifics, such as an attribute, sequence, or the complex tag's body. The top section is categorized by operators and context-sensitive options, which are further divided into three tabs: Variables, Sequences, and Actions/Conditions, which appears in some contexts.
Hint
Actions/Conditions display depending on context. When Syntax checker is opened, it will activate the tab that contains the most appropriate options for the given context.The Check Syntax button checks the formula to ensure the tags have been properly assembled. Any errors are displayed at the bottom of the window. It's a good practice to check an formula using Check Syntax before use to help ensure its proper formation. When finished, select the Update button on the bottom to insert the created formula into the property being edited.

Formula Builder allows you to insert a conditional or Boolean logic statement into a formula from the Select Operator drop-down field. Select an operator from the field and select the update button to include it in the formula. In most cases, the operator is added using its full syntax, including all necessary parentheses. The user then fills in the parameters.

In the Formula Builder under the Variables tab, begin creating an formula by selecting an action/condition/variable. Then select Attributes from the options.
Attribute values can also be selected for the formula if necessary. Attribute value code, attribute cost or price and attribute quantity are examples of attribute variables.
Select the Insert Variable button to add the new tag to the formula.
Attributes can include the following values and variables:
Attribute Values
- Attribute Values:
- Create formula by selecting an Action, Condition or Variable.
- Select Attribute and Attribute Value.
- Insert Variable to add new tag to formula.
- Examples of Attribute Variables:
- Attribute Value Code.
- Attribute Cost or Price.
- Attribute Quantity.

The next tab in Formula Builder is Sequences, which provides serialization to part numbers. Sequences can also be used in formula. Under the Select Sequence Operator menu, select the operator to include in the sequence. Then select the sequence from the Select Sequence menu. Select the Insert Sequence button to add the new tag to the formula expression.
The attributes, which display in the box are limited to those selected for the associated product or category. If a certain object or attribute is not available, make sure it has been selected, check its syntax, or created for the intended formula expression settings.