Need to automatically create a task when an opportunity’s sales stage is set to “Closed Won” or “Closed Lost”.
Beginning with version 9.1.0, each user’s license type (e.g. Sugar Serve) determines what functionality is available as described in the User Management documentation. The Workflow module used in this article is not available in Sugar Serve and Sugar Sell.
- You must be an administrator or have developer-level access in Sugar to create the workflow.
- The Process Workflow Tasks scheduler must be running.
- System email settings must be configured in Admin > Email Settings.
For more information, please refer to the Workflow Management, Schedulers, and Email documentation.
Steps to Complete
We will create a workflow definition that specifies the conditions for executing the workflow, the users and/or teams who must receive the alert, and the actions that would occur during execution:
- Log in to Sugar as an administrator and navigate to Admin > Workflow Management.
- Create a workflow definition
- Select Opportunities as the target module, with execution to occur when the record is saved.
- Save the workflow definition.
- Create a condition
- In the Conditions sub-panel of the workflow’s Detail View, click Create to define the condition.
- Define the condition as “When a field in the target module contains a specified value”, and click Next.
- Click the “specific field” link, select Sales Stage from the Field Drop-down list, and select “Sales Stage Equals Closed Won” (or Closed Lost) as the field in the target module.
- Click Save to save the condition.
- Create an alert.
- In the Alerts sub-panel of the workflow’s Detail View, click Create to create an alert that executes when an opportunity is closed.
- Select Email as the Alert type, and enter the message in the Alert Text field.
- Save the alert.
- In the Alert Recipient List, click Create, and specify the user, team, or recipient will receive the alert.
- Save the alert, and in the alert’s Detail View, click the “Return to Workflow Definition” link.
- Create an action.
- In the Actions sub-panel of the workflow’s Detail View, click Create.
- Select the action “Create a record in a module associated with target module”.
- Click the “record” link that displays below and select “Task” as the module.
- Select the fields that you want to populate in the task record, such as the subject line, due date, and assigned user.
- Save the task.