- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 12:12 AM
Callback report API needed which will return processed (success/ failed) callback request from system.
Solved! Go to Solution.
- Labels:
-
Webex Contact Center APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2022 02:13 PM
Hi Dimple,
The HTTP node was misconfigured, it needs to have the JSON parse - one cannot set that to null.
Also you cannot have comments in there because it is a string value.
Also you have to
escape quotes i.e \"something\"
You may use something like GraphQL to JSON to help with the same
I have corrected the script and here is the sample script - please convert the .TXT to .JSON
Please correct - Data center - from US1 to ANZ1
and Org Id, Token etc
Thanks & Regards,
Arunabh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 05:41 AM
That is because you have set the url to
It has to have a path i.e /search
https://api.wxcc-anz1.cisco.com
needs to be
https://api.wxcc-anz1.cisco.com/search
Hence the 404 - URL not found
https://developer.webex-cx.com/documentation/search/v1/search-tasks
Regards,
Arunabh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2022 02:13 PM
Hi Dimple,
The HTTP node was misconfigured, it needs to have the JSON parse - one cannot set that to null.
Also you cannot have comments in there because it is a string value.
Also you have to
escape quotes i.e \"something\"
You may use something like GraphQL to JSON to help with the same
I have corrected the script and here is the sample script - please convert the .TXT to .JSON
Please correct - Data center - from US1 to ANZ1
and Org Id, Token etc
Thanks & Regards,
Arunabh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 05:54 PM
Hi Arunabh,
Thanks for your reply.
I have tested your callflow too, now I am getting 401 error code, I do have updated orgid & token & ANI according to my test environment. But still no luck. Please guide.
please convert the .TXT to .JSON
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 05:43 AM
I had tested it on US1 so it is api.wxcc-us1.Cisco.com
The 401 will be because the token needs to match the org and datacenter url
I.e api.wxcc-anz1.Cisco.com
Thanks & Regards
Arunabh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2022 03:19 PM
Hi Arunabh,
Appreciate your patience.
Sorry for that mistake, now I am getting 404 error code.
please convert the .TXT to .JSON
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2022 09:03 PM
Hi Arunabh,
I am looking forward for your response.
Thanks
Dimple Saggi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2022 05:23 PM - edited 09-26-2022 05:26 PM
Hi Arunabh,
I understand Token management can't be direct, but my question was on Search Tasks API , how to call that API with graphql query from http node (or postman)
Menas what would be the values for query parameter:
curl --request POST \
--url 'https://api.wxcc-anz1.cisco.com/search?orgId=97cdbf45-ebe2-4687-8341-44d5c7abf101' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '
{
"query": "",
"extensions": {
"persistedQuery": {
"version": "",
"sha256Hash": ""
}
}
}
'
Looking forward for your response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2022 02:58 PM
Postman has native support for GraphQL
You can convert the GraphQL query to curl and that will be stringified under the query object.
An example:
curl --location --request POST 'https://api.wxcc-us1.cisco.com/search' \
--header 'Authorization: Bearer
--header 'Content-Type: application/json' \
--data-raw '{"query":"{task(from:1663732800000, to:1664241412732) {tasks{id}}} ","variables":{}}'
The query for callback fields for example will be like so
curl --location --request POST 'https://api.wxcc-us1.cisco.com/search' \
--header 'Authorization: Bearer
--header 'Content-Type: application/json' \
--data-raw '{"query":"{\n #FILTER: Get the Task details using CallBack filters and logical operators to match a condition\n task(\n # NOTE: from and to are mandatory arguments that take the Epoch timestamp in milliseconds\n from: 1663732800000 #This can be set to Date.now() - (days * 24 * 60 * 60 * 1000) for lookback in days\n to: 1664315734533 #This can be set to Date.now() in millis\n #Add a filter that checks if a Callback was made and with a status\n ) {\n tasks {\n callbackData {\n callbackRequestTime\n callbackConnectTime\n callbackNumber\n callbackStatus\n callbackOrigin\n callbackType\n }\n }\n }\n}","variables":{}}'
This is by pasting this example – https://github.com/CiscoDevNet/webex-contact-center-api-samples/blob/main/graphql-sample/callbackFilter.graphql
Into graphQL on postman and then converting it to a raw request to display the curl.
This is what you would configure in the HTTP Client node on flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2022 05:14 PM
Hi Arunabh,
Thanks for your reply.
I found postman help too, but getting 500 error code while search API from http request node from callflow.
I do have uploaded callflow json file, please remove postfix .txt from file, as system didn't allow me to upload json file here.
Please correct me if HttpRequest node need different settings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 06:48 AM
Hi Dimple,
Is this query regarding the search API?
If yes, then please use this example posted on Github for callback reporting data.
Since this is powered by GraphQL - you can remove/adjust the filters and add more fields you want in the task details.
Thanks & Regards,
Arunabh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2022 03:56 PM
Hi Arunabh,
Thanks for your reply.
We are looking for a workaround, to prevent duplicate ANI from Callback list, until callback has been processed on that ANI. So we need some API which will either show unprocessed callback list or processed callback list, so we can check ANI through that API before making callback request on same number. Also please do share postman request snips that will be easier to understand.
Looking forward for your response.
Regrads
Dimple Saggi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2022 04:45 PM - edited 09-26-2022 04:59 PM
Hi Arunabh,
I do have tried graphql at search API, is there any way we can call this API from http request node from IVR Callflow?
Looking forward for your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2022 05:16 PM
Hi @DimpleSaggi04773 ,
is there any way we can call this API from http request node from IVR Callflow:
Answer is not a direct way today. Workarounds have to be used to do so.
One will need to host a token management service middleware to be able to call it.
So short answer is: today there is no straight forward way. If you want to view more details on the workaround you can refer to the token management example - https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/token-app-sample
we have used such services to call APIs using flow. Again, this is a workaround. The feature is still on the roadmap.
