ISS/CPQ supports approval of quotation and workflow based on the rule. It offers defining and maintenance of the rule conditions and rules from the system. To achieve this concept, the following business types are introduced here:
- Approval Rule
- Condition Type
- Rule Status
- Approval Gate Flow
- Approval Gate
1. Approval Rule
Approval value is the fundamental part of Approval Engine. It is composed of one or more conditions and one mandatory approval gate. It also has its own status active or not.
- Rule Status: RULE_ACTIVE/RULE_INACTIVE
Rule status must be active for logic to run. If inactive, approval rule will not run and will be considered as logically deleted.
Each approval rule consists of multiple conditions. Rule is fired only when all the conditions are met.
- Approval Gate Flow:
Upon meeting all conditions and active rule was fired, “hasApprovalGateFlow” will be the outcome. When the rule is fired, it is the starting point of whole workflow process. Depending on who submit the quote, ISS will recursively find the approval gate with higher role according to role hierarchy.
Condition is the most basic and atomic unit of approval rule and looks like to an equation. A condition can be used by more than one approval rules to increase re usability.
3. Condition Equation
Rule is fired when
a. The Quote satisfies all the conditions of the rule.
b. One of the Sales Item in Quote satisfies all the conditions of the rule.
Scenario for usage of Item 7, 8 and 9:
Administrator wants to define a condition that price item type is “Added Fee” and the base amount value is greater than 30. Since we have different pricing (SSC, ERP), there are several options to make further filtering.
When administrator choose price item type, UI will automatically show (7) Secondary condition value, (8) Check on Price Item Base Amount (9) Condition Source.
Condition attributes can be:
- any BDA or BRA on Quote or SalesItem
During approval rule firing, the actual value of this attribute is substituted as left operand. Search
- Business Type
The domain of condition attribute it belongs to. Currently the two business types supported are Quote and SalesItem. The condition business type needs to be used either Quote or Sales Item depending on attributes are on Quote level or Sales Item level.
- Search Expression
Search expression is useful if condition wants to use attribute that is not shown in the condition attribute. It provides facility to retrieve data more than the defined types such as,
- Condition Value
The value that is used to check in the condition as right operand. User can input any value regardless of the type. Moreover, ISS supports a predefined set of constant values via ConditionEnvironmentVariables.
The followings are individuals of condition environment variables:
- VAR_LOGGED_IN_USER --Represent current login user business object.
- VAR_LOGGED_IN_USER_ROLE --Represent current login user role business object.
- VAR_TODAY --Represent today date.
For example, these constant values can be used in conditions such as quote creator must be current logged in user or current logged in user role.
Operator in CPQ is similar concept to operator in mathematical equation. Eight types of operator are supported as follows:
- equal to (=)
- greater than (>)
- greater than or equal to (>=)
- in (IN)
- less than (<)
- less than or equal to (<=)
- not in (NOTIN)
Among these operators, depending on the range of condition Attribute, ISS/CPQ supports the operators as shown in matrix:
Things to Note About
- IN operator will be checked for the value IS contained among the possible values.
- NOTIN operator will be checked for the value IS NOT contained among the possible values.
- >, >=, < and <= operators can be used for only decimal and integer.
- Special Conditions
Two type of special conditions are provided:
- System Condition
System condition is a condition that is applicable to all rules. Common conditions could be defined as system condition.
- TRUE Condition
True condition is a condition whose result is always true. For example: It can be used in a situation where modeler needs to make a rule true by default.
Lastly, Approval gate will have user role who is responsible for current workflow step and next stage (approval gate) if existed.
4. Setup steps and UI interaction of Approval
When the quote is in OPEN status, any user can check dynamically what will be the approval flow and who will be the approvers based on the existing quote data and current login user perspective without submitting the quote.
Any user who can update the quote can also submit the quote.
Upon Quote submission, the approval flow is fixed and cannot be changed i.e. the approval gates are fixed. If workflow has more than one approval gates to go to (in parallel or in sequence), the workflow process will conclude only when all the approval gates are checked (i.e. approval gate owner approved the quote). This will be further explained in Status Flow with Actions chapter.
For debugging and tracing of approval flow on HANA cloud server, administrator can turn on debug log for the following java class files:
4.1 Setup steps of Approval
Step 1: Define a condition (Administration>Master Data Management>Condition)
Step 2: Define an Approval Gate (Administration>Master Data Management>Approval Gate)
An Approval Gate can have multiple Approval Gates. This is how it defines approval in sequence for single or multiple roles.
Step 3: Define an Approval Rule and link it with Approval Gate and Condition. (Administration>Master Data Management>Approval Rule)
4.2 Setup steps for UI Interaction of Approval
Step 1: Under Quote>(select quote)>Line Items(select line item)>Discount
Step 2: Click Process Flow
After applying, the user submits for Request Input or Approval for this Quotation