Data Action - Get value from JSON output fro

Greetings Team

Hi all,
hope someone can assist, i am getting Wrap-up value via API =/api/v2/conversations/calls/${input.conversationId}

data is returned in JSON format and require only the Wrap-up code value to assign to an output.

i have attached a screenshots of what I did in DA, hoping someone is able to guide me in the right direction.



Hi @mohannad_haddad

You need to use JSON-Path expression in the response configuration template then you can configure you contracts based on the response.

So your response configuration should be something similar to this:

{
  "translationMap": {
    "wrapupcode": "$.participants[?(@.purpose==\"agent\")].wrapup.code"
  },
  "translationMapDefaults": {
    "wrapupcode": "\"[]\""
  },
  "successTemplate": "{\"particpantId\":${successTemplateUtils.firstFromArray(${participantId},\"\")}}"
}

And your contracts should be similar to this:

Hope this could help.

@mostafaawad thank you for your response, I tried it and its working fine, Now I would like to see how I can list multiple values that returned from AP, to Script drop down list

See if this thread can help you get the results into a drop-down list:

unfortunately I tried and It didn't work as its still show me the returned array result in one line, I'm looking to how

to fill the drop down list with the returned data,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.