In this blog, we walk you through the process of automating case closure in Dynamics 365 using Power Automate. We will also take you through the setup of a custom action in Dynamics 365 and a flow in Power Automate that automatically closes cases when given certain conditions.
Why closing cases automatically?
Automated case closure ensures zero mistakes and saves time. Once the specified case conditions are met, case records will automatically update to reflect a status of "Closed" or "Resolved." This automation reduces the burden on agents who might have to remember to do it manually. Additionally, it provides accurate data for performance tracking, ultimately boosting productivity. This approach is particularly beneficial for teams that handle many cases within an organization.
Prerequisites
Before you start using this, ensure you have the following:
A Power App Premium account: Power app premium account to see and manage cases.
Power Automate Premium: Access to create flows using premium triggers and actions.
Step-by-step guide to set up automated case closure in Dynamics 365:
The first step is to open your solution, then click on new -> Automation -> Processes -> Action (Click on action)
In the create action side drawer, fill in the required details such as the Display name. Ensure to check “Table” in Add to and “Case” as the Table. After this, click “Create.”
Once you click “Create”, a new window will open with the configuration form of the process. At the bottom, you will find an area for the steps that should be executed (like a normal Workflow). Here, you need to add a “Change Status” step. To do this, choose “Add Step” and then select “Change Status.”
The next step is to add the change status feature. This step is straightforward; you only need to select the new status for the case. For this task, I will choose “Problem Solved.”
Now your custom Action is ready. You can save and activate it from the top navigation.
The second part is to create a Power Automate flow that calls this new action.
Open the Power Automate website and create an “Automated Cloud Flow.”
Enter the name of the flow and select the trigger “When a row is added, modified, or deleted” from Microsoft Dataverse, then click "Create."
Now, configure this step by filling in the condition. You can customize the conditions based on your requirements. In my case, I’m using a condition where if the description is updated, the case will be resolved. Set the Change Type as "Modified," the Table Name as "Case," and the Scope as "Organization." Be sure to choose the column that is being updated (in my case, it is the description).
Refer to the screenshot below for a better understanding.
Next, click "Add" and choose another trigger as “Perform a bound action” from Dataverse. Select the Table Name as "Case" and choose the action that we created at the beginning. Pass the Case ID from dynamic values in Row ID.
Now your automation is ready; click “Test” and save it.
Testing the Automation:
To test this automation, go to an unresolved case, update its description, and save. The flow will run automatically, and you should see the result with the case status changed to "Resolved."
Result: After saving the case, you will see that the case status has been resolved via automation.
Frequently Asked Questions (FAQs)
1. Why can't I see the status field in Power Automates "Update Record" action?
It is a known limitation that you cannot directly update a case's status using the standard "Update Record" action in Power Automate. This is why we need to create a custom action or use the case resolution entity
2. Will this automation work for all types of cases?
Yes, but you will need to ensure your custom action is configured to handle different case types and their respective resolution requirements. You may need to modify the flow based on your organization's specific case management processes.
3. Can I customize the resolution type or closure reason?
Yes, when creating the custom action, you can configure different resolution types and closure reasons based on your organization's requirements. These can be mapped to specific conditions in your flow.
4. Do I need a premium Power Automate license to run this flow?
Yes, you will need a premium Power Automate license to run this flow. The premium license is required to use both the triggers from Dataverse.