You may (or may not) be aware that the diagnostics option in Unified Routing has been deprecated. It is being replaced by diagnostics in Azure Application Insights.
As of September 2024, I believe the existing routing diagnostics are too due to be deprecated in October. But you may need to check for the latest details. You can check out the details here.
Maybe you should first understand that the “routing diagnostics” are transitioning into a slightly different concept. As the new approach should be considered “conversation” diagnostics. I believe the difference being that we will eventually have details about the entire conversation lifecycle and not just the routing element.
I have underlined “eventually” for a reason. As I’m sorry to report that currently you may find the new style diagnostics contains less information on routing events. Plus using Application Insights to query the data presents a more technical challenge. However, I believe Microsoft have plans to enhance the data held in Application Insights. And provide us with more options to query the data. (At least this is my hope / belief, my are fingers crossed.)
There is a prerequisite of using the new style conversation diagnostics …. as you must be working in a Managed environment. At least this is true as this feature transitions into general availability. (See note from Microsoft below.)
You can read the associated Microsoft documentation here.
Setup Process
Before you can start using application insights for conversation diagnostics you will need to enable it. Details below …
Open your Power Platform admin center. Then select “data export”. (Under the Analytics option.)
Now select the “App Insight” tab and click “New data export”.
Next you enter a name for your export packages and select Dynamics Customer Service, before clicking next
Next you select your environment
Next you will pick your subscription, resource group and application insights instance
Finally click create! Now your conversation routing information will be available ion application insights
Reviewing Diagnostics
To view your trace tables, open portal.azure.com and navigate to Application Insights.
You will need to open the logs option and create a query on the traces table.
Below you can see a copy of a sample query supplied by Microsoft, you will need to replace the “lwiID” GUID with the ID of the conversation you’d like to diagnose. We are basically running a query against the “traces” table to return all events connected with the selected conversation.
let lwiId = "<<INSERT YOUR CONVERSATION GUID HERE>>";
let operationIds = (traces
| where operation_ParentId == lwiId
| distinct operation_Id);
traces
| where operation_Id in (operationIds) or operation_ParentId == lwiId
| project
timestamp,
message,
customDimensions,
operation_Name,
operation_Id,
operation_ParentId,
session_Id,
user_Id,
severityLevel,
itemType
| sort by timestamp asc
So, what data do we have available?? The trace table contains rows for many conversation scenarios. (I hope / assume more scenarios will be added as time progresses.) As of Sept 2024 the list of events which result in trace table rows is shown below.
Category: Conversation initiation
Category: Virtual agent interaction
Category: Routing
Category: Human agent interaction
Category: Conversation completion
For each of the scenarios shown above the trace table will contain columns containing the following metadata. (Again, overtime I hope Microsoft decide to add more data.)
Hopefully this post will have helped you understand how to enable the new diagnostics approach. As mentioned from October 2024 the use of this approach will become mandatory. And as time progresses, we can expect to see additional scenarios included. So keep an eye on this feature! Enjoy.
Original Post https://neilparkhurst.com/2024/09/16/unified-routing-diagnostics-in-azure/