What is Workflow?
A workflow consists of a sequence of concatenated (connected) steps, that Automate the business process.
Workflow is the automation of the following types of actions based on your organization’s processes:
- Tasks – Assign a new task to a user, role, or record owner.
- Email Alerts – Send an email to one or more recipients you specify.
- Field Updates – Update the value of a field on a record.
- Outbound Messages – Send a secure configurable API message (in XML format) to a designated listener.
For example, a workflow can automatically:
- Assign follow-up tasks to a support rep one week after a case is updated.
- Send sales management an email alert when a sales rep qualifies a large deal.
- Change the Owner field on a contract three days before it expires.
- Trigger an outbound API message to an external HR system to initiate the reimbursement process for an approved expense report.
To create workflow rule, go to App Setup | Workflow & Approvals | Workflow rules and click on new Workflow rule.
Step 1 in creating workflow rule is selecting the object, on which the workflow will be created.
in step 2, Evaluation criteria have three options to choose:
- When a record is created, or when a record is edited and did not previously meet the rule criteria: Choose this option to include new records and updates to existing records unless the rule just ran and still meets the rule criteria. The rule is not re-triggered on edits that do not affect rule criteria. For example, if setting an opportunity rating to “Hot” causes the rule to run, with this option, the rule will run again only if the rating changes, then changes back to “Hot”—no matter how many times you edit the object.
- Only when a record is created: Choose this option to ignore updates to existing records.
- Every time a record is created or edited: Choose this option to include new records and updates to existing records and repeatedly trigger the rule, even if the record still meets the criteria. You cannot add time-dependent actions to the rule if you choose Every time a record is created or edited.
Note: – You can’t add time-dependent actions to a rule if you choose Every time a record is created or edited.
So, in step 2 basically, we create criteria when the rule should run.
In step 3, we can specify the action what should happen if workflow criteria meet.
In this case, I have selected New Email Alert, preceding screenshot is self-explanatory about the process.