Webex CC How To Parse Data from HTTP Response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2022 06:57 AM
I have created a custom Connector to retrieve information from an API. The HTTP Status Response is 200 and on the API side I can see the correct response has been sent. But, I am not able to parse the data. Below is the start of the response:
{
"success": true,
"data": {
"activityDate": "2010-04-24",
"currentRelationshipCode": 0,
"divLastYearNonTax": 2585.68,
In the Node, in the the Parse Settings section, I have set the Content Type to be JSon and in the Path Expression I have tried:
$.data.currentRelationshipCode
$.currentRelationshipCode
$.success
But so far nothing has worked. There are no logs to indicate what the problem might be or if I am even getting the correct response back. I need help
- Labels:
-
Other Contact Center Topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022 09:29 AM
this page has video and sample Json parsing
Hope it helps
https://wxcctechsummit.github.io/holcct2107/labslive/lab3.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2022 03:44 PM - edited 10-05-2022 03:45 PM
you should read the data like this
data.currentRelationshipCode
or if you have arrays
data[0].currentRelationshipCode
No $ sign
Thanks, Thomas G. J.
