Objective:
After reading this article, you will have seen an example of how to automatically create forms for technicians to complete, based on the type of work they will be doing.
Before you get started:
These articles might be helpful before you read this one:
Youreka was built to support the work of field service technicians. And we definitely know that field techs can have extreme variety when it comes to the types of forms they are to complete while on the job.
In this tutorial, we show you how you can configure Salesforce to dynamically generate the right kinds of forms for the right kinds of work, all through automation. Watch the video below and/or read the article below to learn how it's done.
Before we get started, let's begin with some requirements that we need to be sure we meet when all is said and done.
- Field Service Technicians need to be able to complete complex checklists from the field while doing a job
- Field Service Technicians will be using Field Service Lightning's mobile application, as well as the Youreka Mobile application
- There are potentially several checklists that need to be completed per Work Order
- Different types of work dictate different types of checklists, so the system will need to be smart enough to know which types of forms to create for each job
We will be utilizing the following features in Salesforce/Youreka to get the job done.
- We will configure Youreka to be able to work with our Work Order object
- We will be configuring the Work Order object
- We will set up Youreka's Mobile Cards feature for Work Orders
- We will build several Form Templates to serve as our checklists/forms
- We will create a new custom object called Work Type Form Templates
- We will create 1 Process Builder and 1 Flow
- We will configure Field Service Mobile's App Extensions in order to build a deeplink between FSL Mobile and Youreka
Step 1: Configure Youreka to be able to work with the Work Order object
Before we begin, we need to make sure that Youreka can work with our Work Orders. To do this, ensure that there is a lookup relationship that exists from the Form object to the Work Order object. If one does not exist, create it.
Setup -> Object Manager -> Form -> Fields & Relationships -> New
Step 2: Add the Forms related list to the Work Order page layout
Add the Forms related list to the Work Order page layout. In the photo below, we're also adding the Youreka Discoveries related list to the Work Order page layout. It's a best practice, but it's not necessarily a part of this tutorial.
Step 3: Configure Youreka's Mobile Cards for Work Orders
In this step, we're going to be configuring Youreka's Mobile Cards. Consider checking out the full article which discusses how Mobile Cards work.
- Visit Setup -> Object Manager -> Work Orders -> Field Sets -> New
- Name the field set Work Order Mobile Cards
- Just for this tutorial, add the Work Order Number and the Subject to the Field Set and click Save.
- Visit the Mobile Admin tab by typing Mobile Admin in the App Launcher, or by clicking on it in the Youreka Lightning App.
- Enable Mobile Cards, select Work Order as the primary object, choose the Work Order Mobile Cards field set you just created, and select any field for the Form Sort Order.
- Click Save at the bottom of the screen.
For now, we will skip the rest of the settings in the Mobile Admin menu. However, please consider reviewing our documentation for each of the settings listed in these menus, as each can have a significant effect on how the Youreka Mobile App behaves for your end users.
Step 4: Build Some Form Templates
If you're reading this tutorial, we're making the assumption that you have already had experience creating Form Templates in the Form Template Builder. If you have not, please visit these articles and return back to this step:
If you do have experience creating Form Templates, visit the template builder in Salesforce and create two Form Template records. For each, ensure that you are utilizing Field Links to the Work Order object (and for this tutorial, the Work Order object alone).
If you're looking to speed things up and simply learn without having to build your own form templates, feel free to import some of ours:
Step 5: Create Work Type Form Templates
This step is critical for us to meet the fourth requirement in this tutorial, which involves ensuring that we can create different types of checklists for each work order, based on the work type. This is one way of accomplishing that. However, it is important to know there are several other potential solutions for accomplishing this particular goal.
- Visit Object Manager -> New Custom Object
- Name the object Work Type Form Template
- Ensure the object is set to AutoNumber for it's record name and label settings
- For this tutorial, you can leave the rest of the settings as they are
- Add two lookup fields to the object; one lookup to Form Template, and one lookup to Work Type
- Add the Work Type Form Templates related list to the Work Type page layout
- Select a Work Type record in Salesforce which you intend to test all of this functionality with. On that Work Type record, add two Work Type Form Template records (from the related list). When you create each of these records, populate the lookups to each of the Form Templates you created in Step 4 (see image above).
What we've just done here is essentially created some settings for this Work Type. Consider this - if an administrator is told by the field service organization that for each Work Type that the field service team has, there are certain forms that should be completed - the admin can now easily configure that right on each Work Type.
Step 6: Create a Flow That Automatically Creates Form Records Whenever a Work Order is Dispatched
This next step is going to ensure that every time a Work Order is dispatched, the system will generate form records and append them to the Work Order (and the automation will use the settings in step 5 to know which types of forms to create!). As a result of this automation, every work order that gets dispatched will have a series of checklists associated with it that the technician can complete. Before we proceed, we'll make two comments:
- Every field service organization is different, so your final process could look very different, based on if you're using parent/child work orders, complex work, service crews, and more. The design might also need to consider how often technicians have access to the internet for their devices to sync. For now, continue with the tutorial, but just know that each implementation will definitely require its own unique design.
- This step could just as easily be done using apex (and perhaps that makes the most sense for your organization). But for now, we'll do this tutorial with declarative automation.
We built a flow to automatically create Form records in Salesforce. In this tutorial, we're going to launch this flow from a Process Builder (which will be created in the next step). In the above flow, we are doing the following:
- We are retrieving the Work Type Form Templates records, using the Work Type ID on the Work Order
- We're counting those Form Templates to ensure that there are some. If there aren't, the flow ends at the decision point (and avoids an error that would result if we tried to create 0 forms).
- We're looping through those Work Type Form Templates and manipulating the variables to create a new SObject Collection Variable of Forms which we intend to create.
- Once we've added our new Form records to the SObject Collection Variable and the loop completes, we tell the flow to create those records in the database.
- Save and Activate your flow
One component that we didn't add to this flow which should almost definitely be there in a true implementation would be related to form assignment. Form records should be assigned to the individual who will ultimately fill them out. So consider adding a series of steps in the flow which look to the Service Resource on the Service Appointment, retrieves that user's ID, and ultimately uses that Owner ID when creating the Form records.
Step 7: Create a Process Builder to Fire Your Flow
- Visit Setup -> Process Builder. Create a new process (or clone an existing process) for the Work Order.
- Set your criteria for when we want the flow to fire. In our demo org, the flow fires when the Work Order is created. But perhaps for your organization, the flow should fire and the forms should be created when a related Service Appointment is dispatched, or when a Work Order status reaches a certain value.
- Set your action to be a Flow, and feed in the variables which are configured for input. In ours, we're using the Work Order ID.
- Activate your Process Builder
Step 8: Test The Automation
Before proceeding, you should confirm that the automation is working properly. Create a new Work Order, with the Work Type you configured in Step 5. Adjust the record in a way that should trigger your automation (based on the process builder criteria you configured in Step 7). Did the automation fire? Did the system create a set of forms for you? If so, you're ready to move on to the next step. If not, double check your automation, double check your test data, double check for flow errors if they occurred.
Step 9: Configure Your Deeplink
This final step allows us to make it so that field technicians can quickly access these forms while in the field. It involves creating a deeplink from FSL Mobile to the Youreka Mobile App.
- Visit Setup -> Field Service Mobile Settings -> App Extensions -> New
- Give your app extension a name, and a label.
- Input a launch value. To get you started, try using ours below:
https://yourekaapp.app.link/LseujdfKMK?recordId={!$Id}
- Save your App Extension
- Log out of Field Service Mobile and Youreka Mobile, and then log back in to both.
The app extension above is fine for this tutorial, but to truly learn how deeplinking works, visit our deeplinking article.
Step 10: Test the Mobile Functionality
We're almost done! All we need to do now is test and make sure that the deeplink is working properly.
- Log in to Field Service Mobile, using the username and password of the proper technician you intend to test with.
- Visit the Work Order/Service Appointment record that you tested with in step 8. It should have some forms associated with it.
- Open the Lightning menu, and tap on your recently created App Extension. You should be taken into Youreka Mobile, brought to the same Work Order record, and you should see a set of checklists that have been created for this Work Order. As a technician, you can tap on any of these forms, and begin filling them out.
Some common issues you might face in this stage:
- If you don't see the forms in Youreka Mobile, ensure that the Work Order has forms in the Forms related list. If there are forms in the Forms related list, ensure the form owner is the same as the technician you are currently signed in as.
- If the deeplink doesn't work, revisit the app extension and ensure you don't have any typos.
- If the deeplink is taking you to a mobile browser, and prompting you to redirect to the Youreka Mobile App, continue to click through these screens. After enough times of using the App Extension, your mobile device should begin to automatically take you straight to Youreka Mobile.
Conclusion
We've officially set up Salesforce to automatically create Form records, using Salesforce automation. These form records are associated with the Work Order, and are different based on the different Work Types that an organization has.
After all of the testing and deployment, this configuration should ensure that each technician has the right checklists at each job they do.
Comments
0 comments
Please sign in to leave a comment.