â06-14-2022 06:17 AM
Hi,
I have a UCCX system and have written a script that talks to a CRM API using REST.
The data is returned in JSON format. For most entries I can parse the required data ok using the Get JSON Document Data step but I am having issues with one particular field - parentCompanyID - as shown below.
â06-14-2022 09:47 PM
I think that this solution might work:
â06-15-2022 02:12 AM
Hi Marek,
Thank you for the response. What you have suggested seems logical but I cannot create a variable of type "object" within the CCX editor.
Looking at some of the DevNet documentation it seems that some of the Java steps available previously in CCX have been deprecated.
https://developer.cisco.com/docs/contact-center-express/#deprecated-java-steps
The doc linked above says that the deprecated functionality can be replaced by using the CCX Expression Language is Set steps etc. but that is a bit beyond my skill levels.
I have implemented a workaround where I search the string containing the text of the API response for "parentCompanyID": null using the expression below in an IF step:
strCompanyResponse != strCompanyResponse.contains(u"\"parentCompanyID\":null")
This does what I need but is pretty ugly and I would still be interested in better ways to solve this issue.
Thanks
James
â06-15-2022 07:05 AM
this is how you can create the object type variable (upper/lower case is important here):
â
â06-17-2022 04:59 PM
The way I dealt with it when using SFDC API is that I just checked for null. You can even create a function that checks for null or ââ. This was not ideal, but could work in addition to what Marek suggested.
david
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide