Consult transfer using API fails

Hi!

I am working at upgrading our current "blind" transfer to use Consult transfer.

In place of the code below which does a successful blind transfer

await conversationsApi.postConversationParticipantReplace(convoId, participantId, {
      address: xferAddress
    });

I have replaced it with (from the docs)

let resp = await conversationsApi.postConversationsCallParticipantConsult(convoId, participantId, {
      speakTo: "DESTINATION",
      destination: {
        address: xferAddress
      }});

This code returns an error of

{"message":"You are not a connected participant on the call","code":"not.a.participant","status":400}

ININ-Correlation-Id:
016f377e-05d0-45e0-8a08-f14b61105e96

Thanks in advance for any help

Chris

Hello,

The Consult Transfer method is only supported when using a user context (token obtained via Implicit Grant, Authorization Code Grant or SAML grant) and if the user is an active participant of the call.

Like most of conversation control method, Consult Transfer is not supported when using a Client Credentials grant/token or if the user requesting the consult transfer is not a participant in the call (ex: sending chat messages on behalf of a user, ...).
The "blind transfer" is somehow an exception to this as it works with Client Credentials.

Regards,

Hi Jerome

Thanks for the reply! We are integrating with the PEF.

The PEF UI is able to make the call to make a consult transfer, however the API call we make with the token we've take from the API loaded into the PEF doesn't work?

This is how we get the token from the API that the PEF loaded into memory

pureCloud.User.getAuthToken(token => {postMessage("authToken", token)});

Thanks for your help

Chris

Also, if I have a token from the PEF, is there a way I can check out its grant?

Thanks

Chris

Hello Chris,

I think it is possibly because you are not using the correct participantId (just tried it with Genesys Desktop and API Explorer in Dev Tools).

Interestingly, with consult transfer, the participantId to use in the request seems to be the one corresponding to the customer/external participant.
I mean not using the participantId corresponding to the Contact Center Agent (like for Blind Transfer).
Don't ask me why :slight_smile: I just checked what Genesys Desktop was doing and tried via API Explorer to use the agent's participantId (error - not.a.participant) and the customer/external's participantId (consult transfer worked).

As a side note, with PEF, I think you are not obliged to go through the getAuthToken and the Platform API request for Consult Transfer.
I haven't practiced PEF heavily but you have an available action to trigger a consultTransfer: Interaction.updateState with action=consultTransfer.
The advantage is that you won't have to get the conversation context/details to find the participantId (I assume that's what you are currently doing with a GET /api/v2/analytics/conversations/{conversationId}/details or with a GET /api/v2/conversations/{conversationId}). You just need to specify the ID of the interaction and the consult transfer target and type.

Regards,

1 Like

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