assignment workflow in salesforce

Salesforce is closed for new business in your area.

About 30 mins

Learning Objectives

Schedule-triggered flows vs. scheduled paths, why use schedule-triggered flows, before you start, create a custom object, schedule a flow, update multiple records with the $record global variable, use $record in a schedule-triggered flow.

  • Challenge +500 points

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

  • Create a flow that runs at a predetermined time.
  • Run a schedule-triggered flow for every record that matches certain conditions.

This badge is one stop along the way to Flow Builder proficiency. From start to finish, the Build Flows with Flow Builder trail guides you through learning all about Flow Builder. Follow this recommended sequence of badges to build strong process automation skills and become a Flow Builder expert.

In the Record-Triggered Flows badge, you learn about scheduled paths. Scheduled paths can run elements a certain amount of time after a trigger, or before or after a date on the triggering record. They rely on a record being created, updated, or deleted. What if you want to run automation that’s not triggered by a record, but at a specific time or on a specific schedule? For that, you need a schedule-triggered flow. 

The Schedule-Triggered Flow type is part of the Autolaunched Flow family. It’s like a quiet younger brother who’s easy to forget but nevertheless is quite dependable. 

When you need to run something on a schedule, consider these differences between scheduled paths and schedule-triggered flows.

Schedule-triggered flows can run once, daily, or weekly, depending on how you configure them. They truly are automated automation! Use schedule-triggered flows to handle regular tasks such as maintaining your org’s data or sending messages to your users. Here are a few examples of what scheduled flows can do for you.

  • Automatically escalate open tasks or cases that have been open too long. Raise the priority or change the status to something that gets more attention. You can also notify key personnel of the escalation. “Hey Sal, this task has been open for 42 days.”
  • Check contacts for missing field values and send their creators an email reminding them to fill in the data. Sometimes users need to create a record before they have all the required data. A schedule-triggered flow can remind them to fill in those important values at a later date. “You really should have that contact’s email address by now, Sal.”
  • Push a batch of changes overnight. If you can define changes in a flow, you can push them in batches. You can’t push updates from a CSV file, but you can, for example, reassign all of Sal’s accounts in the Northwest territory to someone else if he doesn’t improve his data entry by next week. (Though you probably shouldn’t do that unless his manager requests it!)

A user sitting at his desk with a sheepish smile and a shrug. Flo Smith is standing beside him, looking disapproving and gesturing to his screen.

In many cases, you could use either scheduled paths or schedule-triggered flows. The main difference is that a scheduled path runs based on a record change, whereas a schedule-triggered flow does all of its work at a specific time and at a specified frequency. Consider the example of automating reminders for contact creators to add missing field values. 

A scheduled path can email each contact creator a few days after the contact is created. The timing is based on the contact creation date and the scheduled path runs once. 

A schedule-triggered flow can send out all the notices for all incomplete contacts every Sunday night, so all creators can deal with all their data woes all at once first thing on Monday. The timing is set, the flow runs every week, and if a record isn’t corrected, its creator gets a reminder every Sunday until those missing field values are fixed.

To summarize, use a schedule-triggered flow when you want the flow to:

  • Run at a specific time.
  • Run independent of a record change.
  • Run through many records at one time.
  • Run daily or weekly.

Pyroclastic’s support managers want an ongoing record of the number of high priority cases they have at the start of each day. To record this metric in a reportable way, Flo asks you to create a custom object to store each day’s case count and build a schedule-triggered flow to record the count.

There are three settings to define before you start creating schedule-triggered flows. Some of these settings are likely already set in your production org, but it’s a good idea to confirm them. Make sure that these settings are correct in the Trailhead Playground you’re using for this badge before you create a scheduled flow.

  • Set the  Default Workflow User . To run a schedule-triggered flow, Salesforce needs to know which user runs the flow. Make sure there’s a Default Workflow User selected on the Process Automation Settings page in Setup.

The Process Automation Settings page. Default Workflow User is Flo Smith and Automated Process User Email Address is fsmith@pyroclastic.com.

First you create the custom object to store the daily case count.

  • Label: Archived Metric
  • Plural Label:  Archived Metrics
  • Starts with vowel sound: Checked
  • Record Name: Archived Metric Number
  • Data Type: Auto Number
  • Display Format: Archive-{000000}
  • Starting Number: 1
  • Allow Reports: Checked
  • Data Type: Number
  • Field Label: Value

With a few exceptions, schedule-triggered flows have the same components and abilities as most other flow types. Check out Schedule-Triggered Flow Considerations for more info.

  • Create a schedule-triggered flow.

The Start element with two menu items: Set Schedule and Choose Object (Optional)

  • For Start Date, enter tomorrow’s date.
  • For Start Time, enter the current time.
  • For Frequency, select Daily .
  • Label: Get High Priority Cases
  • API Name: Get_High_Priority_Cases
  • Object: Case
  • Condition Requirements: All Conditions Are Met (AND)
  • Field: Priority , Equals , High
  • Field: IsClosed , Equals , $GlobalConstant.False
  • How Many Records to Store: All records
  • How to Store Record Data: Automatically store all fields
  • API Name: caseCount
  • Decimal Places: 0
  • Default Value: 0
  • Label: Count Cases
  • API Name: Count_Cases
  • Set Variable Value: caseCount , Equals Count , Cases from Get_High_Priority_Cases
  • Label: Create Archived Metric
  • API Name: Create_Archived_Metric
  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: Archived Metric
  • Field: Value__c
  • Value: caseCount

