The Workflow Builder feature is used for partial automation of the records and emails. Based on the criteria set in the workflow, predetermined actions can be configured, every time the relevant trigger occurs.
Let’s elaborate the whole process of Workflow Builder using the following usecase:
Domain: Transport Management
When Cargo is created
If Destination is overseas and Required Delivery Days is <= 15 days
Then set Mode of Transportation to Outsource – Plane and send email to air-cargo company
If Destination is overseas and Required Delivery Days is > 15 days
Then set Mode of Transportation to Outsource – Ship and send email to sea-cargo company
Steps:
Step 1: Accessing and Initiating the Workflow Builder
Click on the Application Settings icon and then select the App Settings option.
Click on Workflow Builder option in the App Settings panel.
Click on the + New Workflow button.
The Workflow window is displayed.
We may start by renaming the workflow name, by clicking the edit icon at top. This however, is an optional step.
Type in the desired workflow name.
At the moment there is only a single node in the workflow. We can rename it as well, using the Node Label textbox.
Select the object for which the workflow is being created. This selection is very important as all the properties in the workflow would come from the selected object only.
Step 2: Modeling the desired type of Trigger
Select the relevant trigger (Created, Edited or Approaching). For this example we would use the Created option.
Now that we have configured our main trigger, it’s time to set when this trigger triggers! To do it we need to set the trigger conditions. Click the + Trigger Condition link.
The Workflow Builder can support multiple conditions. By default, these conditions are combined using the AND operator. However, their combination scheme and precedence can be altered using Custom Conditions Logic. The details of this option are discussed here.
Select the relevant field to configure the condition.
Select the desired operator.
Select or provide the relevant value for the selected property.
The condition is configured to cater part of our usecase. We can add other conditions here as well , however, it is not needed as per our usecase.
Step 3: Add and model the decision
Click the + sign to add another node to the workflow.
Select the relevant action for the node. As per our usecase’ requirement, we would select the Decide option.
We have added a decision to our workflow. Note that the decision and both of its path are showing little warning signs. This is because we need to configure both branches of the decision.
Click the + sign to add a condition for Branch 1 of the decision. This is what the decision would decide between 2 option.
Select the relevant property, operator and corresponding value.
The condition is saved automatically. Close the dialogue box.
We can see that as we configured Branch 1, warning sign disappeared against it.
We can change the label of Branch 1 as well.
Click the + sign again, this time to add a new node for Branch 1.
Step 4: Configure the Automation part
Now comes the automation part. Using this node we would be updating the value of a property, so we have to select Update Record option.
Select the relevant property as per the requirement of the workflow.
Select/provide the desired value.
Now that we have configured this node, to set the Transportation Mode to our selected value, What’s next as per our usecase? We have to send the relevant overseas cargo company an email. Let’s add another node for that by clicking the + sign.
Select the option Send Email.
Select the desired email template.
Note: For the emails, user should have created the relevant templates in advance, otherwise this step would remain unfinished and ultimately the workflow would remain unfinished.
This completes one leg of our decision. Close the Details tab.
Similarly configure the other leg of the decision.
Click the Save button to complete the Workflow Builder.
Close the Window.
The workflow list is displayed. Here we can edit or delete the required workflow using the Ellipsis button in the extreme right column. We can also disable the workflow temporarily using the Active toggle button.
Step 5: Bring Workflow into action
Now that we have used the Workflow Builder for Automation, let’s see it in action. Let’s create a cargo record.
Note that we have not provided a value for the Transportation Mode property . The Workflow Builder would do it for us.
As anticipated, based on the property values that we provided, the Transportation Mode is set to Overseas – Plane.
An email is also sent to the plane cargo company.
The emails were sent based on the templates that we had already created (using the Notification feature) before working on the Workflow Builder.