userId member not in CallMediaParticipant.java

Hello,

When calling the API GET/api/v2/conversations, we can see the agent participant (purpose="agent") has a field called userId.
But when desirializing, the Java SDK uses CallMediaParticipant (
platform-client-sdk-java/build/src/main/java/com/mypurecloud/sdk/v2/model/CallMediaParticipant.java at master · MyPureCloud/platform-client-sdk-java · GitHub) and it does not have a userId member: it is normal because participants have specific fields (agents/customer/acd etc.) ? How can I access those “specific” values ?

Thanks.

Hello,

It is not the right class to use to deserialize.
"GET/api/v2/conversations" returns a ConversationEntityListing (with Conversation in it). In the Conversation class, the participants are instances of the "Participant" class.

The CallMediaParticipant class is related to another endpoint - "GET/api/v2/conversations/calls".
This endpoint returns a CallConversationEntityListing (with CallConversation in it). In the CallConversation class, the participants are instances of the "CallMediaParticipant" class.

Regards,

Hello Jerome,

You are right, thank you for the precision ! I was mixing both calls (GET/api/v2/conversations vs GET/api/v2/conversations/calls.)
Thanks again for your help.

Nicolas

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