Work Plans

Let's talk about Work Plans. It's a highly valuable feature of Salesforce Field Service that has been around for a few years but still lacks trailhead modules.

In Field Service Mobile, a Work Plan functions as a checklist or a step-by-step guide that a technician can follow. This alone is a very valuable feature, but there's an added bonus: you can also execute an Action or Flow on each Work Step (an item on the checklist) when the user marks a specific Work Step as completed.

Work Plan Selection Rules provide an interesting and highly flexible way to automatically link Work Plans to Work Orders.

Let's go over the entire data model step by step.

Work Plan Templates

A Work Plan and its associated Work Steps can be seen as a fillable instance of the checklist. Therefore, a Work Plan Template logically serves as the template itself. The Work Plan Template is a relatively simple object. You give your template a name, which also becomes the name of each Work Plan created based on this template. Additionally, you can assign a Relative Execution Order. This determines the order in which the Work Plans should be executed by the user in relation to each other.

For example, you can assign a Relative Execution Order of 100 to a safety checklist and 900 to a cleanup checklist. Checklists for the actual task can have numbers in between. This indicates that the safety checklist should come first, and the cleanup checklist should be the last.

Work Step Templates

Pay attention here. The relationship between Work Step Templates and Work Plan Templates is different from the relationship between Work Steps and Work Plans.

The same Work Step Templates can be linked to multiple Work Plan Templates. This means you don't have to create duplicate steps in multiple plans; you can reuse them.

A Work Step Template represents a step in a specific process or a particular checkpoint.

Unlike checklists in FieldBuddy, you don't capture a value in the Work Step; you can only mark the step as completed.

In a FieldBuddy checklist, the expected answer for an inspection point on a checklist can be in the form of text, a number, a date (with or without time), or a (multi select) picklist.

A Work Step is not designed to receive any information other than whether the step has been completed or not.

Fortunately, there's the Action Definition. On a Work Step Template, you can choose a Quick Action or a Field Service Mobile Flow to be executed when the Work Step is completed. You can use these options to gather information from the user and store it wherever needed.

Salesforce's documentation explains that a regular screen flow can also be used as an Action Definition, but it cannot be used in Field Service Mobile.

Work Plan Template Entries

As mentioned earlier, the relationship between Work Step Templates (WST) and Work Plan Templates (WPT) is a many-to-many relationship. A WPT can have multiple WSTs linked to it, and a WST can be linked to multiple WPTs.

Such a many-to-many relationship is always created using what we call a junction object, which is the Work Plan Template Entry. This object has a relationship with both a WPT and a WST and determines the order in which the different steps appear in that checklist. Tip: use increments of 10 for the order. This allows you to insert extra steps later without having to change the execution order of all subsequent steps.

Work Plan Selection Rules

Work Plan Selection Rules let you specify the criteria a Work Order or Work Order Line Item should meet to automatically link a Work Plan to it based on this Work Plan Template.

Properties that can be filtered include:

  • A specific Account
  • A specific Location
  • A specific Asset
  • The Asset is a specific Product
  • A specific Service Territory
  • A specific Work Type

It also works with combinations.

For example, a Work Plan Selection Rule can determine that the Work Plan should be linked to every new Work Order for the installation of a specific type of elevator.

Work Plans

A Work Plan represents a group of Work Steps that need to be completed for a specific Work Order.

Work Steps

Work Steps are specific tasks that need to be completed for a particular Work Order. They are always grouped together in a Work Plan.

User Interface

Field Service Mobile provides a beautiful and intuitive user interface for Work Plans. Although users completing these checklists will generally work with the mobile app, the same UI is also available as a Lightning Component, allowing you to include it on a Lightning Page in the desktop app.

Work Plan Component in Deskrop app

Conclusion

Not only are Work Plans highly useful and user-friendly thanks to the beautiful components in both Field Service Mobile and the desktop app, they also serve as an excellent example of smart choices in data modeling. I have already used the concept of Selection Rules for various other applications.