You are here:
Create an Appointment Guidance Flow
Create a custom screen flow that guides call center agents through the process of selecting the correct visit type and resources for a patient’s appointment. After a scheduler completes the appointment guidance steps, the flow sets the visit type, field values, and search preferences for the Intelligent Appointment Management console.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions with Health Cloud |
| User Permissions Needed | |
|---|---|
| To open, edit, or create a flow: | Manage Flow |
This documentation outlines how to build individual elements of a screen flow. Following these directions step by step doesn't build a usable flow. Instead, it provides guidance on the elements, variables, screens, and assignments you can use to design your own appointment guidance flow.
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- Click New Flow.
- Select Screen Flow, then click Create.
-
Create variables for input values.
- From the toolbox, click Manager.
- Click New Resource.
- For Resource Type, select Variable.
-
Enter details about one of the required variables in this table.
API Name Data Type Description recordId Text The ID of the account that was passed into the flow.
accountId Text The ID of the patient’s account. userId Text The ID of the user who's running the flow. If a user runs the flow from an account record, the recordId and accountId values are the same. If a user runs the flow from a different record, such as a clinical service request, the values differ. The recordId is the ID of the record the user ran the flow from, and the accountId is the ID of the patient’s account record. - Select Available for input.
- Save your work by clicking Done.
- Repeat these steps for each required variable.
-
Create an Assignment element that sets values for the recordId
and accountId variables you created in the previous step.
- From the flow canvas, add an Assignment element.
- Enter a label, for example Set Record ID and Account ID.
-
Set variable values for the recordId and
accountId variables. After you set the value for recordId,
click Add Assignment and set the value for accountId.
Variable Operator Value recordId Equals Select Account from the Record (Single) Variables section, then select Id. accountId Equals recordId - Save your work by clicking Done.
-
Create a
Get
Records element that retrieves records for
the patient.
- From the flow canvas, add a Get Records element.
- Enter a label, for example Get Patient Record.
- In the Object field select Account.
- In the Filter Account Records Condition Requirements select All Conditions are Met (AND).
- In Field, type Id, then select Id.
- In the Operator field select Equals.
- In the Value field select recordId from the Variable section.
- In How Many Records to Store select Only the first record.
- In How to Store Record Data select Automatically store all fields.
- Save your work by clicking Done.
-
Create a Screen element that asks the call center agent a question.
- In the flow Canvas, add a Screen Element.
- Enter a Label. This label is for the name of the question, not the actual question. API name is automatically populated.
- Create a question by clicking and dragging components to the screen. For example, add a Display Text component to display the question text such as “Is this appointment for an annual visit?”. Add a Picklist component with a “Yes” and “No” choice for the call center agent to input the reply.
- Save your work by clicking Done.
- Repeat this step for each question in your flow.
-
Create a Decision element that uses a record or answers from screen input to determine
a flow path.
- From the flow canvas, add a Decision element.
- Enter a label, for example Provider Decision.
- In the Outcome Details section, use the fields retrieved from the record or the answers to the questions to create the different branches of the decision. For example, in the resource field you can retrieve the patient’s gender from the patient record or ask for the patient’s gender in a question. One outcome applies if the gender is female, another if it's male, and the Default Outcome applies if neither is selected in the patient’s record.
- Save your work by clicking Done.
- Repeat these steps to create additional decisions.
-
Create variables that store provider preferences and make the values available for
output.
- From the toolbox, create a variable resource as you did in the previous step.
-
For each flow output variable, enter the API Name listed in the table.
API Name Provider Preference Field Name providerName Provider Name facilityName Facility Name specialty Specialty visitTypeId VisitType providerGender Provider Gender languagesSpoken Language Spoken channel Channel - Create other variables based on your business needs. You can create variables for standard and custom fields that are mapped to the Care Provider Searchable Field object.
- In the Data Type field, select the data type of the field.
- Select Available for output.
- Save your work by clicking Done.
- Repeat these steps for each output variable you plan to use to set filters in the provider preferences panel.
-
Create an Assignment element that sets values for the output variables.
- From the flow canvas, add an Assignment element.
- Enter a label, for example Assign Provider Gender.
- In the Variable field select one of the output variables you created.
- In the Operator field select Equals.
- In the Value field, type in the value you want to use to set the filters in the provider preferences panel.
- Save your work by clicking Done.
- Repeat these steps for each output variable you plan to use to set filters in the provider preferences panel.
-
To incorporate advanced scheduling workflows into appointment guidance, create
variables that store relevant information and make the values available for output.
- From the toolbox, create a variable resource as you did in the previous step.
-
Enter variable details listed in the tables. For Data Type, select
Text unless otherwise noted. For each variable, select
Available for output.
Appointment guidance flows support multi-step scheduling with a single resource only, not multiple resources.
Scheduling Output Variables API Name Preference Field Name Sample Value timeZone Time Zone America/New_York Asset Scheduling Output Variables API Name Asset Preference Field Name Possible Values Sample Values schedulingOption Scheduling Option Asset, Provider - assetName Asset Name Asset.Name - assetTypeId
For Data Type, select Multi-Select Picklist. Also select Allow multiple values (collection).
Asset Types Comma-separated list of AssetType.Id values 1FwZ6000000008aKAA, 1FwZ6000000008iKAB facilityName Facility Name - - visitTypeId Visit Type WorkType.Id 08qZ60000004CZRIA2 Multi-Step Scheduling Output Variables API Name Resource Preference Field Name Possible Values Sample Values schedulingMode Scheduling Mode Multi-Step - workTypeProcedureID WorkType Procedure WorkProcedure.Id 0uVZ600000000CjMAI Multi-Resource Scheduling Output Variables API Name Resource Preference Field Name Possible Values Sample Values schedulingMode Scheduling Mode Multi-Resource - facilityID Facility Care Provider Searchable Field - providerIds
To accept multiple providers, for Data Type, select Multi-Select Picklist. Also select Allow multiple values (collection).
Provider IDs Care Provider Searchable Field - assetIds
To accept multiple assets, for Data Type, select Multi-Select Picklist. Also select Allow multiple values (collection).
Asset IDs Asset.Id 02iZ60000005AINIA2 Recurring Scheduling Output Variables API Name Resource Preference Field Name Possible Values schedulingMode Scheduling Mode Recurring startDate
For Data Type, select Date.
Start Date - endDate
For Data Type, select Date.
End Date - occurrence
For Data Type, select Number. For Decimal Places, enter 0, and for Default Value, enter 1.
Occurrence - frequency Frequency Daily, Weekly, Monthly repeats
For Data Type, select Number. For Decimal Places, enter 0, and for Default Value, enter 1.
Repeats - providerId Provider ID Care Provider Searchable Field assetId Asset ID Asset.Id - Save your work by clicking Done.
-
If your flow includes one or more advanced scheduling workflows, add paths to determine
which workflow to use.
-
Add Decision elements such as these to determine whether to schedule a provider or
an asset.
Decision Element Condition Decision Outcome Next Steps in the Flow Is Scheduling Mode Set? SchedulingMode Is Blank False Yes Decision elements that determine which advanced scheduling workflow to use. For details, see the next table. No Is Scheduling Option Set? Decision element Is Scheduling Option Set? SchedulingOption Is Blank False Yes Is Scheduling Option Asset? Decision element No Set Provider Filters Assignment element
Perform Search
Is Scheduling Option Asset? SchedulingOption Equals Asset Yes Set Asset Filters Assignment element
Perform Search
No - - Add Decision elements such as these to determine whether to use multi-step scheduling, multi-resource scheduling, or recurring scheduling. These paths apply if the decision outcome for the Is Scheduling Mode Set? Decision element is Yes.
Decision Element Condition Decision Outcome Next Steps in the Flow Is Multi-Step Mode? SchedulingMode Equals Multi-Step Yes Is Work Type Procedure Set? Decision element
Display Select Work Type screen or Display Work Type screen
Perform Search
No Is Recurring Mode? Decision element Is Recurring Mode? SchedulingMode Equals Recurring Yes Are Required Search Filters Set? Decision element
Display Select Search Filters screen or Verify Search Filters
Perform Search
No Is Multi-Resource Mode? Decision element Is Multi-Resource Mode? SchedulingMode Equals Multi-Resource Yes Is Visit Type Set? and Is Facility ID Set? Decision elements with Display Multi-Resource Search Screen element as a decision outcome
Is Resource Count Within Limit? Decision element with Trim Resource List formula as a decision outcome
Set Appointment Resources Assignment element
Perform Search
No - -
Add Decision elements such as these to determine whether to schedule a provider or
an asset.
-
Save and Activate the flow.
Tip Ensure that a flow deployed to a production org supports advanced scheduling features. In the flow version properties, set the API Version for Running the Flow to 63.0 or later. -
Give call center agents and care coordinators access to the Appointment Guidance
flow:
- From Setup, in the Quick Find box, enter Flows, and select Flows.
-
Click
next to your appointment guidance flow, then click Edit
Access.
- Select Override default behavior and restrict access to enabled profiles or permission sets.
- Move the Call Center Agent and Care Coordinator profiles to the Enabled Profiles list.
- Save your work.
Open the patient record page in Lightning App Builder and select the Intelligent Appointment Management component. In the appointment guidance section, use the dropdown to select this screen flow.