The flow canvas showing all the flow elements corresponding to the preceding instructions.

After you activate a flow, it runs according to the scheduled frequency. Unfortunately, flows aren’t time machines. If you schedule a flow to start at a time in the past, it can’t go back in time to run at that earlier date and time. Instead, the first run happens according to the scheduled frequency. For example, if you set a flow to run weekly starting on a Tuesday, and you activate it on a Wednesday, the flow runs for the first time on the next Tuesday.

In a record-triggered flow, you can use the $Record global variable to access and update the record that triggered the flow. You can also use $Record in schedule-triggered flows. So, which record does $Record refer to in a schedule-triggered flow?

On schedule-triggered flows, the $Record global variable actually refers to multiple records. When you select a schedule-triggered flow’s Start element, you have the option to click Choose Object , then select a Salesforce object and define criteria.

The Start element with object set to account

When the flow runs, it finds all of that object’s records that match the criteria, and makes them available through $Record. If you don’t set an object and criteria, $Record isn’t available. 

Because this criteria finds records from only one object, and the same actions are performed for all of those records, the flow can process all the records in a large group called a batch . Salesforce processes batches more efficiently than a series of single records, so batch processing is usually faster and less likely to exceed governor limits.

A banana’s journey from harvesting to grocery store shelves, corresponding to the analogy that follows.

Think of batches of records like bananas; when you work with them, you work with multiple bananas together in a bunch. They grow in a bunch, and they’re harvested in a bunch, transported as a bunch, even sold in stores as a bunch. Handling bananas in bunches makes everything done with bananas simpler and faster. Batch processing does the same for Salesforce records.

When you set criteria in the Start element of an Autolaunched flow, two changes occur. 

  • In all of the flow’s elements, $Record is available as a global variable.
  • Use the $Record global variable : Use this option to update all the records that match the start criteria in one batch.

How to Find Records to Update and Set Their Values settings corresponding to the preceding descriptions

Lately, Pyroclastic employees across multiple teams are finding lots of accounts with no contacts. Sales leadership wants to address the problem but they don’t have an efficient way to identify accounts that need attention. Flo asks you to create a schedule-triggered flow that runs weekly and posts to Chatter alerting managers about accounts that have no contacts.

Build a Schedule-Triggered Flow

  • Start Date: tomorrow’s date
  • Start Time: the current time
  • Frequency: Weekly
  • Click Choose Object .
  • For Object, select Account .
  • For Condition Requirements, select None—Run Flow For All Accounts .
  • Label: Find Contacts
  • API Name: Find_Contacts
  • Object: Contact
  • Filter: AccountId , Equals , $Record > Id
  • How Many Records to Store: Only the first record
  • Label: Contact Found?
  • API Name: Contact_Found
  • Outcome API Name: Yes
  • Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
  • Resource: Contact from Find_Contacts
  • Operator: Is Null
  • Value: $GlobalConstant.False
  • Change the label for the default outcome to No
  • API Name: ChatterBody
  • Body: @[{!$Record.Owner.ManagerId}] This account has no contacts. Owner: @[{!$Record.OwnerId}]
  • Action: Post to Chatter
  • Label: Chatter Post to Manager
  • API Name: Chatter_Post_to_Manager
  • Message: ChatterBody
  • Target Name or ID: $Record > Id
  • Save the flow. For Flow Label, enter Weekly Check for Contacts .
  • Salesforce Help:  Schedule Triggers for Flows That Run for Batches of Records
  • Salesforce Help:  Schedule-Triggered Flow Considerations
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities
  • Marketing Cloud

Experiences

Access Trailhead, your Trailblazer profile, community, learning, original series, events, support, and more.

Search Tips:

  • Please consider misspellings
  • Try different search keywords

Triggers and Order of Execution

When you save a record with an insert , update , or upsert statement, Salesforce performs a sequence of events in a certain order.

Before Salesforce executes these events on the server, the browser runs JavaScript validation if the record contains any dependent picklist fields. The validation limits each dependent picklist field to its available values. No other validation occurs on the client side.

For a diagrammatic representation of the order of execution, see Order of Execution Overview on the Salesforce Architects site. The diagram is specific to the API version indicated on it, and can be out-of-sync with the information here. This Apex Developer Guide page contains the most up-to-date information on the order of execution for this API version. To access a different API version, use the version picker for the Apex Developer Guide .

On the server, Salesforce performs events in this sequence.

  • Loads the original record from the database or initializes the record for an upsert statement.

Salesforce performs different validation checks depending on the type of request.

  • Compliance with layout-specific rules
  • Required values at the layout level and field-definition level
  • Valid field formats
  • Maximum field length

