How to return json to output variable from data action /api/v2/analytics/conversations/details/query

I'm currently calling a data action using below config

Request URL Template
/api/v2/analytics/conversations/details/query

Headers
image

Request Body Template

{
"interval": "${input.Interval}",
"order": "desc",
"orderBy": "segmentStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "callbackNumber",
"operator": "matches",
"value": "${input.CallbackNumber}"
},
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "${input.QueueId}"
},
{
"type": "dimension",
"dimension": "segmentEnd",
"operator": "notExists"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "callback"
}
]
}
],
"conversationFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "conversationEnd",
"operator": "notExists"
}
]
}
]
}

Response

{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "${rawResult}"
}

Action Contracts

Json Results

Question:

  1. how would I return the list of conversation ids under "conversations.conversationId" as a variable in the Architect Flow.

Hi N03xCu53,

You are going to need to use the translation map to gather the conversation IDs and then insert them into a response template.

If you haven't already, I did a devcast a while ago that will hopefully help you get going with Data Actions:

--Jason

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