Genesys Cloud - Main

 View Only

Discussion Thread View
  Thread closed by the administrator, not accepting new replies.
  • 1.  Unable to assign an external contact to a conversation

    Posted 12-19-2024 07:55
    No replies, thread closed.

    Hi Everyone, 

    We are using unauthenticated web messaging, and during the conversation, we collect the customer's email address. I would like to search for external contacts using this email and, if a match is found, assign the corresponding external contact profile to the conversation.

    I plan to achieve this using the API:
    /api/v2/externalcontacts/conversations/{conversationId}

    However, the body of this API request requires the communicationId field, and I'm unsure how to obtain it. I attempted to use the participantId as the communicationId, but this did not work. Could you clarify how to retrieve the correct communicationId for this purpose?


    #API/Integrations
    #ConversationalAI(Bots,AgentAssist,etc.)

    ------------------------------
    Karthik Ageer
    ------------------------------


  • 2.  RE: Unable to assign an external contact to a conversation
    Best Answer

    Posted 12-19-2024 08:19
    No replies, thread closed.

    Hello Karthik,

    The communicationId is the sessionId of the participant, so for an incoming message interaction you can use

    /api/v2/analytics/conversations/${input.conversationId}/details

    using Input Contract (String) conversationId and Output Contract (String) communicationId

    and the following translationMap

    {
      "translationMap": {
        "communicationId": "$.participants[0].sessions[0].sessionId"
      },
      "translationMapDefaults": {
        "communicationId": "\"NOT FOUND\""
      },
      "successTemplate": "{\r\n \t\"communicationId\": ${communicationId}\r\n}"
    }


    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 3.  RE: Unable to assign an external contact to a conversation

    Posted 12-19-2024 10:01
    No replies, thread closed.

    @Jan Heinonen, Thanks a lot. it is working as expected now.



    ------------------------------
    Karthik Ageer
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources