Add Data Capture Flows to the Field Service Mobile App

After creating Data Capture flows, define how to show them in the Field Service mobile app by adding a Forms tab to the parent record, or defining the flow as a quick action.

Required Editions

Available in: Lightning Experience in Enterprise, Unlimited, and Developer Editions.
User Permissions Needed
To test Data Capture flows in the mobile app:

Lightning SDK for Field Service Mobile. See Move to Lightning Data Service for Field Service Mobile.

To create and delete Data Capture flows and prime subflows for offline work: Manage Flows
To create quick actions and add them to page layouts: Customize Application

Add Flows to the Forms and Related Tabs in the Field Service Mobile App

Mobile workers can access Data Capture flows from the Work Order Overview page, or from a service appointment, work order line item, timesheet, or service resource.

  1. By default, the page layout for work orders, work order line items, and service appointments contains a Forms section. If you create your own page layout, add a Forms section.
    1. From the object management settings for work orders, work order line items, or service appointments, go to Page Layouts.
    2. Open the page layout where you want the tab to appear.
    3. Click Related Lists, and drag Forms to the Related Lists section.
      Page Layout
  2. Add the flow you created to the Forms section.
    1. From the App Launcher, find and select Field Service.
    2. Select Work Orders or Service Appointments, or find and select Work Order Line Items.
    3. Open the relevant record and select Related.
    4. Click New in the Forms section.
      Page Layout New Form
    5. Enter a name and define the parent record.
    6. For Action Definition, enter the name of the flow you created.
      New Form
    7. Save your changes.
      Note
      Note

      You can automate this procedure by creating a record-triggered flow that automatically associates your form to a parent record when that record is created. See Triggers for Autolaunched Flows.

  3. Test the form in the Field Service mobile app.
    Make sure that the mobile app has the latest version installed.
    1. Open the record where you added the form.
    2. If you added the form to a work order, from the Work Order Overview page select Forms.
    3. If you added the form to a service appointment or work order line item, select Related.
    4. Complete the form.

Add Flows to the Action Launcher in the Field Service Mobile App

Define flows as actions so your mobile workers can quickly open them from the action launcher when viewing service appointments, work orders, work order line items, assets, or custom objects.

To make sure custom objects are available to mobile workers when working offline, add the object to the briefcase.

  1. By default, the page layout for work orders, work order line items, and service appointments contains a Forms section. If you create your own page layout, add a Forms section.
    1. From the object management settings for work order, work order line item, service appointment, asset, or custom object, go to Buttons, Links and Actions.
    2. Click New Action.
    3. For Action Type, select Flow.
    4. Select the flow that you created and enter a name.
    5. Save your changes.
      New Action
  2. Define the action as a quick action.
    1. Select Page Layouts, and open the page layout you want to add the new action to.
    2. Click Mobile & Lightning Actions, and drag the action you created to Salesforce Mobile and Lightning Experience Actions.
      Page Layout Lightning
  3. Test the form in the Field Service mobile app.
    Make sure that the mobile app has the latest version installed.
    1. Open the record where you added the quick action.
    2. Tap the action in the action launcher.
    3. Complete the form.

Launch Data Capture Flows from External Apps with Cleared Fields

Add a parameter to deep links that launch Data Capture forms so that technicians see a blank form each time.

When launching a Data Capture form from an external app via a deep link, you can ensure that the form opens with all fields cleared by including the fsl__restart=true parameter. This parameter is useful when you want technicians to start with a blank form for each session, rather than having previously entered values persist from the prior launch.

Add the fsl__restart=true parameter to the deep link URL that launches your Data Capture form from the external app.

Example deep link with the parameter:

https://{orgURL}/lightning/n/{flowName}?fsl__restart=true&recordId={recordId}

Replace {orgURL} with your Salesforce org URL, {flowName} with the API name of your Data Capture flow, and {recordId} with the ID of the record associated with the form.

When technicians follow the deep link with this parameter, the form opens without values from the previous session.

Add Flows to Work Steps

Define flows to open from a work step when the mobile worker completes the step.

There are two ways to add flows to work steps:

  • Manually add the flow to individual work steps, associate the work step with a work plan, and add the plan to a work order.
  • Create a work plan selection rule, a work plan template, and a work step template that contains the flow. When a work order meets certain conditions, the work plan, work step, and flow, are automatically related to the work order. The rules and templates are reusable.

Prerequisites

Define the security level for work steps.

  1. From Setup, open the Object Manager. Then, find and select Work Step.
  2. From Fields & Relationships, select Process Type.
  3. Click Set Field-Level Security.
  4. Select Visible for the relevant user profiles.
  5. Save your changes.
  6. Click View Field Accessibility.
  7. From the dropdown, select Process Type.
  8. Next to the relevant profile, click Hidden.
  9. Select Visible, and then click Save.
  10. Log out of the mobile app, and then log in again.

Add Flows to Work Steps Manually

  1. In Field Service, select Work Orders and open the work order where you want the flow to appear.
  2. Create a work plan.
    1. Select the Related tab.
    2. Scroll to Work Plans and click New.
    3. Enter a name.
    4. Save the work plan.
  3. Add a step to the work plan.
    1. Open the work plan.
    2. Select the Related tab.
    3. Scroll to Work Steps and click New.
    4. Select the work plan you created from the Work Plan list.
    5. From the Action Definition list, select the flow you created.
    6. Save the work step.
  4. Test the form in the Field Service mobile app.
    1. Assign the work order to the mobile worker.
    2. Log into the mobile app as the mobile worker and refresh it.
    3. Open the work order and select Work Plans.
    4. Locate the work plan and work step that you created.
    5. From the action menu, select Complete and make sure that the flow opens.

Add Flows to Work Steps By Using Selection Rules and Templates

  1. In Setup, find and select Work Plans.
  2. Select Generate Work Plans and Work Steps from templates and selection rules.
  3. Create a work plan template. Make sure that you select Active.
    Work plan template
  4. Open the template that you created and select Related.
  5. From Work Plan Template Entries, select New. Each entry you create becomes a work step.
  6. Create a new work step template.
    1. From Work Step Template, select New Work Step Template
    2. For Action Definition, select the flow you created.
    3. Select Active.
    4. Save the work step template.
    Work Step Template
  7. Create a work plan selection rule to relate to the work plan template. This rule defines when to use the template. See Create Work Plan Selection Rules.
    1. From the App Launcher, find and select Work Plan Selection Rule.
    2. Click New.
    3. Select the Work Plan template that you created.
    4. Select Active.
    5. Define the conditions to activate the template. For example, to activate the template for a work order containing a specific asset, add the asset to the Asset field.
    6. Save the rule.
    Work Selection Rule
  8. In Field Service, select Work Orders and open the work order where you want the flow to appear.
  9. Click Generate Work Plans. The template is added to the work plans assigned to the work order.
  10. Test the form in the Field Service mobile app.
    1. Assign the work order to the mobile worker.
    2. Log into the mobile app as the mobile worker and refresh it.
    3. Open the work order and select Work Plans.
    4. Locate the work plan and work step that you created.
    5. From the action menu, select Complete and make sure that the flow opens.