Additionally, if the request is from a User object on a standard UI edit page, Salesforce runs custom validation rules.

  • For requests from multiline item creation such as quote line items and opportunity line items, Salesforce runs custom validation rules.
  • For requests from other sources such as an Apex application or a SOAP API call, Salesforce validates only the foreign keys and restricted picklists. Before executing a trigger, Salesforce verifies that any custom foreign keys don’t refer to the object itself.
  • Executes record-triggered flows that are configured to run before the record is saved.
  • Executes all before triggers.
  • Runs most system validation steps again, such as verifying that all required fields have a non- null value, and runs any custom validation rules. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
  • Executes duplicate rules. If the duplicate rule identifies the record as a duplicate and uses the block action, the record isn’t saved and no further steps, such as after triggers and workflow rules, are taken.
  • Saves the record to the database, but doesn't commit yet.
  • Executes all after triggers.
  • Executes assignment rules.
  • Executes auto-response rules.

This sequence applies only to workflow rules.

  • Updates the record again.
  • Runs system validations again. Custom validation rules, flows, duplicate rules, processes, and escalation rules aren’t run again.
  • Executes before update triggers and after update triggers, regardless of the record operation (insert or update), one more time (and only one more time)
  • Executes escalation rules.
  • Flows launched by processes
  • Flows launched by workflow rules (flow trigger workflow actions pilot)

When a process or flow executes a DML operation, the affected record goes through the save procedure.

  • Executes record-triggered flows that are configured to run after the record is saved
  • Executes entitlement rules.
  • If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.
  • If the parent record is updated, and a grandparent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the grandparent record. Grandparent record goes through save procedure.
  • Executes Criteria Based Sharing evaluation.
  • Commits all DML operations to the database.
  • Sending email
  • Enqueued asynchronous Apex jobs, including queueable jobs and future methods
  • Asynchronous paths in record-triggered flows

During a recursive save, Salesforce skips steps 9 (assignment rules) through 17 (roll-up summary field in the grandparent record).

Additional Considerations

Note these considerations when working with triggers.

  • If a workflow rule field update is triggered by a record update, Trigger.old doesn’t hold the newly updated field by the workflow after the update. Instead, Trigger.old holds the object before the initial record update was made. For example, an existing record has a number field with an initial value of 1. A user updates this field to 10, and a workflow rule field update fires and increments it to 11. In the update trigger that fires after the workflow field update, the field value of the object obtained from Trigger.old is the original value of 1, and not 10. See Trigger.old values before and after update triggers.
  • If a DML call is made with partial success allowed, triggers are fired during the first attempt and are fired again during subsequent attempts. Because these trigger invocations are part of the same transaction, static class variables that are accessed by the trigger aren't reset. See Bulk DML Exception Handling .
  • If more than one trigger is defined on an object for the same event, the order of trigger execution isn't guaranteed. For example, if you have two before insert triggers for Case and a new Case record is inserted. The firing order of these two triggers isn’t guaranteed.
  • To learn about the order of execution when you insert a non-private contact in your org that associates a contact to multiple accounts, see AccountContactRelation .
  • To learn about the order of execution when you’re using before triggers to set Stage and Forecast Category , see Opportunity .
  • In API version 53.0 and earlier, after-save record-triggered flows run after entitlements are executed.
  • Salesforce Help : Triggers for Autolaunched Flows

Salesforce Winter ’21 Release Notes

Best practices for Salesforce Integration Testing

Workflow in Salesforce

  • By Guest User in salesforce

September 11, 2020

Page Contents

Workflow Rules in Salesforce

What is salesforce workflow rules.

Workflow lets you automate standard internal procedures and processes to save time across your org. A  workflow rule  is the main container for a set of workflow instructions. These instructions can always be summed up in an if/then statement.

For Example:  If  you have symptoms of Coronavirus  then  stay at home.

Workflow rules can be broken into two main components.

  • Criteria: the “if” part of the “if/then” statement. In other words, what must be true of the record for the workflow rule to execute the associated actions.
  • Actions: the “then” part of the “if/then” statement. In other words, what to do when the record meets the criteria.

In the example, the criteria is “Have Coronavirus Symptoms” and the action is “Stay At home”. If the criteria isn’t met (No Symptoms), then the action isn’t executed.

Salesforce Workflow Rules

Create a Workflow Rule

Automate your organization’s standard process by creating a workflow rule.

Demo: https://salesforce.vidyard.com/watch/IqZIFLtEx9rY7AD8QLFE3Q

Create Workflow Rules

Rule Criteria

Add Workflow Criteria

