|Creating a new Real-Time Workflow|
I have been mentioning Real-Time workflows throughout the rest of my workflow series. Today, let’s look at Real-Time workflows specifically.
|Converting to Real Time from Background|
|Start When Options|
Converting to Real-Time
|Return Error to User: Step 1|
New Workflows are set to Run in the Background (asynchronous) by default. You can un-check this option when creating a new workflow or to change an existing workflow to a Real-Time workflow, click the “Convert to Real-Time Workflow” button in the Ribbon.
This button will then change to allow you to convert back to a background process if necessary.
Remember to use Real-Time workflows sparingly as these can impact the performance for the end user.
|Return Error to User: Step 2|
Start When Options
|Real Time Delete Example Workflow|
The Start options are different for Real-Time workflows because you can choose if the steps run before or after an action occurs.
|Real Time Delete Example Message|
|Real Time Delete Returned Message|
For example, you could configure it to run Before a delete occurs and use the workflow to prevent the deletion in certain situations.
The same scope and start when types apply.
Run As Options
A background workflow will always run as the workflow owner. For Real-Time workflows you can choose if it will run as the workflow owner or the user who triggers the workflow (meaning the person who created the record if running on create).
Be sure to test this setting with your end users and review the security needed to complete the tasks. If running as the triggering user and the end user does not have permission to complete the tasks in the workflow then the workflow will fail.
Returning Errors to the User
A cool feature of Real-Time workflows is that you can use them to prevent actions and return messages to the user. Let’s say we want to do this in a delete scenario:
- Create your workflow to fire BEFORE Delete
- Add a Conditional Statement to the workflow, say if Opportunity: Estimated Revenue is over $100,000
- Add a step to Stop Workflow as Canceled
- Click Properties and you can fill in the message returned to the user
The properties also allows you to pull in dynamic fields. So you can say in the Alert that the delete was prevented due to the estimated revenue being over a certain amount. This same logic could be used to prevent closing an opportunity as lost without manager approval or deactivating an account without reaching out.
How have you used Real-Time Workflows? What is your favorite feature?