The Power of Selection Rules

With the concept of Selection Rules, you can configure the logic and desired results of automated processes in a Salesforce environment using nothing but data that can be created and edited through the front end (without needing access to Setup).

Salesforce CPQ is a cloud that utilizes the concept of Selection Rules to automatically determine how and when a specific product should be included in a quote.

In 2020, the concept of Selection Rules also emerged in Salesforce Field Service. With Work Plan Selection Rules , you can determine the criteria a Work Order must meet, using lookups instead of child records and picklists, to automatically generate a specific Work Plan.

If you have some proficiency in filtering in Get Records elements, you could quite easily build a flow that utilizes Work Plan Selection Rules to create Work Plans under the appropriate conditions. Not that it is necessary since Salesforce has already provided this functionality, but understanding this concept allows you to build your own Selection Rules functionality for a custom app.

This is how I started developing an Item Selection Rule functionality for FieldBuddy, an app built on the Salesforce platform for which I perform many implementations.

FieldBuddy's internal service employees can save time if they no longer have to manually associate Parts, Activities, Checklists, and Expenses such as call-out cost with each job.

For example, if a specific filter always needs to be replaced during an annual maintenance of an air handling system, the Service Manager could create an Item Selection Rule defining the following:

  • The Item: Filter Type A2 600*250mm, a lookup to the record of that item
  • The Work Order Type the Work Order should have
  • The type of Installation (Product) on which maintenance is being performed

The flow that actually performs the association works roughly as follows:

  • When a Work Order is created, a Flow for Actions and Related Records (an after-save flow) is triggered.
  • In this flow, all Item Selection Rules are searched where:
    • The Work Order Type of the current Work Order is selected
    • The type of Installation for which the Selection Rule applies is equal to the type of Installation for which the Work Order is being created or is left blank
    • At least one of these criteria matches the Item Selection Rule
  • In a loop, each Selection Rule is used to create a Work Order Line Item

Of course, this is not everything I have incorporated into the functionality, but it serves as the basis with which I started and provides a good example to explain how the concept of Selection Rules can be used in a simplified form.

If you decide to develop a similar functionality, make sure to create a good and clear manual for the end-users who will manage the Selection Rules. Making good use of Help texts on you Selection Rule object's custom fields, will also be a good way to provide guidance. The value of the system depends on how well those handling the data understand how it works.