Remember, we are defining ‘IF’  statement criteria using Salesforce Workflow rules and  When we need execute this rule.

  • From Setup, enter  Workflow Rules  in the  Quick Find  box, then select  Workflow Rules .
  • Click  New Rule .
  • Choose the object to which you want this workflow rule to apply.
  • Click  Next .
  • Give the rule a name and description.
  • Created – Evaluate the rule criteria each time a record is created. If the rule criteria is met, run the rule. Ignore all updates to existing records.
  • Created, and every time it’s edited – Evaluate the rule criteria each time a record is created or updated. If the rule criteria are met, run the rule.
  • Created, and any time it’s edited to subsequently meet criteria- (Default) Evaluate the rule criteria each time a record is created or updated.
  • Choose  criteria are met  and select the filter criteria that a record must meet to trigger the rule. For example, set the filter to “Opportunity: Amount greater than 5000” if you want opportunity records with an amount greater than $5,000 to trigger the rule.
  • Choose  formula evaluates to true  and enter a formula that returns a value of “True” or “False.” Salesforce triggers the rule if the formula returns “True.”
  • Click  Save & Next .

Add Workflow Action

Once you’ve set the criteria for your workflow rule, identify what to do when those criteria are met.

Add an Immediate Action

Immediate actions , like their name suggests, are executed as soon as the workflow rule finishes evaluating the record.

Immediate Action

  • Open a workflow rule.
  • In the Immediate Workflow Actions section, click  Add Workflow Action .
  • Select one of the options to create an action or select an existing one.

Below are the Workflow Actions :

  • Email Alert: Email alerts are emails generated by an automated process and sent to designated recipients. These actions consist of the standard text and list of recipients for an email. Refer  Email Alert for more details
  • Field Update: Field update actions let you automatically update a field value.  Refer  Field Update for more details
  • Flow Trigger: Create a flow trigger so that you can launch a flow from workflow rules. With flow triggers, you can automate complex business processes—create flows to perform logic, and have events trigger the flows via workflow rules—without writing code. For example, your flow looks up and assigns the relevant entitlement for a case.  Refer  Flow Trigger for more details
  •   Outbound Message: An outbound message sends information to a designated endpoint, like an external service. You configure outbound messages from Setup. Provide the external endpoint and create a listener for the messages using the SOAP API. You can associate outbound messages with workflow rules, approval processes, or entitlement processes. Refer Outbound Message for more details.
  • Task: Task actions determine the details of an assignment given to a specified user by an automated process. You can associate task actions with workflow rules, approval processes, or entitlement processes. Refer  Task for more details.

Add Time-Dependent Action

Time-dependent actions  are executed at a specific time, such as 10 days before a record’s close date. When that specific time passes, the workflow rule re-evaluates the record to make sure that it still meets the rule criteria. If the record does, the workflow rule executes those actions.

Time-dependent actions and time triggers are complex features. As you work with time-dependent actions and time triggers, keep in mind their considerations.

If you plan on configuring workflow rules that have time-dependent actions, specify a default workflow user. Salesforce associates the default workflow user with a workflow rule if the user who initiated the rule is no longer active.

Add time Trigger

Define Time Trigger

Time Dependent Workflow

  • The evaluation criteria is set to  Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria .
  • The rule is activated.
  • The rule is deactivated but has  pending actions  in the workflow queue.
  • Specify the number of days or hours before or after a date that’s relevant to the record, such as the date the record was created. If the workflow rule is still active and valid when this time occurs, the time trigger fires the workflow action.
  • Save your time trigger.
  • In the section for the time trigger you created, click  Add Workflow Action .
  • Click  Done .

Activate Workflow Rule

Make sure to Active a workflow Rule before start unit testing.

To activate a workflow rule, click  Activate  on the workflow rule detail page. Click  Deactivate  to prevent a rule from triggering or if you want to edit the time-dependent actions and time triggers that are associated with the rule.

You can deactivate a workflow rule at any time. However, if you deactivate a rule that has pending actions, Salesforce completes those actions as long as the record that triggered the rule is not updated.

  • You can’t delete a workflow rule that has pending actions in the workflow queue. Wait until pending actions are processed, or use the workflow queue to cancel the pending actions.
  • You can’t add time-dependent workflow actions to active workflow rules. Deactivate the workflow rule first, add the time-dependent workflow action, and reactivate the rule.

Things to Remember

  • TIP Whenever possible, automate your if/then statements with Process Builder instead of workflow rules.
  • Remember you can also associate an existing action to multiple Workflow rules. Refer  Associate Actions to Workflow Rules for more details
  • From Setup, enter  Process Automation Settings  in the  Quick Find  box, then select  Process Automation Settings .
  • For  Default Workflow User , select a user.
  • Save your changes.
  • You cannot add time-dependent actions to the rule When you select ‘created, and every time it’s edited’ option during the workflow creation,
  • In workflow Criteria,  You can use merge fields for directly related objects in workflow rule formulas.

Happy Learning. Stay home and Stay Safe 🙂

  • salesforce , sfdc , Workflow

Permanent link to this article: https://www.sfdcpoint.com/salesforce/workflow-in-salesforce/

assignment workflow in salesforce

  • Palak Arora on December 15, 2021 at 4:20 pm

Hello there! Learned alot from your blogs on Salesforce but this time just to draw your attention on the Note about Time-Dependent Action “The evaluation criteria is set to Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria.” This is wrong, I think the correct condition is when we can not add time trigger action is “Created, and every time it’s edited” Please check.

Leave a Reply Cancel reply

Your email address will not be published.

