Control the Order of Active Approval Processes Programmatically

Now you can control the order of your active approval processes by using Metadata API, change sets, and unlocked packages. When you deploy via Metadata API, use the processOrder field on the ApprovalProcess metadata type to control the order. Previously, you controlled the order only from Setup.

Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

Why: When you have more than one approval process that meets the criteria for an object, you can control the order for evaluating the approval processes. With the processOrder field, you can control the order via Metadata API.

How: To control the order of approval processes via Metadata API, activate them and then in a separate operation use the processOrder field. The maximum value you can define for processOrder is 2,000.