I'm currently struggeling with the "Make REST Call" step in CCX Script.
Within the REST step properties, we can select the Method and Parameters.
I need to do a POST to another database.
Problem is that when I add parameters, then these will be added to the Request URI instead to be put in the body.
However, when I want to add the "parameters" in the body field then script editor doesn't allow me to do so.
I'm even not sure which format CCX is expecting there as everything I've tried has been rejected by the Editor...
Compared to the Postman Code, where we have the Body included, it's not working correctly with the CCX script.
Here's a snippet from Postman in code format:
POST any address HTTP/1.1
Host: any host
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="messageTypeCode"
Content-Disposition: form-data; name="originTelNumber"
Content-Disposition: form-data; name="targetUser"
Compared to the actual Request by CCX, it is looking in Wireshark the following:
Request URI Query: messageTypeCode=any value&originTelNumber=any number&targetUser=any user3DCall+Manager+User%2Cid%3Danyuser%2Cauthenticated%3Dtrue%5D
How do I get these "content-disposition" fields above into the actual POST request by CCX Script correctly?
Thanks in advance
Solved! Go to Solution.
thanks a lot!!
The function is now working! :)
Two things... I had also to add the "Accept-Encoding" Header to the script as well as adding another line seperator, before the actual values are written.
Now, I'm fighting with another scenario... because, this request was now to search for customer information, open a call ... but now I need to send the same request (different in type), once the call is finished or the callee hangs up.
Any idea how I can stay on the script instead of dropping out of the Script, once the call is established?
I am using the Select Resource > Connected Step as the time when the first request will be sent. Once call is established, the script goes through the rest and reaches End step. In this between I have the CallEnd request but it shouldn't send it directly, instead it should wait until the call is closed.
I dont think the call end function is something you can do from UCCX script point of view, i will do some more research on this if this can be done from script.
But i think you can do it from Agent Desktop client, what is the Agent Desktop you are using? CAD or Finesse?
then it would be easy to do it i guess:
In Cisco Finesse Administration --> Workflow --> create a workflow which kicks when call ends.
in the Action perform HTTP Request --> POST and define the parameter body you are looking to use. you can also use call variable to add data to the body dynamically.
and assign the workflow to Agent Team.
I will have working sample for you and meanwhile you can also explore the option.
thanks a lot again!
This worked great and I am now able to do request for incoming call as well as call end. Great!
I think we can see this case as closed :)
Many thanks again!!