Popular Posts

  • Navigation Service in LWC(Lightning Web Components) 16 comments
  • Modal/Popup Lightning Web Component(LWC) 6 comments
  • Batch Apex Example In Salesforce 17 comments
  • Wrapper Class in Apex Salesforce 20 comments
  • for:each template directives in LWC 1 comment
  • Get Record Id in Lightning Web Component 9 comments
  • Lightning Web Components(LWC)Tutorial 4 comments
  • template if:true Conditional Rendering LWC 8 comments
  • Triggers in Salesforce 5 comments
  • Lightning Web Component(LWC) Toast Messages 13 comments
  • May 2023  (1)
  • March 2023  (1)
  • January 2023  (1)
  • November 2022  (1)
  • October 2022  (1)
  • September 2022  (2)
  • August 2022  (2)
  • June 2022  (1)
  • February 2022  (1)
  • January 2022  (1)
  • September 2021  (2)
  • August 2021  (1)
  • June 2021  (2)
  • May 2021  (2)
  • April 2021  (2)
  • January 2021  (2)
  • December 2020  (1)
  • October 2020  (1)
  • September 2020  (1)
  • August 2020  (2)
  • June 2020  (2)
  • May 2020  (20)
  • April 2020  (10)
  • March 2020  (6)
  • February 2020  (6)
  • January 2020  (2)
  • December 2019  (6)
  • November 2019  (3)
  • March 2019  (1)
  • February 2019  (1)
  • January 2019  (2)
  • December 2018  (7)
  • November 2018  (4)
  • October 2018  (2)
  • June 2018  (1)
  • April 2018  (1)
  • March 2018  (1)
  • January 2018  (1)
  • December 2017  (2)
  • November 2017  (1)
  • October 2017  (2)
  • September 2017  (2)
  • August 2017  (1)
  • July 2017  (1)
  • May 2017  (2)
  • April 2017  (8)
  • October 2016  (1)
  • June 2015  (1)
  • February 2015  (1)
  • October 2014  (1)
  • August 2014  (1)
  • June 2014  (4)
  • May 2014  (1)
  • April 2014  (2)
  • March 2014  (4)
  • February 2014  (22)

Recent Posts

  • How Salesforce Einstein GPT is changing the Game for Small-Medium Enterprises
  • What are the benefits of Salesforce health cloud?
  • salesforce customer 360 overview and features
  • Difference Between Workflow Process Builder and Flow
  • Salesforce Integration Interview Questions And Answers
  • Salesforce developer interview questions
  • Salesforce Admin Interview questions
  • Salesforce Lightning Interview Questions
  • Salesforce Field Service Implementation
  • Salesforce Course Details | Eligibility, Fees, Duration

Recent Comments

  • luqmaan s on Pagination using StandardSetController with wrapper class
  • Santosh on Get Record Id in Lightning Web Component
  • Micky on custom label in visualforce page
  • Syed Wassim on salesforce order of execution
  • NoviceDev on Avoid recursive trigger in salesforce

TOTAL PAGEVIEWS

  • SFDC Share Point

Our Facebook page

https://www.facebook.com/sfdcpoint

© 2024 Salesforce Blog.

Made with by Graphene Themes .

Privacy Overview

  • App Building
  • Be Release Ready – Spring ’24
  • Integration
  • Salesforce Well-Architected ↗
  • See all products ↗
  • Career Resources
  • Essential Habits
  • Salesforce Admin Skills Kit
  • Salesforce Admin Enablement Kit

Home » Video » Use Flows and Experience Cloud to Access Salesforce Scheduler | Automate This!

Use Flows and Experience Cloud to Access Salesforce Scheduler.

  • Use Flows and Experience Cloud to Access Salesforce Scheduler | Automate This!

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, learn how Lynn Guyer requests support from a health care provider from a website.

Use case: Provider scheduling was manual, costly, prone to errors, and static in time

An allergy physician group contracts with a few hospitals in rural areas of the state to virtually see patients. The practice needs an automated way for the hospital to contact the provider scheduled on call. In the past, they used a call center, which was expensive and made a lot of mistakes when taking information. They also have many last-minute changes to the schedule and want the ability to update in real time instead of sending out a paper calendar for the whole month. In this blog, I explain why and how I used Salesforce Scheduler, Experience Cloud, and flows to automate this process.

The solution: Automate the support request from the health provider

Part 1: salesforce scheduler.

After evaluating many scheduling products, I chose Salesforce Scheduler for the ability to have a unique time zone per user and to automate with Salesforce flows. Salesforce Scheduler is an add-on product. There are associated permission sets and licenses by user persona that can be assigned to full or Salesforce Platform users. Salesforce Scheduler contains a small number of objects from Field Service, and you can access it from the Salesforce Scheduler Setup app. You can also add the objects to other apps after permissions are granted.

The minimum objects in Salesforce Scheduler that require record setup to run are Service Territories, Work Type Groups, Operating Hours, Service Resources, and Shifts. Service Territory is any entity that needs a unique schedule. Work Type Group is what shifts are grouped by on the visually appealing weekly calendar view called Schedule List Display. I make them have a 1-to-1 relationship with a Service Territory to show schedules. Operating Hours are required by the Service Territory; as a result, I created the ones I need in my org.

