Genesys Cloud - Main

 View Only

Sign Up

  • 1.  External Contacts

    Posted 4 days ago

    Hello,

    I want to find an external contact through the Genesys Architect. If it doesn't exist, I want to create a new one and link the interaction to the contact so the operator doesn't have to link the contact manually. Can you help me solve this problem?


    #ArchitectandDesign

    ------------------------------
    Oleg Nisengoltsev
    ------------------------------


  • 2.  RE: External Contacts
    Best Answer

    Posted 3 days ago

    Hi Oleg Nisengoltsev

    From what I understand of your goal, you can handle this using the Genesys Public API.

    One possible approach would be:

    1. Search for the external contact using
      GET /api/v2/externalcontacts/contacts?q={searchTerm}.
      If a match exists, keep the contactId.
      If not, create a new contact with
      POST /api/v2/externalcontacts/contacts.

    2. Retrieve the conversation participants with:
      GET /api/v2/conversations/{conversationId}
      to get the participant and communication IDs you need.

    3. Associate the contact with the conversation using:
      PUT /api/v2/externalcontacts/conversations/{conversationId}
      providing the contactId you found or created.

    This way, the agent doesn't need to link anything manually - the flow handles the entire process automatically.

    Hope this helps.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: External Contacts

    Posted 2 days ago

    Hello,

    I'm trying to get a SessionID via the service: /api/v2/conversations/{conversationId}

    In the test, in the data action, the service returns the ID, but in the flow architecture, it ends with failure.

    this is my config:

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

    Response: 

    {
      "translationMap": {
        "sessionId": "$.participants[?(@.purpose == 'customer')].sessions[0].sessionId"
      },
      "translationMapDefaults": {
        "sessionId": "[]"
      },
      "successTemplate": "{\"sessionId\":$successTemplateUtils.firstFromArray($sessionId, \"UNAVAILABLE\")}"
    }
    this is the screen from execution history
    do you have any idea why doesn't it work in Architect?



    ------------------------------
    Oleg Nisengoltsev
    NA
    ------------------------------



  • 4.  RE: External Contacts

    Posted 2 days ago
    Hi Oleg

    Hello,

    The API I use for this purpose is /api/v2/conversations/conversationId. 

    And in the response construction for the data Action, it is: 

    Response:
    {
      "translationMap": {
        "communicationId": "$.participants[?(@.purpose=='customer')].calls[*].id"
      },
      "translationMapDefaults": {
        "communicationId": "\"\""
      },
      "successTemplate": "{\"communicationId\": $successTemplateUtils.firstFromArray(${communicationId}, \"$esc.quote$esc.quote\")}"
    }

    Please try this suggestion.

    Currently, this DA does not present any problems in an Architec flow and associates conversations with the external contact.





  • 5.  RE: External Contacts

    Posted 2 days ago

    Hi,

    A temporary external contact is always created for every interaction if it can't find a matching existing external contact.

    In the basic scenario where you just match ANI to contacts you would check if contact already is curated, otherwise you can promote the contact to be curated.

    If you have other means of identifying the customer you would need to search if there's an existing contact.
    If you find an existing contact you can merge the temporary contact with the curated contact, otherwise promote the contact to create new curated contact.



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



  • 6.  RE: External Contacts

    Posted 2 days ago
    Edited by Oleg Nisengoltsev yesterday

    Hello,

    Thanks for your post. I have a service that gets a unique client number, client name, and client category from CRM. The goal is to find a contact with the same phone number in external contacts and link the interaction to it so the operator doesn't have to manually press the button. Also, if the contact doesn't exist, create a new contact and add my attributes to it.



    ------------------------------
    Oleg Nisengoltsev
    NA
    ------------------------------



  • 7.  RE: External Contacts

    Posted 2 days ago

    Hello,

    When you search for a contact in Architect, there are three possible scenarios.

    1- The search criteria finds a single contact (the best case scenario). 

    2- You get more than one external contact.

    3- The contact does not exist. 

    For scenario 1, you only need to obtain the communication ID and conversation ID, and then associate the conversation with the external contact ID. This is achieved using the following APIs: /api/v2/externalcontacts/conversations/conversationid, where the fields to be passed in the Json body would be ExternalId, conversationID, CommunicatioID, mediatype.

    For scenario 2, you must review it for business logic issues, and scenario 3 may be similar to case 1, with the variation that you must first add the contact and then perform the steps in scenario 1.

    I hope this brief description is helpful.

    Best regards



    ------------------------------
    Daniel Rodriguez
    ------------------------------



  • 8.  RE: External Contacts

    Posted yesterday

    Hello,

    Thanks everyone for your help,

    I've set up all the services and the process is working as expected.



    ------------------------------
    Oleg Nisengoltsev
    NA
    ------------------------------