Approval process configuration
An approval process automates the approval workflow, including submitting the application, assigning reviewers/queues, and more. As per the organization's requirements, you can create different configurations of the approval process types and cadences.
Based on the configuration, the approval instance is generated and assigned to the user/queue for review. Now, Q2 Origination is enhanced to support the creation of approval instances in the following scenarios:
New approval instance creation for every update of the primary object
Prior to the Winter'22 release, the system was updating the same approval instance for every update on the primary object if that update satisfies the approval rule criteria, which is in the submitted state. Due to this, it was difficult to track the intermediate updates.
With the Winter'22 release, instead of updating the existing approval instance, which is in the submitted state, a new approval instance is created for every update on the primary object if that update satisfies the approval rule criteria. The system deactivates the existing active approval instances and their related approval review group and reviewer records.
For a complex approval, the approval authority criteria are evaluated, and the approval review group and reviewer are displayed if they satisfy the approval authority criteria.
For every change of the primary object, if those changes are related to the criteria fields, a change log record is also created in the Change Log table. This helps in better tracking of the primary object-related changes.
As explained in the following image, the system performs the following:
Publishes an approval event that contains the record's old values.
Evaluates the rules against the primary object record ids.
-
Evaluates if the approval rule criteria fields are changed between the previous (sent from the event) and the current snapshot of the record (generated by the rule API).
Note:This is to avoid creating of new approval instance when fields other than the criteria fields are updated for the primary object.
Evaluates if there is any existing active approval instance if the approval rule criteria fields are changed.
-
Deactivates the approval instance and the related approval review groups and reviewer records if an active approval instance exists.
Note:The Active checkbox on the Approval Instance, Approval Review Group, and Reviewer objects is unchecked for the existing approval instance.
-
Creates a new approval instance, approval review groups, and reviewer records if there is no active approval instance exists in the system.
Note:The Active checkbox on the Approval Instance, Approval Review Group, and Reviewer objects is checked for the new approval instance.
New approval instance creation for the primary object record creation
Prior to the Winter'22 release, an approval instance was created only when there was a change in the primary object, and that change satisfies the approval rule criteria. As for new applications, there are no previous values; the approval instance was not created. But now, with the Winter'22 release, an approval instance will be created whenever a new application is created, and the application satisfies the approval rule criteria. To create an approval instance for a new application, the criteria field values are reverted to the previous value if an approval instance is rejected. The system performs the following:
Makes the value of Target_Record_Snapshot__c null, as this field stores the previous version of the updated field in JSON format.
Updates the Previous Value field of the Change log to null and the Current Value field to the field's current value. For example, if an application is created for a loan amount of $10,000, the Current Value field in the Change Log table is updated to $10,000 and the Previous Value field is marked as NULL.
Takes action as per the option specified in the "Action on Rejection for Create" or "Action on Rejection for Update" field.
Marks the Is_for_New_Record checkbox to TRUE if the approval instance is created for a new application.
New approval instance creation for previously approved or rejected values
Prior to the Winter'22 release, once the approval instance was approved or rejected for a particular value, the approval instance was not generated for the same value again. But now, with the Winter'22 release, an approval instance is generated for previously approved or rejected values. If there is a manual update of the primary object and the update satisfies the approval rule criteria, an approval instance is created irrespective of whether the updated values are previously approved or rejected.
If post-rejection, the criteria fields are not reverted, the system does not create a new approval instance when there is a manual update to the primary object. A new field, Have_Criteria_Field_Values_Reverted, is added to the clcommon__Approval_Instance__c object to help the system identify if the criteria fields are reverted when an approval instance is rejected.
On rejection of an approval instance - Prior to the Winter'22 release, an approval instance was not created for the reverted values of rejected approval instance. But now, with the Winter'22 release, based on the user selection of Action on Rejection for Update or Action on Rejection for Create on the Approval Definition page, the system either reverts the criteria fields' values to the previous values or does not perform any action or calls the custom class.
If the Action on Rejection for Update field is selected as Revert to Previous Value, the criteria fields' values are reverted to the previously approved values if there are previously approved approval instances present for the application, as explained in Scenario 1.
If there are no previously approved approval instances,
If the first submitted approval instance is created for a new application, the system reverts the criteria fields' values to the first submitted approval instance's current values, as explained in Scenario 2.
If the first submitted approval instance is created on updating the primary object record, the system reverts the criteria fields' values to the first submitted approval instance's previous value, as explained in Scenario 3.
Example
An approval rule is created on the primary object "Application," and the rule criterion is "Loan amount >= $1,000".
Scenario 1:
A loan application is created with a loan amount of $500.
The loan amount is updated to $1,100. As the application satisfies the rule criterion, a new approval instance is created.
The approval instance is approved by the reviewer.
The loan amount is updated to $1,200. As the application satisfies the rule criterion, a new approval instance is created, and the existing approval instance is deactivated.
The loan amount is updated to $1,300. As the application satisfies the rule criterion, a new approval instance is created, and the existing approval instance is deactivated.
The approval instance is rejected by the reviewer.
With the Winter'22 release, on rejecting the approval instance, the loan amount is reverted to $1,100, which is the previously approved value.
Scenario 2:
A loan application is created with a loan amount of $1,100. As the application satisfies the rule criterion, a new approval instance is created.
The loan amount is updated to $1,200. As the application satisfies the rule criterion, a new approval instance is created, and the existing approval instance is deactivated.
The approval instance is rejected by the reviewer.
Since there are no previously approved instances, the loan amount is reverted to the first submitted approval instance's current value as the first submitted approval instance is created for the new record. In this scenario, the first submitted approval instance's current value is $1,100, so the loan amount is reverted to $1,100.
Scenario 3:
A loan application is created with a loan amount of $500.
The loan amount is updated to $1,100. As the application satisfies the rule criterion, a new approval instance is created.
The loan amount is updated to $1,200. As the application satisfies the rule criterion, a new approval instance is created, and the existing approval instance is deactivated.
The approval instance is rejected by the reviewer.
Since there are no previously approved instances, the loan amount is reverted to the first submitted approval instance's previous value as the first submitted approval instance is created for the update record. In this scenario, the first approval instance's previous value is $500, so the loan amount is reverted to $500.
Configuration
You can configure the following types of Approvals for your organization:
Simple Approval Process Configuration
Perform the following steps to configure a simple approval process:
-
Enable the Approval Configuration and set it to use the Enhanced Approval feature.
Note:To know how to enable the Approval Configuration and set it to use the Enhanced Approval feature, see Create an approval configuration.
-
Create an approval definition.
Note:To know how to create an approval workflow definition, see Create an approval definition
-
Define the entry criteria.
Note:To know how to define the entry criteria, see Define entry criteria.
-
Add the reviewers.
Note:To know how to add the reviewers, see Add reviewers
Complex Approval Process Configuration
Perform the following steps to configure a complex approval process:
-
Enable the Approval Configuration and set it to use the Enhanced Approval feature.
Note:To know how to enable the Approval Configuration and set it to use the Enhanced Approval feature, see Create an approval configuration.
-
Create an approval definition.
Note:To know how to create an approval workflow definition, see Create an approval definition.
-
Define the entry criteria.
Note:To know how to define the entry criteria, see Define entry criteria.
-
Add the reviewers and define the limits.
Note:To know how to add the reviewers and define their limits, see Add reviewers
-
Add the approval authority criteria.
Note:To know how to add the approval authority criteria, see Add Approval Authority Criteria.