Could someone explain why wrapUpCode is null in the response?
The docs say detail queries should include wrap-up codes. i’m using the .NET SDK v13. I’m passing wrap-up-code in the group-by parameter just like the Swagger spec says.
You need to check if the WrapUpCodeId field is populated instead, as the SDK sometimes maps the internal ID rather than the display name depending on the response version. The wrapUpCode string field can be null if the system returns the identifier separately.
var request = new GetRoutingAnalyticsConversationsDetailsRequest
{
GroupBy = new List<string> { "wrap-up-code" },
Entity = new EntityReference { Id = "your-entity-id" }
};
var response = await analyticsApi.GetRoutingAnalyticsConversationsDetailsAsync(request);
foreach (var detail in response.Entities)
{
// Check the ID field instead of the string name
var codeId = detail.WrapUpCodeId;
Console.WriteLine($"Wrap-up Code ID: {codeId}");
}
The documentation can be ambiguous about which field gets populated in the detail object. If the ID is present, you might need a separate call to the wrap-up code API to resolve the name.
Make sure you’re actually grouping by wrap-up-code in the request body, not just passing it as a query param. the .NET SDK can be finicky with the GroupBy list initialization. here’s the working setup:
var request = new GetRoutingAnalyticsConversationsDetailsRequest
{
GroupBy = new List<string> { "wrap-up-code" },
Entity = new EntityReference { Id = "your-queue-id" }
};