Workflow / Process Automation, 8%
Given a scenario, identify the appropriate automation solution based on the capabilities of workflow/process.
Describe capabilities and use cases for the approval process.
Workflow / Process Automation Introduction
- Topics available under Setup > Process Automation > Workflow Actions, Setup > Process Automation > Workflow Rules
Creating Workflow Rules
- Workflow Rules have fallen out of favor, replaced by Process Builder, the next iteration
- Workflow rules were the backbone of process automation
- Four types of actions:
- Tasks—Assign a new task to a user, role, or record owner.
- Email Alerts—Send an email to one or more recipients you specify.
- Field Updates—Update the value of a field on a record.
- Outbound Messages—Send a secure, configurable API message (in XML format) to a designated listener.
- First question: when to fire?
- Record created,
- Record created or edited,
- Record created or edited to meet criteria
Creating Immediate Workflow Actions
- An example workflow action: reassign the account owner to be a specific user if the Billing State/Province is TN (Tennessee)
Creating Time-Based Workflow Actions
- Can set up new actions that trigger a specified time interval after or before the Rule Trigger Date, Account Created Date, Last Login for the Current User, etc.
Process Automation Settings
- Available via: Setup > Process Automation > Process Automation Settings. Includes various settings like Enable email approval response
Time-Based Workflow Queue
- This special queue is available via: Settings > Environments > Monitoring > Time-Based Workflow, or by searching “time” in the Quick Find
Working With and Closing Tasks
- Tasks appear as popups on users' screens as well as Notifications (bell icon)
Creating Email Templates
- Both “Classic” and “Lightning” email templates are available
- Letterheads include headers, footers, dividing lines, can include logos, etc
- Templates can be set up to include a text-only version. These are important to set up since some users will turn off HTML in their email client, so they will only see the text version.
Creating Email Alerts
- From email alert can be specified as the current user.
Creating Outbound Messages
- Outbound Messages are SOAP transactions that Salesforce automatically sends to external systems when triggered, as opposed to REST.
- MW used the putsreq.com website to test this functionality - site allows you record HTTP responses and fake responses. The test failed, so possible putsreq cannot be configured correctly to work with Salesforce.
- You can send outbound messages through workflow rules, and the intention of the functionality is to be able to send messages from Salesforce into another system through the SOAP API.
- Can monitor the output via: Setup > Quick Find > “Outbound” > Outbound Messages
Approval Processes
- Access Approval Process setup via: Setup > Quick Find > “approvals” > Approval Processes
- Per MW, Approval Processes are complex and only be attempted after completing Salesforce’s recommended steps:
- Approvals are intended to be used to send records for approvals
- Approvals tend to heavily leverage email templates and email sending
- Two wizards are included and there are guidelines available to help choose the right one for a given use case
Reassigning an Approval Process
- Users can reassign an approval step that was assigned to them to another user
Creating a Process Using the Process Builder
- Available via: Setup > Quick Find > “process” > Process Builder
- You can do more with Process Builder than Workflow Rules
- Specifically, can do levels of decision branching in Process Builder that isn’t possible with Workflow Rules.
- IE: If condition 1 is True, do X
- If condition 1 is False and condition 2 is True, do Y
- If condition 1 is False and condition 2 is False, do Z
- Process Builder has more action options: call Apex classes, launch flows, post to chatter, launch other process builders, launch quick actions
- Process Builder can create records for more or less any object, not just Tasks (like Workflow Rules)
- Specifically, can do levels of decision branching in Process Builder that isn’t possible with Workflow Rules.
One Process Per Object Design Pattern
- One Process Per Object is a design pattern that is emerging in Salesforce and becoming popular
- Analogous to the One Trigger per Object best practice that emerged so developers can control the order of events
- Organizations are moving away from Workflow Rules and to Process Builder because a single Process Builder can include the actions from many Workflow Rules - one of the problems with workflow rules is that there can be many per object
Editing a Process
- Need to clone existing processes in order to edit them - this will result in either a new version or a new process entirely
- When creating a new version, the changes are commonly logged in the description field for the new version. For example, “Time-based action added”
Trust.Salesforce.com
- Go to trust.salesforce.com to check whether Salesforce servers are down
- Has links to status.salesforce.com where you can search for specific instance URLs (resourceful-koala-v0vrpy-dev-ed.my.salesforce.com, for an example Trailhead org) and all the available services
Creating Flows with the Flow Builder
- Access via: Setup > Quick Find > “flows” > Flows
- Flow Builder has replaced Cloud Flow Designer
- If you need to Delete a record, can use either Flows or triggers
- Flows are helpful if you want to create a wizard-based, multiple screen environment for users to click through
- May need to “Enable Lightning runtime for flows” under Setup > Process Automation Settings
Installing Flows via the AppExchange
- Flows can be downloaded from the AppExchange. MW included this example from Salesforce Labs: Flows Samples Pack, Lightning Flows Sample Pack
- Far easier to “Install for All Users” new packages, then remove access, than to “Install for Admins Only,” and then grant access
- Can only delete records from a Flow
Which Automation Tool to Use
- Which Automation Tool do I Use help article
- Included table is very helpful and simple
- In order of complexity: Workflow Rules < Process Builder < Flows
Einstein Next Best Actions
- Not on the exam at time of MW recording
- Use action strategies to combine insights and business rules and create a stream of recommended actions and offers for your users.
- Einstein Next Best Action Trailhead Module
These notes were taken while studying using Mike Wheeler's Salesforce Courses.