You can automate the progression of matter stages based on case criteria using the Process Builder. In this walkthrough we will build a process that automatically changes a matter's stage to Trial.
This process must be set up for each matter plan you wish to automate. It is not a global process, and relies on the unique IDs of matter stages.
How to Automate Matter Stage Progression
1. Create Process
- Navigate to Setup > Process Builder.
- Select New.
- Complete the following fields:
- Process Name: Change Matter Stage to Trial
- API Name: Change_Matter_Stage_to_Trial
- Description: Changes Matter Stage to Trial
- This process starts when: A record Changes
- Save. You are taken to the Process Builder UI.
2. Add Object
- Select + Add Object.
- Complete the following fields:
- Object: Matter
- Start the process: when a record is created or edited.
- Save.
3. Add Criteria
- Select + Add Criteria.
- Complete the following fields:
- Criteria Name: Matter Status Field Update
- Criteria for Executing Actions: Conditions are met
- Field: Matter Status
- Operator: Equals
- Type: Picklist
- Value: Deferred
- Save.
4. Add Action
The following action sets the matter record's status to Deferred and updates the stage using its unique ID. Stage IDs can be found in the URL of a Matter Stage record.
/litify_pm__Matter_Stage__c/a0U6g000000MoJ1EAK/view
- Select + Add Action.
- Complete the following fields:
- Action Type: Apex
- Action Name: Set Stage to Trial
- Apex Class: Change Matter Stage
- Select + Add Row.
- Complete the following fields:
- Field 1: matterIds
- Type 1: Formula
- Value 1: [litify_pm__Matter__c].Id
- Field 2: stageTemplateIds
- Type 2: ID
- Value 2: a0U6g000000MoJ1EAK
- Save.
The string for Value 2 depends upon the unique ID of a Matter Plan's Stage.