Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Use Case: Auto-Flag Agreements for Approval

Business Context

In many organizations, agreement approvals rely on manual review to determine whether an agreement requires approval. This often involves checking agreement details and manually updating the approval status, which can lead to inconsistent enforcement of approval policies and increased operational risk.

To improve consistency and reduce manual effort, the system must automatically determine whether an agreement requires approval based on predefined business rules and update the approval status accordingly.

Overview

This use case describes an automated approach to identifying agreements that require approval. The system evaluates predefined approval entry criteria and automatically flags qualifying agreements by updating their approval status. Once flagged, the agreement is ready to proceed through the configured approval process without any manual intervention.

Scenario

A sales administrator needs to ensure that agreements with a term greater than 24 months are reviewed before they become effective. Instead of manually reviewing agreement terms and setting the approval status, the administrator relies on the system to evaluate agreements when they are created or updated. Agreements that meet the defined criteria are automatically flagged for approval.

Namespace Consideration

The Agreement object and the Approval Required Check API belong to a managed package.

  • In managed package orgs, you must append the appropriate namespace before the object, field, and class names (for example, Apttus__).
  • In developer orgs, a namespace is not present, and the same implementation works without a namespace.

After applying or removing the namespace as required, verify the implementation by creating or updating an agreement that meets the approval entry criteria and confirm that the approval status is updated correctly.

Note: In the examples below, replace <namespace> with the namespace configured in your org. If your org does not use a namespace, remove <namespace> from the examples.
  1. Define Approval Entry Criteria: Create approval entry criteria that determine when an agreement requires approval.
    Navigate to Conga Approvals Setup → Search Filter (Approvals) → New, and enter or select the following sample data:
    • Business Object: Agreement
    • Filter Type: Entry Criteria
    • Filter Name: Agreement_LongTerm
    • Sequence: 1
    • Filter Criteria:
      FieldOperatorValue
      Term (Months)greater than24
  2. Create Sample Agreement Data: Create an agreement record that meets the entry criteria to validate the configuration.
    Sample Agreement:
    • Agreement Record Type: MSA
    • Agreement Name: MSA-ACME-2025
    • Account: Acme Hardware Ltd.
    • Agreement Start Date: 01-Jan-2023
    • Agreement End Date: 31-Dec-2025 (difference = 36 months)
    • Total Agreement Value: 250000
    • Term (Months): 12

    • Approval Status: None
  3. Decide When to Run the Approval Required Check:
    Run the Approval Required check at key points in the agreement lifecycle:
    • When an agreement is created
    • When an agreement is updated (for example, term or type changes)
    • When an agreement is submitted for approval
    This determines where the Approval Required Check is invoked.
  4. Automatically Run the Check Using a Trigger: Use a trigger to invoke the Approval Required Check when an agreement is created or updated.
    trigger Agmt_Check_Required on Apttus__APTS_Agreement__c (after insert, after update) {
        
        Apttus_Approval.ApprovalRequiredCheck approvalCheck = new Apttus_Approval.ApprovalRequiredCheck();
        
        for (Apttus__APTS_Agreement__c agr : Trigger.new) {
            
            if (Trigger.isInsert || (Trigger.isUpdate && agr.Apttus__Term_Months__c != Trigger.oldMap.get(agr.Id).Apttus__Term_Months__c)) {        
                
                Boolean isApprovalRequired = approvalCheck.doCheck(agr.Id);
                System.debug('Is approval required: ' + isApprovalRequired);
                
            } 
        }
    }
    

    What happens

    • The agreement is saved
    • The system evaluates the approval entry criteria
    • The approval status is updated automatically if required
  5. Configure the Approval Process: Create an approval process that acts on agreements flagged as requiring approval.

    Configuration

    • Business Object: Agreement
    • Entry Criteria: Approval Status = Approval Required
    • Define approvers and approval steps based on business requirements
When an MSA agreement with a term greater than 24 months is created or updated:
  • The system automatically evaluates the approval criteria
  • The approval status is set to Approval Required without manual updates
  • The approval process is triggered automatically
  • The agreement is routed to the appropriate approvers