

# Create a rule in Contact Lens that updates a case
<a name="contact-lens-rules-update-case"></a>

**To create a rule that updates a case**

1. When you create your rule, choose **A case is updated** as the event source and choose **Next**.  
![\[The new rule page, the add action dropdown menu, the a case is updated option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-rules-update-case-1.png)

1. When you create your rule, choose **Update case** for the action.  
![\[The new rule page, the add action dropdown menu, the update case option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-rules-update-case-2.png)

1. Select any case field that you want to update from the dropdown and define its new value.  
![\[Select any case field that you want to update from the dropdown and define its new value.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-rules-update-case-3.png)  
![\[Select any case field that you want to update from the dropdown and define its new value.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-rules-update-case-4.png)

1. Choose **Next**. Review and then choose **Save**.

1. After you add rules, they are applied to new contacts that occur after the rule was added. Rules are applied when Amazon Connect conversational analytics analyzes conversations.

   You cannot apply rules to past, stored conversations. 