Service Resources are the people working the shift in the Service Territory. They need to be associated with all the service territories they work shifts in. Service Resources are required to be associated with an active Salesforce user. Consider this when you think about the onboarding process and how many licenses you have available.

Finally, Shifts is my favorite object in this product. I made a custom field for shift type that I use to run flows, since the out-of-the-box type field is not editable. You can create Shifts without a Service Resource, which is helpful for schedule planning. You can also create Shifts to be reoccurring, but they need to have the same Service Resource for that repeating Shift.

I experimented with creating a template and uploading from Dataloader. (Note: My demo org screenshot below has full Field Service, so there are extra buttons not available in Salesforce Scheduler.) I also created a Service Territory for the on-call Salesforce administration/IT team. If anything goes wrong in the flows, the internal on-call person will get the record and figure out what to do with it.

Shifts shown by Work Type Group in Schedule List Display.

Part 2: Experience Cloud

An external facing site was needed for the contracted hospital to interact with. I included Salesforce Experience Cloud in the solution to provide this. The Experience site is able to interface with any piece of data inside Salesforce, including patient, customer, and schedule. Included in the org’s subscription, this was an economical solution. I created a (LWR) microsite to host the website. Since the current state of healthcare is short on employees, with many cycling in and out of units, the business needed a flexible way to make the site as open as possible to anyone who needed it. This was solved by making the site public to guest users to allow hospital workers in without usernames and passwords. With the high turnover at hospitals right now, this is necessary.

After creating the site, I updated the site guest user profile to include access to my custom objects. (Note: The link to this guest user is only available on the Settings page shown below. Be sure to bookmark or save the link for future use.) Since site guest users cannot have the Salesforce Scheduler permission set, I created a Hospital custom object as a pass-through object to connect to the service territories and access the service resource working a shift. I created a 1-to-1 relationship to each service territory for hospital records and related them to the Service Territory via a lookup field. I also added any other relevant information I would reference by hospital on the Experience Cloud site. In this case, I present the service-level agreement (SLA), so that is stored on the Hospital object.

Experience Cloud Site Settings page.

Part 3: Flows

I created a screen flow for the user to interact with on the Experience Cloud site.

Configured screen flow.

The screen flow has screen components containing fields the providers need the requesting hospital to provide, which will then, in turn, populate the Visit custom object. The flow starts by getting all the hospital records to display in the screen component in a collection choice set picklist. The next element is a screen where the user inputs all the patient data.

Screen flow intro screen.

Next, the flow creates the visit record using the data from the screen component. Then, the flow gets the newly created record and its associated hospital so this information can be displayed on the confirmation screen, the last element.

You can confirm the visit request record was created by displaying the owner as determined by the schedule and the SLA associated with the hospital.

Screen flow confirmation screen.

Note that you need to modify the access to the flow in order to display this flow publicly on the Experience Cloud site. Check the box for “Override default behavior”, find the profile that the site guest user is assigned to, and enable it in the profile.

Screen flow permission override by profile.

I used a record-triggered before-save flow to trigger after a visit record is created.

  • This flow checks who is on call for the hospital and request type, and assigns the visit record owner. A before-save flow updates to the same record that triggered the automation.
  • The flow verifies that hospital is on the record since it’s associated to the service territory that’s required for the schedule using a Decision element.
  • If not, a Get Records element is used to lookup the internal service territory. The shift for the current time is looked up via a Get Records. Use an Assignment element to assign the record to the internal on-call IT person or admin to figure out where the record should go.
  • If hospital is found, the Decision routes to Get the service territory that is related to the hospital record to use later on.
  • Depending on the visit reason, the Decision element routes the request to the appropriate shift by custom shift type field.
  • The next Get Records element gets the shift using the current running flow time.
  • Another Get Records element, but this time it gets the related service resource that allows the related user to be assigned as the owner.
  • The last element assigns the owner.

Record-triggered before-save flow.

The final flow in this process is the record-triggered after-save flow, which performs actions outside the triggering record. The org added the digital engagement add-on product with SMS text allowance, which makes a messaging action available in Flow Builder.

SMS action in Flow.

Note: The action references a “messaging template” in Setup that needs to be created first.

Messaging Templates page in Setup.

The template is sent to the mobile number on the owner’s user record, which was just assigned in the prior record-triggered before-save flow.

Record-triggered after-save flow with action.

Once the automation runs, the on-call provider receives the SMS message to their mobile number. The record link is included in the messaging template.

Text message alert on phone.

When the provider clicks the link in the message, the Salesforce app opens to the newly created visit record they were assigned to. They are able to respond to the visit using three quick action buttons. The provider knows who to ask for when they call the hospital to set up a virtual appointment.

Visit record via link from text in Salesforce App on phone.

