Workflow rules are the orders created by a Salesforce user to perform automated actions when certain conditions or series of conditions are met. These tasks can happen suddenly or can be scheduled at a particular time based on a trigger.
Various actions that are performed by Salesforce Workflow:
1. Field Updation – Displays new data after altering a field when certain conditions are met.
2. Sending email – Salesforce users can generate preset emails by including plain text and HTML. These emails can be automatically sent when certain conditions have taken place in Salesforce. You can use mail merge for displaying the recipient’s first name, company, and other personal information.
3. Assigning Task – Once predefined conditions have taken place, you can set a new task for a particular user.
4. Sending a message to a different system
Sending an outgoing XML message to a specific URL outside the Salesforce ecosystem.
Salesforce Workflow has two components for salespeople to get the information about the quantity, type, and results that can be expected based on a certain scenario.
- Criteria – These are the “if” part of the procedure that is associated with the rule and must be true in order to perform the action with the linked expression.
- Actions – These are “then” part. It consists of actions that take place when conditions are met.
Difference between Workflow Rules in Salesforce and Process Builder in Salesforce
With Process Builder, you perform a lot more actions than Workflow Rules such as :
- Create a record,
- Update any related record(Master-Detail – Lookup)
- Using a quick action to create a record, update a record, or log a call
- Launch a flow
- Send an email
- Publish to chatter
- Send for approval
- Call Apex methods
But the process builder does not support outgoing messages.
However, the Workflow can only perform 4 actions:
- Create Task
- Update fields (Same Object or Master Object in Master-Detail Relationship)
- Email notification
- Outbound Message
Scenario 1 – If there is any change into Contact Name then you need to update the Latest Contact custom field of Associated Account with the latest Changes into the account name.
In this scenario, the Process Builder is perfect because when using workflow we cannot update related records other than master-detail.
Scenario 2 – Update Latest Opportunity custom field of Account Object with the opportunity name that was recently closed.
Workflow is the right and innovative automation tool for the scenario described above, because the relationship between Account and Opportunity is Master-Details and using workflow rule we can update the master record and the same record.
Scenario 3 – Update all related cases and Contacts with the same phone of account whenever the account phone changed.
Process Builder is the perfect tool here because we need to update all contacts and cases. There may be more than one, and the Process builder allows you to do the same thing.