Note: Workflow is the predecessor to Process Builder. I would highly recommend using Process Builder instead of Workflows, as it contains many more options and flexible settings for automation.
Workflow lets you automate standard internal procedures and processes to save time. Workflows will allow you to create automated actions. An automated action is a reusable component that performs some sort of action behind the scenes—like updating a field or sending an email. Using Workflow Rules will provide you the ability to enforce key business processes easily and without needing to write any code.
A Workflow Rule is the main container for a set of workflow instructions. Workflow instructions can always be summarized as an if/then statement.
There are two primary components for Workflow Rules
1) 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.
2) Actions: the “then” part of the “if/then” statement. In other words, what to do when the record meets the criteria.
For example, if it's raining, then bring an umbrella.
In the raining example, the criteria is “it’s raining” and the action is “bring an umbrella”. If the criteria is not met (it is not raining), then the action isn’t executed (you don’t bring an umbrella). When a record meets all the criteria for a workflow rule, that rule’s actions are executed.
Creating a Workflow
In this example, we'll create a rule that emails the user whenever a deal is closed. In this example, the user can use these emails to keep track of how many deals they have closed and when these deals were closed.
First navigate to Setup, under Process Automation you'll find Workflow Rules. Upon opening this section you'll be greeted with an overview of workflow with some pertinent information, click the Continue button on the bottom left-hand corner.
Here you'll find a table of all the pre-configured Workflows which already exist in your org. You find actions for deactivating these automations description information for these workflows and information.
Next you'll want to click on the "New Rule" button. Here you'll then be prompted to select the Object to which this Workflow Rule applies.
Next you'll be asked to provide a name for this new Workflow Rule and to provide a brief description of the Rule.
Beneath you'll find options for when you want the workflow to act. Evaluation Criteria this can be any of these 3 options:
When the record is initially created, whenever the record is edited or when it is created, and any time it's edited to subsequently meet criteria.
Lastly, you'll find a section for Rule Criteria
Note: There are two choices for how rule criteria are validated in this article we will touch on the simpler of the two "Criteria are met"; However, if you want to learn more regarding "formula evaluates to true" check out this salesforce article for more information.
Criteria are met (as seen below)
Here you first select a Field, then you a logical operator (equals, greater than, less than, isNotNull, etc) and a value. So if we are trying to create an automation that sends an email every time we close a deal. Select Field and pick Deal Pipeline: Deal Stage, then under operator select equals and lastly select Value you'll see a magnifying glass icon () which will also let you pick a value from a list of possible values for this Picklist. Afterward, just click Save & Next on the bottom right-hand corner.
Next, you reach the step where you specify the Workflow Action that will be triggered when the rule criteria are met. Select the Add Workflow Action Button and select from the option within the drop-down menu. For this instance, I will be selecting New Email Alert.
Next, you will be prompted to create an email alert to associate with the Workflow Rule. Provide the description for the Email Alert, provide it a unique name, select an Email Template, using the () this will provide you a list of default templates to choose from (given you have one created for this purpose). Then select a Recipient Type. In this case, we'll continue with users (yourself) and select from the available user list. Beneath this, you will also see a field with allows you to add other emails for this alert. The other options can remain as they are. For this we'll just leave the rest of the options as they are, click Save.
This will lead you to the following screen which will allow you to add more actions (if you require more actions to take place). In this example, we'll leave it as it is and click "Done".
Lastly, you'll want to click the "Active" button as seen below:
Once you've activated the Workflow. Make sure to check that the activated checkbox is checked off as seen below. Then lastly, I would recommend that you test the Workflow to make sure it functions as intended. Congratulations you've created your Workflow!
Please reach out to Product Support (firstname.lastname@example.org) if you have any questions about Creating Workflows.