Facing issue with Wrap up code API in Java sdk

Hi,
I am developing a custom solution in Eclipse using Java SDKs to get wrap up code name by passing wrap up code ID as input.

I will get the wrap up code ID using the API "/api/v2/analytics/conversations/details/query"

Then I am using the API to get wrap up code name "/api/v2/routing/wrapupcodes/{codeId}". But Java SDK of wrapup code API is giving error stating

"com.mypurecloud.sdk.v2.ApiException: error
at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705)
at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757)
at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868)
at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6121)
at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6090)
at Dollar_Tree.Dollar_Tree_1.Real_Time_Data.main(Real_Time_Data.java:406)"

The API is giving output for half of the conversation IDs and for reaming it is throwing error message like this.

I am using the code as below,

if(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getSegmentType().toString()=="wrapup")
							{
								Participantfields2.add(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpCode());
								WrapupCodeID= conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpCode();
								
								
								WrapupCode wrapupcodename = routingapi.getRoutingWrapupcode(WrapupCodeID);
								
								Participantfields10WrapupCodeName.add(wrapupcodename.getName());
								
								//g Setting WrapupcodeNote array
								
								Participantfields3.add(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpNote());
							}

Could you please help me with this issue?

What's the error body?

Hi Tim,

I am invoking this API as a part of my Java code in Eclipse. I got the below error,

"com.mypurecloud.sdk.v2.ApiException: error
at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705)
at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757)
at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868)
at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6121)
at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6090)
at Dollar_Tree.Dollar_Tree_1.Real_Time_Data.main(Real_Time_Data.java:406)
"

I am getting error at Line 406.
My custom solution works as below:
Step 1: Use API /api/v2/analytics/conversations/details/query to get conversation IDs and wrapup code IDs recorded during an interval
Step 2: Use the API "/api/v2/routing/wrapupcodes/{codeId}"to get wrap up code name by passing wrap up IDs as input

I am facing error at step 2. When I set short intervals for step 1 (for instance one hour interval), I am getting all the wrap up code names in step 2. But when I set large interval like 4 hours or 6 hours, I get wrap up code name for few wrap up IDs and then the API strucks gives error response.

I am not sure why the wrap up code API gives response for some data at the starting point and then gives error for rest.

In the below screenshot, I was getting wrap up name for few IDs and suddenly error message pops. So I would like to know is there any limit for the wrap up code API

Can you share the error body please? ApiException.getRawBody()

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.