Overall, the combined power of Salesforce Scheduler, Experience Cloud, and flows gave us the flexibility to structure the ideal solution setup for the physician group, hospitals, and providers. Using this solution, users can access what they need with minimal effort.

  • Trailhead : Get Started with Salesforce Scheduler
  • Salesforce Help: Allow Guest Users to Access Flows
  • Salesforce Help: Create a Flow or Process to Send Messages in Standard Channels

Want to see more good stuff? Subscribe to our channel!

Lynn is a courageous mom who implements Salesforce in the healthcare industry. She lives in Portland, Oregon with her family, enjoying nature in her backyard.

Related Posts

Copy Files from One Object Record to Another.

Copy Files from One Object Record to Another | Automate This!

By Eric Smith | February 15, 2024

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, see how Eric Smith created a subflow […]

Eliminate Manual Record Matching.

Eliminate Manual Record Matching | Automate This!

By Christina Nava | February 15, 2024

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, Christina Nava uses a screen flow to […]

Harness Custom Settings and Flow for Dynamic Round Robins.

Harness Custom Settings and Flow for Dynamic Round Robins | Automate This!

By Warren Walters | January 26, 2024

Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by Awesome Admin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, see how Warren Walters creates custom Auto […]

TRAILHEAD

Fullcast

Setup for Assignment Workflow (Canvas) in Salesforce

Assignment Workflow feature is mainly designed for Sales Managers to be able to perform various workflows that were previously only available in the Fullcast.io web app. Some of the assignment workflows can now be performed in Salesforce without having to even log into the Fullcast.io web app.

Pre-requisite for Assignment Workflow

  • Motion package version 2.157 and above 
  • Custom settings in Salesforce 
  • Object manager setup in Account, Account Team Member and GTM pages

Custom Metadata Types in Salesforce

  • From Setup in Salesforce, enter Apps  in the Quick Find box. Select App Manager .
  • Find Fullcast Motion Package and click on Edit by selecting the dropdown menu against that.  
  • Manage Connected Apps page will pop up. In the Canvas App settings click the checkbox Canvas . 
  • For Prod URL: https://app.fullcast.io/api/v1/canvas/auth  
  • For PreProd: https://fullcastpreprod.herokuapp.com/api/v1/canvas/auth
  •  Make sure that the Available components in Locations tab is moved to the Selected . Click Save.
  • For the tab Lifecycle Class find Fullcastcanvas using search bar. From that select FullcastLifecyclerHandler class. 
  • After saving, copy the API name from the resulting page. 
  • Find Custom Metadata Types from quick find. 
  • Click on Manage Records against Fullcast Policy Setting. 
  • In the page that comes up, find Canvas Developer Name and click on the edit tab placed against it.
  •  Give the API name in the Field Value tab and save it. Make sure that the field value name matches the API Name of the Connected App that was created to connect the Fullcast App.

Update the tenant settings with the tenant ID which is connected to the salesforce instance. Update the Tenant ID record in the Fullcast Policy setting page. If this is a sandbox setup then update the Tenant ID Sandbox record in the Fullcast Policy setting page.

Adding profile and permission to access Assignment Workflow

  • From Setup in Salesforce, enter Apps in the Quick Find box. Select App Manager .
  • Find Fullcast Motion Package and click on Manage by selecting the dropdown menu against that.  
  • In the screen that appears click on Edit Policies .
  • In the OAuth Policies section select Permitted Users tab as Admin approved users are pre-authorized and click Save.
  • After saving, in the screen that appears scroll down to look for the Profiles tab. Click on Manage Profiles .
  • Profile can be selected based on the customer requirement. 

Similarly, Permission can also be set based on the customer requirement.  

After the custom settings and profiles and permissions are created, the user now have to setup the Object Manager. To know how to setup the Object Manager for assignment workflow click on the link.

Troubleshooting Guides:

Access Denied error

Still need help? Contact Us Contact Us

IMAGES

  1. 5 Ways to Automate Your Salesforce Processes with Flow

    assignment workflow in salesforce

  2. How-I-Manage-Lead-Assignment-In-Salesforce-Traction-Complete-Flow

    assignment workflow in salesforce

  3. Salesforce Flows

    assignment workflow in salesforce

  4. Get to Know Salesforce Workflow Rules & Process Builder

    assignment workflow in salesforce

  5. Flows

    assignment workflow in salesforce

  6. Creating Workflow Rules in Salesforce

    assignment workflow in salesforce

VIDEO

  1. #4 difference between workflow and process builder

  2. Salesforce Task Assignment

  3. what is workflow in Salesforce #shorts #salesforce

  4. Salesforce Page layout assignment

  5. Permission Sets with Page Layout Assignment and Dynamic Forms in Salesforce

  6. Workflow video

