Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

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

  Thread closed by the administrator, not accepting new replies.
  • 1.  /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 11-27-2024 09:45
    No replies, thread closed.

    I am trying to pull data to send to Qualtrics using a data action within Genesys using /api/v2/analytics/conversations/${input.conversationId}/details.

    I am having trouble parsing the data to get the totals for ttalk, tacw, thandle, thold, tivr

    I can't seem to figure out how to get the "value" for each into an update statement for the calculation


    #API/Integrations

    ------------------------------
    Shirley Byrd
    Network Infrastructure Spec
    ------------------------------


  • 2.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 11-27-2024 10:23
    No replies, thread closed.

    Hello Shirley, 

    Are you saying you are getting the data just cannot parse it into readable data for Qualtrics?

    Or are you missing the data completely?

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 11-27-2024 10:27
    No replies, thread closed.

    I have the data, I just cannot parse it to get the calculation that I need.

     

     

    Thank you,

     

    Shirley Byrd

    OA/ITSD

    573-751-6968

    shirley.byrd@oa.mo.gov

     






  • 4.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 11-27-2024 10:29
    No replies, thread closed.

    The data is under the metrics section – I just can figure out how to input the "value" in a variable to do the calculation.

     

    "metrics": [

                {

                  "emitDate": "2024-11-21T20:59:36.592Z",

                  "name": "tAlert",

                  "value": 5262

                },

                {

                  "emitDate": "2024-11-21T20:59:36.592Z",

                  "name": "tAnswered",

                  "value": 5542

                },

                {

                  "emitDate": "2024-11-21T20:59:44.788Z",

                  "name": "tTalk",

                  "value": 8196

                },

                {

                  "emitDate": "2024-11-21T20:59:44.788Z",

                  "name": "tTalkComplete",

                  "value": 8196

     

    Thank you,

     

    Shirley Byrd

    OA/ITSD

    573-751-6968

    shirley.byrd@oa.mo.gov

     






  • 5.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 11-27-2024 11:18
    No replies, thread closed.

    Thats interesting, I haven't worked with Qualtrics at all so I am going to defer to the community to provide some insight. 

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 6.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 12-20-2024 03:05
    No replies, thread closed.

    Hi Shirley,

    Not sure if you have resolved this yet, but as it appears the metrics are being output correctly I would check with Qualtrics how to parse the data.  There is some resources on the Qualtrics website that may help.



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 7.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

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

    I need to parse the data in Genesys before sending to Qualtrics.  I am sending the values to Qualtrics not the raw json.



    ------------------------------
    Shirley Byrd
    Network Infrastructure Spec
    ------------------------------



  • 8.  RE: /api/v2/analytics/conversations/${input.conversationId}/details
    Best Answer

    Posted 01-02-2025 16:18
    No replies, thread closed.

    I take you are using a data action and just want to assign those to variables in architect?

    In your data action you will want something like this under configuration response:

    Contracts:

    And that should assign tAcw value to a variable tAcw which you can then use in an architect flow as your input to qualtrics data action.



    ------------------------------
    Anton Vroon
    ------------------------------



  • 9.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 01-03-2025 16:27
    No replies, thread closed.

    Thanks Anton -yes I am using a data action - when I modify using your suggestion I am getting an error - 

    {
      "message": "Transform failed to process result using 'successTemplate' template due to error:'Unexpected character ('}' (code 125)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 11]'\n Template:'{ \"tAcw\": ${successTemplateUtils.firstFromArray(\"${tAcw}\")}}'.",
      "code": "bad.request",
      "status": 400,
      "messageParams": {},
      "contextId": "fee5bced-b253-481a-80d7-45c60ced68e9",
      "details": [
        {
          "errorCode": "ACTION.PROCESSING"
        }
      ],
      "errors": []
    }
    t

    This is what I have for my response

    {
      "translationMap": {
        "tAcw": "$.participants[0].sessions[0].metrics[?(@.name == 'tAcw')].value"
      },
      "translationMapDefaults": {},
      "successTemplate": "{ \"tAcw\": ${successTemplateUtils.firstFromArray(\"${tAcw}\")}}"
    }



    ------------------------------
    Shirley Byrd
    Network Infrastructure Spec
    ------------------------------



  • 10.  RE: /api/v2/analytics/conversations/${input.conversationId}/details

    Posted 01-05-2025 15:12
    No replies, thread closed.

    I'm guess for that result the value wasn't there, and yes no default is set so we get an error. For First from array you set defaults like so:

      "successTemplate": "{ \"tAcw\": ${successTemplateUtils.firstFromArray(\"${tAcw}\", \"0\")} }"

    Check out the velocity macro page to see some more examples: https://help.mypurecloud.com/articles/velocity-macros-data-actions/#firstFromArray

    Also make sure your output contract have the right types assigned for the values you are mapping.

    If you are using a different API than the one In the screenshot then of course the path will be different too.

    If able, can you include the raw results output, along with the contract setup and the API url you are using, would help with trouble shooting further.



    ------------------------------
    Anton Vroon
    ------------------------------



Need Help finding something?

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