Creating Triggers in SAP CPQ

Objectives

After completing this lesson, you will be able to:
  • Describe the concept of triggers in SAP CPQ
  • Describe the differences and types of triggers in SAP CPQ
  • Creating a trigger in product configuration

Triggers in SAP CPQ

The Formula Builder also manages triggers, which execute specific actions when certain conditions are met. They are a way to automate activity in the CPQ system based on certain events.

For example, consider two attributes, unit of measure and length. Length can be defined by centimeters or inches by setting the unit of measure to one of these two values. If you later decide to change the unit of measure, the length field must be reset before entering a new one. Triggers allow one attribute to affect others when something occurs that generates an event.

  • Triggers also perform actions when an event occurs on a product attribute.
  • Triggers are defined by an individual attribute.
  • Triggers can be entered manually or by using Formula Builder.
  • Triggers run before rules, so rules override triggers
If a trigger conflicts with a rule, the rule always overrides the trigger.

Trigger Types

There are three types of triggers supported in SAP CPQ:

  • Select trigger
  • Change trigger
  • Reset trigger

Triggers are normally defined using SAP CPQ expressions, which are entered manually or by using the Formula Builder. Alternatively, you can write triggers using Iron Python scripts (by selecting the Scripted Trigger toggle). Writing Python scripts in SAP CPQ is covered in another section of this course.

It's possible to use multiple triggers in the same attribute with multiple actions for each trigger (separated by a semicolon). Each trigger can also use conditional expressions to determine whether to run an action tag.

Let's create a change trigger of our own in the next exercise!

Create a Change Trigger

Business Scenario

Supertech defined a rule for the STX Laptop, that requires a two-year product warranty when either Processor B or C is chosen. Soon after setting up this rule, users ran into a minor issue during product configuration. As intended, the two-year warranty was automatically selected when either Processor B or C was selected. However, if the user then changed the selection to Processor A or D, the two-year warranty remained selected, even though it was no longer mandatory. To avoid potential issues, Supertech would like to create a trigger for the STX Laptop that automatically resets the warranty selection if the processor selection is changed.

Task Flow

In this exercise, you will learn to create a change trigger.

Exercise options

To carry out this exercise, you can choose the following option: Platform Simulation: Watch the step-by-step instructions within the simulation.

To start the simulation, choose Start Exercise in the figure below.

Log in to track your progress & complete quizzes