Thursday 22 April 2021

Introduction to Workflow Rule in Salesforce


The workflow rule in Salesforce is one kind of process automation that basically contains the business logic that automates certain actions based on particular criteria.

What are the benefits of using Workflow Rules?

In a workflow rule, you get one set of criteria with multiple conditions and then a list of actions to run once the criteria is met. Being able to ‘chain’ multiple sets of criteria provides for if-then-else logic to easily build complex business processes. With traditional workflow rules, you would need several different rules to catch the different scenarios in your requirements. This can make complex business processes difficult to maintain.

There are endless ways you can use workflows, but of course, it is easier to illustrate what is a workflow in Salesforce with some examples. Mentioning the specific things that can be performed, you may automate the following 4 workflow actions in Salesforce:
  • creating tasks
  • Updating fields
  • Sending email alerts
  • Sending outbound messages

How to create workflow rules?
  • From Setup, enter the 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.
  • Set the evaluation criteria.(As per your requirement)
    • 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 is 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.

  • Enter your rule criteria.
  • Click Save & Next.

What 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.

Field Update: A common use case of workflow rules is the function to overwrite field values with new data. This is, perhaps, the most frequently used action but please note that it won’t work in the cross-object case.

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.

Task Creation: 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.

How to Add Time-Dependent Action in Workflow Rule?
  • Open a workflow rule.
  • In the Time-Dependent Workflow Actions section, click Add Time Trigger.
  • 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. Refer below image for better understanding.

  • Save your time trigger.
  • In the section for the time trigger you created, click Add Workflow Action.
  • Select one of the options to create an action or select an existing one.
  • Click Done.
If the workflow rule is still active and valid when this time occurs, the time trigger fires the workflow action.

Limitations of Workflow Rules:
  • You can’t add a time trigger if:
    • The evaluation criteria are 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.
  • Please refer to the link for limitations.


As illustrated, Salesforce Workflow is a much better and more efficient tool that let Salesforce admin creates business solutions with no code and with few clicks. So, we can easily perform some actions like email send, field update, etc.
    If you have any questions you can reach out to our Salesforce Consulting team here.

    No comments:

    Post a Comment