Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  GET wrapupname

    Posted 04-10-2024 02:44
    No replies, thread closed.

    Hello,

    I want to make a data action that gets the name of a wrapup code via the conversationID. This works if I know in which line the wrapup code is located in section "participants.wrapup.name"of the conversation details. However, the line can vary from interaction to interaction. Can someone tell me how I have to formulate the translation map so that the first entry that is not null is fetched?

    Configuration of the data action:

    {

      "requestUrlTemplate": "/api/v2/conversations/${input.conversationId}",

      "requestType": "GET",

      "headers": {},

      "requestTemplate": "${input.rawRequest}"

    }

    {

      "translationMap": {

        "participantwrapupname": "$.participants[3].wrapup.name"

      },

      "translationMapDefaults": {

        "participantwrapupname": "\"\""

      },

      "successTemplate": "{ \"participantwrapupname\": ${participantwrapupname} }"

    }

    Details of example conversation are:

    "participants.wrapup.name": [

        null,

        null,

        null,

        "CLE Private Altersvorsorge",

        null,

        null,

        null

      ],


    #ArchitectureandDesign

    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------


  • 2.  RE: GET wrapupname
    Best Answer

    Posted 04-10-2024 03:46
    No replies, thread closed.

    Hello Thomas,

    From what I can tell you can't do a filter and only get the first result that contains a property in JSONPath.

    I don't know which API you use to get the wrapup name directly, but if you use [*] instead of [3] it should you all wrapup codes in a conversation (which could be several).

    "translationMap": {
        "participantwrapupname": "$.participants[*].wrapup.name"
    }


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



  • 3.  RE: GET wrapupname

    Posted 04-10-2024 04:11
    Edited by Thomas Repking 04-10-2024 04:19
    No replies, thread closed.

    Hi Jan,

    Thank you, found my error. Accidentally formatted the output-contract as string, changed it to array, now it works.