Nathan_Tossens | 2019-03-13 11:00:41 UTC | #1
Dears,
I created a Data Action that use the external contact api of PureCloud.
Here is the Data action Config :
Input Contract : { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Get External Contact Request", "description": "Get the external contact based on the query", "type": "object", "required": [ "query" ], "properties": { "query": { "type": "string", "description": "the Query" } } }
Output Contract :
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Get External Contact response", "description": "The title of the external contact (will containt all the info about NameOfPos etc", "type": "object", "properties": { "entities.title": { "type": "string", "title": "Title", "description": "Title of the exeternal contact" }, "entities.firstName": { "type": "string", "title": "firstName", "description": "firstName of the exeternal contact" } } }
Action configuration response : { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}
and finally the URL I call : /api/v2/externalcontacts/contacts/?q=${input.query}
When Testing via the "Run action", both of my fields are filled with the correct data . The entities title and the entities firstName.
When calling this data action from a call flow it seems that the succes output are empty even if I hardcode the input value with a value that works with the "Run action " button.
Do you know where it can comes from?
Thanks in advance for your help.
Nathan_Tossens | 2019-03-13 12:00:49 UTC | #2
I found out the solution, the problem was with my response configuration. For the ones who would have the same kind of problem here was my response configuration that solved the issue : { "translationMap": { "title": "$.entities[0].title", "firstName": "$.entities[0].firstName" }, "translationMapDefaults": {}, "successTemplate": "{\n \"entities.title\": ${title}\n,\n \"entities.firstName\": ${firstName}\n}" }
Thanks anyway for reading.
Kind regards,
system | 2019-04-13 12:00:50 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 4773