How to Set Up Salesforce Flow for Service Unit
5 min
Talk to any Salesforce admin in the world and ask them to list their favorite Salesforce tools. With no surprises, one tool that will be on the top of the list for most of them will be the Salesforce Flow for sure.
And why not. Salesforce Flow helps build complex business automation with just a few clicks instead of code. That is, without the help of a Salesforce developer, Salesforce admins can easily handle most of the complex business requirements. Salesforce Flows help in guiding selling, giving a roadmap to service agents, call scripting, providing action and recommendations for agents, web-to-Lead or case enhancements, performing multiple updates from a single screen, reducing training, and many more.
- Salesforce Flow for Service can:
- Guide workers with a step-by-step list.
- Create different default lists of actions for various channels.
- Define a subset of actions when needed.
- View history of guided actions, their stage, date and user.
- Mark actions as mandatory for agents.
- Use process automation settings to pause flows.
- Display top recommendations for the record from Einstein Next Best Action.
To achieve these benefits, Salesforce provides different types of flows, each with its own purpose and unique functionality in Flow builder that companies can leverage. These different types of Salesforce Flows include: Screen Flow, Autolaunched Flows, Recommendation Strategy, User Provisioning Flow, Field Service Mobile and Embedded Flow. In addition, Contact Request Flow, Checkout Flow, Orchestrator and Loyalty Management Flow.
There are other types of flows that are not included in Flow builders. For more detail visit Flow Types (salesforce.com).
How to Set Up Salesforce Flow for Service Unit
Different types of flows require different steps to set up. It would be challenging to cover all the steps so we will cover setups for the following in this article.
- How to Set Up Salesforce Flow for Service Unit
- Step 1. Create a flow variable
- Step 2. Add screens to flow
- Step 3. Add logic to the flow
- Step 4. Add actions to the flow
- Step 5. Set up Quick Actions
- Step 6. Create Recommendations and Action Strategies
- Step 7. Build RecordActions
- Step 8. Configuration of the components
Step 1. Create a Flow Variable
Salesforce allows various types of data that a variable can store, which include text, record, number, currency, boolean data, date/time, picklist, multiple picklists, and apex-defined. It's also possible to store multiple values in one variable and this value can be either passed inside the flow or something coming from outside the flow.
- From Setup, enter “Flows” in the Quick Find box.
- Click Flows and then New Flows.
- Select Screen Flow and click Create.
- Click Manager from the toolbox.
- Click New Resource.
- From Resource Type, select Variable.
- In the API Name enter api name. In Description add a description for the variable. (This is optional).
- Select the appropriate Data Type that you want.
- Allow multiple values can be selected if you want to store multiple values ( a collection).
- If you select a Record as the datatype of a variable, select the Object whose record values you plan to store.
- As per the requirement Availability Outside the Flow can be selected as per the requirement.
Step 2. Add screens to flow
When configuring user experience in Lightning App builder, in the same way, the screen can be for the flow users. Each screen consists of many screen components. Screen components are configurable and reusable elements that are added to a screen as per the requirements. Steps to create a screen:
- From Setup enter “Flows” in the Quick Find box.
- Click Flows and then New Flows.
- Select Screen Flow and click Create.
- From the canvas, click +
- Click Screen, and the New Screen window will open.
- On Screen Properties (on the right side of the screen), enter Label (e.g., Info) and API Name, and then press Done.
- Now canvas will have Start, Info (a label that you added), and End.
- Now various variables can be added on the screen (using the steps mentioned above in Create a Flow Variable)
Let's take an example for further steps: Let's say we want to get information about the customer like its name. So,
- On the canvas, double-click on the Info screen. The Edit Screen window opens.
- In the Components panel, enter Name in the search box.
- Drag Name onto the screen canvas.
- In the property pane, fill API Name and click Advanced. Make sure Manually assign variables is selected.
- Click Done and then click Save.
Similarly, other components like picklist, toggle input, etc can be added to the screen. - Run the flow: Above the canvas, click Run. Enter values and then click Finish.
Step 3. Add logic to the flow
In Flow, we evaluate the rules of a business process by using Decision elements. Each Decision element checks two conditions. It checks whether the condition is fulfilled or not. That is either it will be yes or no. If yes, then what should be done, and if it's no, then what should be done can be defined after that.
To understand this better, let's assume that we want to decide whether the user opted to update the existing record or not. If yes, then get the record that needs to be updated and if no then create a new record. The user's answer is taken from the toggle component from the screen where they select whether they want to update the record or create a record.
How to add New Decision element in flow
- Drag a Decision element onto the canvas.
- Label it as “Update If Exiting?”.
- For the first outcome, label it as “Yes” and API Name as “Update_Yes”.
- Let the value of When to Execute Outcome as it is
- Configure one condition for the outcome with the values as:
Resource as {!update_toggle.value}
Operator as Equals
Value as {!$GlobalConstant.True}
Note: The {!update_toggle.value} represents the value from the Toggle component in the Info Screen. - Under Outcome Order, click Default Outcome. Label it as No.
- Click Done.
Now we can connect the action to be performed when it's a yes and no outcome of the decision element.
Step 4. Add actions to the flow
Various actions can be performed using Flows like updating data, sending email, sending information to an external system, posting to chatter, submitting for approval, activating or deactivating a Permission set, and many more.
It's difficult to tell the steps for each one of them here. Let me tell you the steps to get a record for an account where the name is like the Name variable we created in “To create a variable” on the screen Info.
How to create a new Screen
- From Setup enter “Flows” in the Quick Find box.
- Click Flows and then New Flows.
- Select Screen Flow and click Create.
- From the canvas, click +. In the Data section select Get Record.
- Label and give a description. In this case, we label it as GetRecord_account.
- In Object fill the name of the object from which we want to fetch the record. Here we need to fetch records from an account so we set the object as Account.
- In the Filter Account Records section, we specify:
Field as FirstName
Operator as Equal
Value as {!account.FirstName} - How Many Records to Store can be used if only the first record is required or all records are required.
- Click Done.
Step 5. Set up Quick Actions
Quick Actions are things you want to do immediately from your mobile device. You can add actions to two sections on a page layout: Quick Actions in the Salesforce Classic Publisher and Salesforce Mobile and Lightning Experience Actions.
How to create Global Quick Action
- From Setup enter “Global Actions” in the Quick Find box.
- Select Global Actions and click New Action.
- Leave the Action Type as Create a Record. In the Target Object field, choose Waypoint.
- In the Label field, enter Waypoint.
- Click Save.
- In the next Action Layout screen, leave Waypoint Name as the only field in the layout.
- Click Save.
Steps to create Quick Action specific to one object:
For example adding quick action to an account object.
- From Setup in the Object Manager tab, search for the Account object.
- Select Button, Links, and Action. Click New Action.
- The rest of the decision element missteps are the same as “Steps to create Global Quick Action”.
To display quick actions in the Actions and Recommendations component, they need to be made available on the record page layout or to the Publisher.
Steps to include Quick Action on page layout:
Let's assume we need to acc Quick action for the Case page layout.
- From Setup go to the Object Manager tab.
- Select Case. Open Case Page Layouts. Edit the Case Layout.
- At the top of the Case Layout section, select Mobile and Lightning Actions.
- Under Salesforce Mobile and Lightning Experience Actions, it's easy to add quick actions by dragging them from the top section and then adding them to the page layout.
- Click Save
Step 6. Create Recommendations and Action Strategies
- From the App Launcher, look for Recommendations and select it.
- Click New. Enter the name, description, acceptance label, and rejection label.
- Upload an image, in case you want the image to be displayed along with a recommendation. (This is optional.)
- Select which flow should be launched when the recommended is accepted.
- Click Save.
For creating strategies, Strategy Builder can be used.
Step 7. Build RecordActions
- From Setup enter “Actions & Recommendations” in the Quick Find box.
- Select Actions & Recommendations and click New Deployment.
- Click Next.
- Label it and select Guidance To Show as per your requirement.
- Click Next.
- Up to 10 objects can be selected to use as context for object-specific quick actions and Next Best Action strategies.
- Click Next.
- Default action can be selected for each channel like Chat and Phone.
- Actions from All Actions can be dragged to the preview area. These can be pinned or unpinned as per requirement.
- Mark Mandatory can be used for those required actions. So those actions will be a must for the agents to complete.
- Unmark Removable for those actions that you don't want agents to remove. By default all actions are removable.
- Auto-Launch checkbox helps to set the first flow in the list as first when the page opens.
- Click Next.
- In the screen Select actions to add, users can select the actions that they want to start from components at run time.
- Click Next.
- In the General Setting tab, set up how recommendations display and select a default strategy. Max of 4 recommendations can be shown.
- In the Strategy Settings tab, select object-specific strategies that override the default strategy on those record pages.
- Click Save. Click Close.
Step 8. Configure the components
- From the App Launcher, find and select a supported object. Let's say Cases.
- Open a Case record page. Click Settings.
- Select Edit Page.
- Drag the Actions & Recommendations components to a page location.
- Select deployment in component Properties. This is required so that agents don't see an empty list when they click Add.
- Click Save.
- Click Activation.
- Set your customized page as the app default for Service Console.
- Click Close.
- Click Back.
- The above steps can be repeated to display the components on another record page.
- Choose the Service Console from the App Launcher.
- From the App Launcher, find and select a supported object, for example, Cases.
- Open a Case record page.
- Click Settings and select Edit Page to launch the Lightning App Builder.
- Drag the Actions & Recommendations component to a page location. In Service Console, we recommend the left sidebar.