Approval Required Check for Agreement
Approval Required check is performed to determine whether a custom object, Conga object, standard Salesforce object or its line item requires an approval and if an approval process needs to be executed. Approval Required check sets the approval status of the header or child object to Approval Required. Approval Required check does not evaluate the approval process, but rather performs a simple check outside of the approval process definition. Approval Required Check sets the approval status of the header or child objects items to Approval Required to make it easy to check whether approval is needed. The purpose of the Approval Required check is to reduce the overhead of performing detailed process evaluation to determine if approval is needed. While defining the Entry criteria of the Approval Process in conjunction with Approval Required check, you should use the Approval Required approval status as one of the criteria.
For example, Approval Required check is invoked prior to the execution or evaluation of the approval process. Approval criteria or conditions are defined using Search Filters (Approvals) of the Entry Criteria type. Approval Required Check is primarily used with CPQ approvals, but can also be used with approval on other objects, such as Agreement and its related objects.
Steps to Set up Approval Required check
-
Adding Approval Status fields to an object
-
Adding the custom object to the search filter
-
Setting up the Approval Required check trigger
-
Setting up an entry criteria for the Approval Required check
Workflow Rules: An alternative to Approval Required Check
If you do not wish to configure and use Approval Required Check, you can use the Salesforce functionality of Workflow Rules to set the Approval Status of your header or child object records to Approval Required. While defining Workflow rules, you must ensure that every time an update is made to the existing header or child object records, all the eligible entries are set to Approval Required. For details on how to create and configure Workflow Rules to match your business requirements, see Workflow Rules
Salesforce has deprecated Workflow Rules. While Workflow Rules continue to operate, you cannot create new ones or upgrade existing ones. If any of your operations rely on Workflow Rules, follow Salesforce's Migrate to Flow
To create an approval required check trigger
- Use the following two global methods of the ApprovalRequiredCheck class to create your Approval Trigger or Workflow Rule.
- Add the custom object to a search filter criteria by clicking . Add the API name of your custom object to the pick list.
- Create a trigger that sets the Approval Required check for your custom object.
- Navigate to Conga tab and set up your entry criteria in this section.
Creating Search Filters (Approvals)
The two Filter Type options (Child Filter and Entry Criteria) serve two different purposes.
Entry Criteria |
This is required for approvals to be initiated for a custom object. To improve performance, the system will check if there are any Entry Criteria search filters that match the attributes of the custom object and set the approval status to Approval Required. You can have the entry criteria at the line item to set the approval status to Approval Required or Approval Triggered. |
Child Filter |
This is required to have a header-level approval-step entry criteria that makes use of the line item fields for the header custom object. After you create a child filter, you then need to create step-entry criteria using child filters that mirrors the expression used in the child filter. |
Configuring and Creating Search Filters
Search filters of type Entry-Criteria are used to check whether the object requires approval before it can be finalized. If you want approvals to be triggered at the header level, then you need to configure search filters based on the context object. If you want approvals to be triggered at a Line Item level, then you would configure search filters for the Line Item context object. Additionally, if you want consolidated approvals for the whole object configuration, then you would create both. You must follow the procedure listed in the following section to configure and create search filters.
Configuring Search Filters - this adds custom objects to the Search Filter object picklist so you can create search filters that use these objects for their entry criteria.
Creating Search Filters - the Search Filters are used to determine if the products in the object require approval.
To configure Search Filters for Approvals
- Go to Search Filter (Approvals). and select
- From the Custom Fields & Relationships section, select Business Object.
-
From Picklist Values, click New
and enter the API names for the Header object and the line items:
Header Object API name
for Header level approvals andChild Object API name
for Line Item level approvals. - Click Save. The values are added to the Picklist Values list.
- Click Back to Search Filter (Approvals) and from the Custom Fields & Relationships section, select Filter Type.
-
From Picklist Values, click New
and enter
Child Filter
andEntry Criteria
. - Click Save.
To create search filters for approvals
You must create an Approval Process that can be used with the header object.