The most important part of writing workflows is figuring out the correct logic and flow. To do this I recommend starting with a flow chart. This gives you a document to save as well as something for the business to sign off on. To be able to create this flow chart, you need to understand what step options you have, so let's start there.
Standard workflow steps:
- Stage: this is purely for documentation. You can use stages to break up portions of your workflow. If you use a stage for one portion, you need to use stages throughout.
- Check Condition: An If statement. Use to ensure you are only running the workflow for the proper records. Also can be used to create more logic.
- Conditional Branch: An Else If or Otherwise If. In the case where the "Check Condition" was false (no actions inside have run) then check this next.
- Default Branch: An Else or Otherwise. The Check Condition and all subsequent Conditional Branches were all false, do these actions in remaining cases.
- Wait Condition: Wait for a particular action to occur or for a specific period of time (timeout). These should be used sparingly if possible. Also after a wait condition is a good time to call a child workflow to break up your logic.
- Create Record: Create a new record. This can use any data for the record the workflow is based on (firing off off) or any other records created as part of the process. You can also use the process data or the current execution time (can be used to set due dates).
- Assign Record: Change the owner of an existing record. This can be the primary record or any records created in the workflow.
- Send Email: Send an email using an existing template or draft in the workflow. You can create an Email with the "Create Workflow" step but then you cannot send in the workflow. The only way to send is through this "Send Email" step.
- Start Child Workflow: Start another workflow. This is a great way to break up the logic or split up the results of your conditional steps.
- Perform Action: start an Action process. Similar to a child workflow but allows you to pass parameters into processing. These can also be called through code. (See Types of Processes for more information)
- Change Status: Modify the record status from Active to Inactive, Open to Closed. This can be used to complete Activities or reopen Activities to edit.
- Stop Workflow: Mark the end of the workflow. This is generally the most useful in combination with check conditions. Run a Check Condition to determine if actions need to occur, if not then stop workflow. This is not needed as the last step of your workflow.
Now just to add some confusion there are also Custom Workflow steps. Some of these are provided as part of Microsoft solutions - such as field service, project automation, etc. In addition to these, you can install several other solutions to add additional step options. Check out Workflow Elements and the Ultimate Workflow Toolkit.
With all these options there is a large range of functionality available and no limits to the power of workflows!