

# Create rules to automate tasks in Amazon Connect
<a name="connect-rules"></a>

A rule is an action that Amazon Connect automatically performs, based on conditions you specify. Contact center managers, supervisors and QA analysts can quickly create rules from the Amazon Connect console. No coding is required.

## More information
<a name="rules-more-information"></a>
+ To create and manage rules programmatically, see [Rules actions](https://docs.aws.amazon.com/connect/latest/APIReference/rules-api.html) and the [Amazon Connect Rules Function language](https://docs.aws.amazon.com/connect/latest/APIReference/connect-rules-language.html) in the *Amazon Connect API Reference Guide*. 
+ [Add real-time alerts to Contact Lens for supervisors based on keywords and phrases in a call](add-rules-for-alerts.md)
+ [Automatically categorize contacts by matching conversations with natural language statements, or specific words and phrases](rules.md)
+ [Create a rule that generates a task](contact-lens-rules-create-task.md)
+ [Create a rule that generates an EventBridge event](contact-lens-rules-eventbridge-event.md)
+ [Create rules that send email notifications](contact-lens-rules-email.md)
+ [Notify supervisors and agents about performance evaluations](create-evaluation-rules.md)
+ [Create alerts on real-time metrics in Amazon Connect](rule-real-time-metrics.md)
+ [Create rules that generate tasks for third-party integrations in Amazon Connect](add-rules-task-creation.md)

# Create rules that generate tasks for third-party integrations in Amazon Connect
<a name="add-rules-task-creation"></a>

After you set up an external application to generate tasks automatically, you need to build rules that tell Amazon Connect when to create tasks, and how to route them.

1. Log in to Amazon Connect with a user account that is assigned the **CallCenterManager** security profile, or that is enabled for **Rules** permissions.

1. In Amazon Connect, on the navigation menu, choose **Rules**.

1. On the **Rules** page, use the **Create a rule** dropdown list to choose **External application**.

1. At the **Trigger and conditions** page, assign a name to the rule. Spaces are not allowed in the name of a rule.  
![\[The New rule page, spaces are not allowed in the name of a rule.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-add-category-rules.png)

1. Choose the event that will generate a task, and the instance of the external application where the event must occur. For example, the following image shows the trigger is when a new ticket is created in Zendesk. The condition that must be met is when the type equals a question. Then a task is generated.  
![\[The When and Type dropdown menus.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tasks-add-rule-for-zendesk.png)

   1. Select the instance for the external application.

   1. Choose the conditions that must be met to generate the task.

1. Choose **Next**.

1. On the **Action** page, specify the task to be generated when the rule is met, as shown in the following image  
![\[The Action page, the task to be generated when the rule is met.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/task-rule-action-to-take.png)

   1. The description of the task appears to the agent in their Contact Control Panel (CCP).

   1. The task reference name appears to the agent as a link to the specified URL.

1. Choose **Save**.

## Test the rule
<a name="test-rules-task-creation"></a>

1. Go the external application and create the event that initiates the action. For example, in Zendesk, create a ticket that's type **Question**. 

1. Go to **Analytics and optimization**, **Contact search**. 

1. Under **Channel**, choose **Task**, and then choose **Search**.

1. Verify the task was created.