COMMENTS

  1. Workflow: Automating the Process

    Workflow tasks assign a new task to a user, role, or record owner. For example, automatically assign follow-up tasks to a support representative one week after a case is updated. ... Specify the criteria that determine when Salesforce executes the workflow rule. Any change that causes a record to match this criteria can trigger the workflow ...

  2. Processes, auto-response rules, validation rules, assignment rules, and

    Processes, auto-response rules, validation rules, assignment rules, and workflow rules. Publish Date: Aug 15, 2023. Description. This is a compilation of article links for workflows and processes. Learn what to do to set them up, troubleshoot, and understand how they work.. Resolution. Join the Getting Started Community: Ask questions.

  3. The Complete Guide to Salesforce Flow

    There are 3 main "building blocks" of any Flow: 1. Elements are the individual building blocks of the Flow. These perform logical actions such as assignments, decisions, or loops. There are also data elements that will query the database or commit record changes. 2. Connectors determine which element leads to which.

  4. The Ultimate Guide to Flow Best Practices and Standards

    In this blog, we'll discuss best practices, 'gotchas,' and design tips to make sure your flows scale with your organization. 1. Document your flows! Documenting your flow allows the next person, or the forgetful future version of yourself, to understand the overall flow's objective. Flow designers don't create solutions out of thin ...

  5. Assignment and escalation rules

    Assignment and escalation rules. ". - [Instructor] Assignment and escalation rules are used to automate business processes and make it easier to organize, support and lead workflows. Assignment ...

  6. "Mastering the Art A Comprehensive Guide to Assignment Rules in Salesforce"

    Assignment Rules in Salesforce: Imagine this: You're a lone wolf in the Salesforce jungle, battling a relentless tide of leads and cases. Hours melt away as you manually assign each one, feeling ...

  7. What is Lead Routing, and How to Use Assignment Rules in Salesforce

    Lead routing: The process of distributing incoming leads among sales reps. Also known as lead assignment, lead routing is usually automated. A lead routing process could be as simple as making an alphabetical list of all of your sales reps and assigning each new lead to whomever is next in line. More sophisticated systems depend on a variety of ...

  8. PDF Examples of Workflow Rules

    assignment rule. Object Lead Ensure that unassigned leads are tracked in a timely manner by notifying the manager if a lead isn't accepted in 2 days. Description Evaluate the rule when a record is: created, and anytime it's edited to subsequently meet criteria Evaluation Criteria 8 Examples of Workflow Rules Workflow Rule Examples

  9. Migrate Workflow Rules and Processes to Flow

    The Salesforce Automation team is working on creating automated testing for flows. Use debug logs to understand why a flow failed and what might be the root cause. Remove any hard coding that's common in WFRs and processes, and replace hard-coded IDs with custom labels, custom settings, or custom metadata.

  10. Automate Your Business Processes with Salesforce Flow

    Meet OmniStudio. ~10 mins. Explore the Digital Experience Layer. ~5 mins. Use the Service Management Layer. ~5 mins. Show 3 Units. ~2 hrs. Optimize your business processes by harnessing the power of Salesforce Flow.

  11. Schedule a Flow

    To run a schedule-triggered flow, Salesforce needs to know which user runs the flow. Make sure there's a Default Workflow User selected on the Process Automation Settings page in Setup. Set the Automated Process User Email Address. If your schedule-triggered flow sends emails, Salesforce needs an email address to use as the sender.

  12. A Complete Guide to Workflow Rule in Salesforce

    Steps to Create a Workflow Rule: Navigate to Setup. In the Quick Find box, type "Workflow Rules.". Click on "Workflow Rules.". Click the "New Rule" button. Select the object for the ...

  13. Mastering Real-time Scenarios with Salesforce Flows

    Steps: Create a Flow: Navigate to Setup in Salesforce. Search for "Flows" and click on "Flows.". Click on "New Flow" and choose "Screen Flow.". Design the Flow: Add a "Screen ...

  14. Limits for Assignment, Auto-Response, and Escalation Rules

    Set Up Service Cloud Basics. Design and Optimize the Agent Experience. Deflect Cases with Self-Service. Add Service Cloud Channels. Salesforce limits the number of rules, as well as the number of entries and actions per rule. These limits apply to assignment rules, auto-response rules,...

  15. Triggers and Order of Execution

    Additional Considerations. Note these considerations when working with triggers. If a workflow rule field update is triggered by a record update, Trigger.old doesn't hold the newly updated field by the workflow after the update. Instead, Trigger.old holds the object before the initial record update was made. For example, an existing record has a number field with an initial value of 1.

  16. Workflow in Salesforce

    Add Workflow Criteria. Remember, we are defining 'IF' statement criteria using Salesforce Workflow rules and When we need execute this rule.. From Setup, enter Workflow Rules in the Quick Find box, then select Workflow Rules. Click New Rule. Choose the object to which you want this workflow rule to apply. Click Next. Give the rule a name and description.

  17. Use Flows and Experience Cloud to Access Salesforce Scheduler

    Part 2: Experience Cloud. An external facing site was needed for the contracted hospital to interact with. I included Salesforce Experience Cloud in the solution to provide this. The Experience site is able to interface with any piece of data inside Salesforce, including patient, customer, and schedule. Included in the org's subscription ...

  18. Setup for Assignment Workflow (Canvas) in Salesforce

    Assignment Workflow feature is mainly designed for Sales Managers to be able to perform various workflows that were previously only available in the Fullcast.io web app. Some of the assignment workflows can now be performed in Salesforce without having to even log into the Fullcast.io web app.