cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2204
Views
10
Helpful
5
Replies

UCCX Script with Web Services

Dear Experts,

We have a scenario to integrate our UCCX with a third party solution (say XYZ) through web services. The caller will enter a 3 digit code allocated to them and UCCX script will query the application through a web service. Upon receiving the positive response the script will continue.

 

I am zero knowledge in Java. What is the best method to do it?

 

Thanks

5 Replies 5

Hi Abdul,

Based on the information’s that you have provided, it is hard to recommend something. Below you can find some tips that you can use:

  1. The UCCX scripting tool has a built-in element design to make REST calls – “Make REST Call”. This element allows to make GET, POST, PUT, DELETE requests. It also allows you to define custom headers and is designed to use Basic Authentication. In most cases it works. If the Web Service will be available via HTTPS then the certificate has to be imported to UCCX trust store. The response that you receive, needs to be parsed/extracted. UCCX has a built-in element for XML and JSON response formats.
  2. For more complex Web Services, the best option is to build custom client library (as a jar file) that is imported to UCCX jar repository. Then in the script you can call specific methods that will do the logic behind. But this requires some developer skills. As you mentioned, you don’t feel good with this so you can use client code generators/tools that are available online.If the API is REST and the response is in JSON format then you can use a tool called Swagger Editor to generate the code (https://editor.swagger.io/). What you will need to do is to describe API using a user-friendly structure (in JSON or YAML). Based on this description, you can generate the Java library. If the WebService uses SOAP, then the you can use tool called SOAP UI. The tool can prepare the description of the WS based on the WSDL file. Furthermore, it can generate the client Java code. Here is the useful link: https://www.soapui.org/soap-and-wsdl/soap-code-generation.html. When you use this method, you need to keep in mind that whenever the WS definition changes, you will need to recreate the client library to keep everything consistent.
  1. Usually, before I create the integration, I do some prototyping to check the answer format delivered by WebService. For this I use Postman.
Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Hi folks,

 

I've similar requirement to integrate UCCX 12.x with SOAP Web-services. I just need guidance to start with setting up UCCX communication with web-service. I am not developer but just want to explore how it can be done.

 

My scenario is like;

  1. UCCX sends request to webservice
  2. Web-service responds to UCCX within the variables.
  3. Announce to caller the Success or Failure.
  4. End Call.

thanks and regards,

Ritesh Desai 

*** Please rate helpful post. Please mark as answer if it solves your problem/query.
regards, Ritesh Desai

I'm pretty sure that @Graham Old  has an example of using a SOAP API (CUCM serviceability API specifically) from within a script:
https://github.com/CCXSample/CCX-Queue-Name-on-Agent-Phone

@Anthony Holloway thanks for response.

 

I want to consume HTTP web-service in UCCX script so when the call arrives on UCCX script, the caller will authenticate based on personal PIN, using HTTP web-service integrated the request will go to 3rd party server and verify the PIN. the 3rd party server will send response and stored to UCCX variable. Based on response the caller will be treated.

 

So I am trying to setup HTTP webservice in UCCX. I am not sure if this functionality is available in UCCX. if not, will the REST CALL would work?

 

regards,

Ritesh Desai

*** Please rate helpful post. Please mark as answer if it solves your problem/query.
regards, Ritesh Desai

The functionality should be there, yes. The details on how are all that you need to figure out. Start first with understanding the communication between client and server to auth a user via PIN input, and then using that knowledge, you could possibly do this in one of three ways inside of UCCX:

1) Using a URL[] document cast to a string
2) Using Java code (either internal inside of Set and Do steps or external loaded as a JAR)
3) Using the Make REST Call step. Despite the name of the step, it does more than REST interactions. In fact it's almost a general purpose HTTP client.

Parsing the output will depend on what it looks like when it comes back. For example, if the result of the PIN auth is either SUCCESS or FAILURE, then a simple substring check on the response body is all you need. However, if it's more complex, you might need to parse the XML, which UCCX can do natively.