Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Get customer participant id inside an architect flow

    Posted 4 days ago

    Hi,

    We need to get hold of the customer participant id inside an architect inbound call/email/message flow. By the looks of it there are no built in architect variable that keeps this value. We have also tried to build a data action retrieving the customer participant id but it gets very complex and we haven't found a way to get this to work. Has anyone a solution for grabbing the customer participant id?


    #Architect

    ------------------------------
    Fredrik Sandberg
    Lead Engineer
    ------------------------------


  • 2.  RE: Get customer participant id inside an architect flow

    Posted 4 days ago

    Hi Fredrik,

    You need to do that via Data Actions.

    If you only need the participantId of the customer you can configure the data action to only return the id where purpose is customer to get minimal results.



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



  • 3.  RE: Get customer participant id inside an architect flow

    Posted 4 days ago

    Hi Jan,

    Thank you for your answer. I guess that you need to specify this in the translation map in the response?  We get this to work in our data action: 

    {
      "successTemplate": "{\"participants\": ${allParticipants}, \"purposes\": ${allPurposes}}",
      "translationMap": {
        "allParticipants": "$.participants[*].id",
        "allPurposes": "$.participants[*].purpose"
      },
      "translationMapDefaults": {
        "allParticipants": "[]",
        "allPurposes": "[]"
      }
    }

    How can we get only the participant data for the customer? Can you share any examples for this?

    All help is much appreciated!  

    /Fredrik



    ------------------------------
    Fedrik J Sandberg
    Project Manager, Online Business Development
    ------------------------------



  • 4.  RE: Get customer participant id inside an architect flow

    Posted 4 days ago

    Yes, for inbound the customer will always be first so you can use

    "translationMap": {
      "customerParticipantId": "$.participants[0].participantId"
    }
    
    or to search
    
    "translationMap": {
      "customerParticipantId": "$.participants[@.purpose=='customer'].participantId"
    }

    Note that it will return the value in an array

    [
      "f590770a-c189-45ab-bc4a-30c423befb47"
    ]


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



  • 5.  RE: Get customer participant id inside an architect flow

    Posted 2 hours ago

    Thank you Jan! We got the translation map with "$.participants[0].participantId" to work but not the search version. The search version always turns up empty. Any ideas why this might happen?

    We will go with what we have working now, but if we got the search version to work the solution would be more robust!

    Thank you Jan for taking your time with this! 



    ------------------------------
    Fedrik J Sandberg
    Project Manager, Online Business Development
    ------------------------------



  • 6.  RE: Get customer participant id inside an architect flow

    Posted 4 days ago

    From my experience, if it's inbound and not internal, $.participants[0] always has "customer" in the purpose field because they're the ones who start the interaction.



    ------------------------------
    Max Ando
    Fabletics Inc
    ------------------------------