Skip to main content
¡La Trailblazer Community ya está en Slack! Obtenga respuestas más rápido, conecte con otros Trailblazers y aprenda de expertos. Únase a la comunidad

Build Your First Data Capture Form

Learning Objectives

After completing this unit, you’ll be able to:

  • Assign Data Capture permissions to mobile workers.
  • Map out a Data Capture flow before building it.
  • Create screen components to capture asset and work order details.

Turn Fieldwork into Data

When your mobile worker heads out into the field, the last thing they need is to juggle various apps and data entry formats. Data Capture streamlines this, giving your workers a single point of entry and a structured process to follow. As an admin, you decide what data workers enter, what Salesforce does with it, and which parts of the form workers see.

Think about a typical equipment installation. A technician arrives onsite to install new equipment. The flow starts by pulling up the right work order, so everyone knows which job is underway. Next, the technician enters details about the equipment just installed, then records the work done, including a photo and a signature. Finally, Salesforce saves all of it automatically: a new asset record for the equipment, and an updated work order showing the job is complete.

That's five flow elements working together, and it's exactly the kind of logic Flow Builder is designed to handle. Before you start building though, you need the right permissions in place.

Use a Custom Playground with Field Service

To complete this badge, you need a custom playground that contains the Scheduling Console and our sample data.

  1. Select Create Playground, and then select Yes, Create Playground.
  2. Your new org is automatically attached to your Trailhead account.
  3. Make note of your org's expiration date and complete this badge before then.
  4. Select Launch to open the playground.

Set Up Permissions for Mobile Workers

Mobile workers are already assigned to a mobile worker permission set. To use Data Capture, mobile workers need an additional permission set with Data Capture permissions.

  1. Select Setup, then select Setup.
  2. In the Quick Find box, enter Users, and then select Permission Sets.
  3. Select New to create a new permission set for Data Capture.
  4. For Name, enter Data Capture Permissions.
  5. Let the API name autopopulate, then select Save.

Now that you have a blank permission set ready, add the required permissions.

Allow Mobile Workers to Run Flows

  1. In the Data Capture Permissions set page, under Apps, select App Permissions. Select Edit.
  2. In the Flow and Flow Orchestration section, select the Run Flows permission.
  3. Save your changes, then select Save in the pop-up window.

Allow Mobile Workers to Use Forms

  1. Navigate back to the Data Capture permission set overview page.
  2. From Apps, select Object Settings, then select Forms.
  3. Select Edit to select the following permissions.
  4. Under Object Permissions, select the checkboxes next to Read and Edit
    • Under Field Permissions, select the following checkboxes:Parent Record Type: Read Access
    • Process Type: Read Access
    • Status: Read Access and Edit Access
  5. Save your changes.
  6. To assign the permission set to your mobile workers, select Manage Assignments from the permission set page.
  7. Select Add Assignment, then select Orgfarm EPIC to assign yourself the permission set.
  8. Select Next, then select Assign.

With permissions in place, your mobile workers are ready to run the flow you're about to build.

Map a Data Capture Flow

With permissions sorted, you can now plan the flow and put the installation scenario to work. A technician arrives onsite to install a new piece of equipment for an existing client. The form retrieves the work order for the job. It collects details about the new asset and records the work done. Then it saves everything back to Salesforce and links the new asset to work order.

That job breaks down into five elements, each one picking up where the last left off.

Data Capture flow with the five flow elements in Flow Builder.

Element

What it does

Get Records

Retrieves the work order's existing details so the form opens with the right context

Asset Info Screen

Prompts the technician to collect required details of the installed asset

Work Order Info Screen

Prompts the technician for a status update, a description of the work completed, a photo, and a signature

Create Records

Creates the new asset record from the details entered on the asset details screen

Update Records

Updates the work order with the entered details and associates it with the newly created asset

Start Your Flow in Flow Builder

Start by building the first three elements: the Get Records element that retrieves the work order, and the two screens that collect the asset and work order details. First, open Flow Builder.

  1. Select Setup, select Setup.
  2. In the Quick Find box, search for and select Flows.
  3. Select New Flow to open Flow Builder.
  4. In the New Automation screen, search for and select Data Capture Flow.

Flow Builder opens to a blank canvas. Add Get Records first so the technician never has to search for the work order. The flow retrieves the job’s details the moment the form loads.

  1. Use the Add element sign to search for and select the Get Records element.
  2. For Label, enter Get Work Order.
  3. In the Object lookup, search for and select Work Order.
  4. For the filter, enter the following values
    • Field: Work Order ID
    • Operator: Equals
    • Value: parentRecordId

Work Order Records Filter with values.

Next, build the screens that mobile workers see in the Field Service mobile app. Start with the Asset Info screen, where the technician enters details about the installed asset.

  1. Select Add element to search for and select the Screen element.
  2. For Label, enter Asset Info.
  3. In the Search Components lookup, search for and select Short Text.
  4. For API Name, enter Asset.
  5. For Label, enter Asset Name.
  6. Select the Short Text component again from the lookup.
  7. For API Name, enter SerialNum.
  8. For Label, enter Asset Serial Number.
  9. Select a Date component from the lookup.
  10. For API Name, enter InstallDate.
  11. For Label, enter Asset Installation Date.
  12. Select Done to save the screen.

Asset Info Screen with name, number, and date components.

The Asset Info screen gives the technician a place to log the installed equipment. The job isn’t finished until the work order reflects what happened onsite. Build a second screen to capture that.

  1. Select Add element to search for and select the Screen element.
  2. For Label, enter Work Order Info.
  3. In the Search Components lookup, search for and select Picklist.
  4. For Label, enter Work Order Status.
  5. In the Choice lookup, select New Choice Resource.
  6. For Resource Type, select Picklist Choice Set.
  7. For API Name, enter WorkOrderStatus.
  8. For Object, select Work Order.
  9. For Data Type, select Picklist.
  10. For Field, select Status.
  11. Select Done to save your changes.
  12. Select the Long Text component from the lookup.
  13. For API Name, enter Description.
  14. For Label, enter Work Order Description.
  15. For Value, select Work Order from Get Work Order, then select Description.
  16. Select an Upload Image component from the lookup.
  17. For API Name, enter Image.
  18. For Label, enter Upload Image of Completed Job.
  19. Select a Signature component from the lookup.
  20. For API Name, enter TechSign.
  21. For Label, enter Mobile Worker Signature.
  22. For Parent Record ID, select parentRecordId, so the signature is saved to the work order record.
  23. Select Done to save the screen.

Wok Order Info Screen with status, description, upload image, and signature components.

  1. Select Save in the Flow Builder Canvas.
  2. For Flow Label, enter Asset Installation Checklist.
  3. Save your changes.

With both screens in place, the flow now has everything it needs from the technician—the particulars of the newly installed asset, and the details of the work completed onsite. In the next unit, you add the last two components to the flow, Create Records and Update Records, to turn these details into Salesforce records.

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios