Let the platform do the work

Understanding and Setting Up Legacy Workflows

Overview

Workflows enable you to automate repetitive tasks to help increase efficiency and ensure business processes are followed. With each workflow you set up in Sugar, you can define a set of conditions to be met and any combination of alerts and actions to trigger once the conditions are satisfied.

Each user's license type (e.g., Sugar Serve, Sugar Sell Premier) determines what functionality is available as described in the License Types matrix.

How Do Workflows Function?

Workflows trigger based on a record being saved in Sugar. This save event can occur in a number of different ways:

  • Manual save by a user
  • Mass update
  • Import
  • Updates through the API (SOAP or REST)
  • Updates through the customer portal (Enterprise only)
  • Another workflow

The last bullet above is the most important when designing workflows. Any time a workflow triggers, even if it is just to send an email alert, the target record is re-saved to allow for evaluation by other workflows. If you have two workflows with very similar conditions and no actions to alter those conditions after the workflow triggers, you could end up with a record that loops through two or more workflows continuously.

Every workflow must have at least one condition established in order to trigger. Workflows can trigger in one of two ways:

  • Immediately upon saving the record
  • After a specified amount of time has elapsed from when the record was saved

As you become more familiar with workflows, you will learn that there are specific workflows that will require a time elapsed set up in order to function properly. Regardless of which style of workflow you are setting up, the conditions in that workflow are evaluated immediately when the record is saved. If the conditions do not validate, then no further action is taken for that workflow and additional workflows are evaluated if necessary.

Lastly, it should be noted that in order for time elapsed workflows to function, the Process Workflow Tasks scheduler must be set to "Active" and should be executed at a high frequency. By default, this Scheduler is active and set to run every minute. For more information, please refer to the Schedulers documentation.

How Should I Design My Workflow?

You need to first determine the type of workflow you will need. Will it be a workflow that will be triggered when a record has been saved or after a period of time has elapsed? Before you start building a workflow, you will need to identify the following:

  • What is/are the condition(s) that need to be met in order for the workflow to execute?
  • Do you want the workflow to fire on new, existing or both types of records?
  • Once the condition is met, what action do you want the workflow to take?
  • Once the action occurs, do you want a notification email to go out to an external recipient(s) and/or user(s)?
  • Are you taking the proper precautions to ensure this workflow will not trigger other workflows in an unintended fashion?

It is best to map out your workflow processes before creating them in Sugar so you can understand the desired logic you want to achieve and identify any potential areas that will need safeguards to ensure your processes are performed as expected.

How Do I Set Up My Workflow?

Now that you have a basic understanding of how workflows function and your design is mapped out, proceed through the following steps to set up a workflow:

  1. Go to Admin > Workflow Management.
  2. Mouse over the 'Workflow Definitions' tab at the top and select 'Create Workflow Definition'.
  3. Enter a name for the workflow and select the execution style, target module, processing order, and applicable record types. Then click 'Save'.
  4. From the workflow detailview, you will be presented with three panels:
    1. Conditions - Set up all your workflow conditions here. All conditions you create must be met for a workflow to fire.
    2. Alerts - Create custom alerts to send out when the conditions are met.
    3. Actions - With actions, you can update fields in the target record, update fields in a related record, or create a new record related to the target record when the conditions of the workflow are satisfied.

You do not need to have an alert and action created for each workflow. Once a condition is set on the workflow and you at least have one alert or action, your workflow will be ready to go!

Next Steps

Now that you understand the basics of setting up a workflow, you will want to review additional articles on more advanced tasks under our Workflow section such as creating alert email templates, defining a processing order, etc. so that you can leverage fully realize the potential of workflows! You can also review the Workflow Management documentation for more information.