Step Creation Conditions in a Definition's step allow you to conditionally determine whether or not a step is created. A step is only created if the designated Step Creation Conditions are fulfilled.

Conga Orchestrate now features cross object functionality within Step Creation Conditions. This allows you to reference objects that are related to the Definition's master object and their corresponding fields. In the Creation Condition user interface, you can reference both child and parent objects and leverage master-detail relationships, as well as look-up relationships.

Referencing a Related Object In a Step Creation Condition

For example, if the Definition's master object is Opportunity, Step Creation Conditions allow you to reference the Opportunity's Primary Contact (a custom Contact lookup field) as a related object.

Once the related object is selected in the Creation Condition user interface, you can choose any of the corresponding fields of that related object as criteria for the Step Creation Condition.

When the field from the related object is selected, it is referenced within the Creation Condition's statement. Using the Operator and Field Values fields, the cross object field reference is now available to conditionally determine whether or not the step is created.

An example of drilling down to child data in Step Creation Conditions is referencing an Opportunity's related Opportunity Products. When drilling down, the Creation Condition user interface provides Drill Down Operators to allow for advanced filtering of child records.

Drill Down Operators help define or narrow down the amount child records related to a parent record that is included within a Step Creation Condition.

Create a Trigger to Drill Down to Child Data and Use the Reevaluate When Field

Using the Reevaluate When field to reevaluate upon a process object change, in conjunction with drilling down to child data in a Step Creation Condition, requires the use of a custom trigger. The trigger below only pertains to Step Creation Conditions that use both the Reevaluate When field with a process object change and drill down to child data.

Without a custom trigger, users need to manually edit the process object to kick off the Reevaluate When field and allow Conga Orchestrate to evaluate the drilled down child object criteria. The custom trigger allows Conga Orchestrate to reevaluate drilled down child object criteria without the user making manual edits on the parent process object. More specifically, the custom trigger forces an update on the parent process object to prompt the Step Creation Condition.

Follow the steps below to implement the custom trigger.

  1. Navigate to Salesforce Setup.
  2. Under the Objects and Fields section, click Object Manager.
  3. Choose the child object of the parent process object. For example, if the process object is Opportunity and the drilled down criteria is on the Opportunity Product, select Opportunity Product in the Object Manager.
  4. Click Triggers.
  5. Create New to create a new trigger.
  6. Delete the pre-existing code.
  7. Copy and paste the code below into the new trigger and replace the text in the squared brackets with the child and parent objects, then click Save.[NameOfTrigger (can be named anything)] > [ChildObject_API_Name](after insert, after update, before delete){ Set<Id parentObjectIds = new Set<Id (); [ChildObject_API_Name] childObjects = Trigger.isDelete ? Trigger.old : Trigger.new; [ChildObject_API_Name] childObject : childObjects){ [ParentObject_Lookup_Field]); } FSTR.ForceReevaluateSrvc.forceReevaluatePreFuture(parentObjectIds); }


Below is an example trigger for a Step Creation Condition that drills down to the Opportunity Product and uses the Reevaluate When field with the process object (Opportunity).


trigger OpportunityLineItemTrigger on OpportunityLineItem (after insert, after update, before delete) { Set<Id> parentObjectsIds = new Set<Id>(); List<OpportunityLineItem> childObjects = Trigger.isDelete ? Trigger.old : Trigger.new; for(OpportunityLineItem childObject : childObjects){ parentObjectIds.add(childObject.OpportunityId); } FSTR.ForceReevaluateSrvc.forceReevaluatePreFuture(parentObjectIds);}
CODE

Below is an example trigger for a Step Creation Condition that drills down to the CPQ Quote Product and uses the Reevaluate When field with the process object (CPQ Quote)

trigger QutoeLineTrigger on SBQQ__QuoteLine__c (after insert, after update, before delete) {Set<Id> parentObjectIds = new Set<Id>();List<SBQQ__QuoteLine__c> childObjects = Trigger.isDelete ? Trigger.old : Trigger.new;for(SBQQ__QuoteLine__c childObject : childObjects) {parentObjectIds.add(childObject.SBQQ__Quote__c); }FSTR.ForceReevaluateSrvc.forceReevaluatePreFuture(parentObjectIds);}
CODE


Using the Custom Criteria Filter for Multiple Step Creation Conditions

If you have more than one step creation condition, use the Custom Criteria Filter to determine how the Step Creation Conditions are evaluated together. Use the And/Or links to automatically insert the corresponding logic in the Custom Criteria Filter, or manually type your filters in the Custom Criteria Filter text box.

Use the Reevaluate When to define scenarios that require Step Creation Conditions to be reevaluated. Check the Deletable checkbox option in the Step's Advanced Settings section to delete a created Step automatically when Creation Conditions no longer match.

The Advanced Settings section is only present on the Create Record Step Type.

For example, you can automatically reevaluate defined Step Creation Conditions when a Contract's primary document File has a new content version uploaded by choosing Event and File Version Change as the field values for the Reevaluate When field.