cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1569
Views
25
Helpful
10
Replies

Workflow for UCCX Finesse API

John Powell
Level 1
Level 1

Working on a UCCX 12.5 Workflow for a custom API.  IN finesse Administration, I have created the Workflow and Workflow Action. The goal here is to pull some date from the customer's database and populate that data in the agent's Finesse when the call arrives (e.g. Name, Address, Customer Number)

 

The URL is working fine as the data will work as a screen pop (although it's unformatted).  But I cannot figure out what needs to be in the Body to populate finesse properly.

 

Cannot find documentation on this and TAC was not helpful except to prove that the data is being pulled by the API.

Thanks!!

10 Replies 10

You're on the right track, but using the wrong feature. You're not going to be able to use the workflow to then populate the UI. You're going to need a custom gadget for that. Check out this repo https://github.com/CiscoDevNet/finesse-sample-code/tree/master/ExternalRestApiSampleGadget which will give you 99% of what you need to accomplish the same thing.

 

david

David is correct. Using the HTTP Request in the workflow just makes the request and does not allow you to get the response body data back. The only way is to build a custom gadget.

 

I agree that using the ExternalRestApiSampleGadget would be the best. In this sample, the REST API request is triggered when there is a new call (handleNewDialog). You can move the REST API call to the right place depending on when you want the request to be made. You can take a look at the ScreenPopSampleGadget (https://github.com/CiscoDevNet/finesse-sample-code/tree/master/ScreenPopSampleGadget) to see how to obtain the callvariables in the javascript.

 

Thanx,

denise

So I am looking at the Screen Pop gadget you provided as a solution.  To me, it seems to do the same thing I can accomplish in the Workflow configuration when I choose Screen Pop.  In both cases, we would get a new new window with the data.  Forgive my ignorance here, but I still do not understand which gadget will retrieve the data we want from the customer-provided URL and populate the call variables we are already presenting to the agent (e.g. Calling Number, Queue Name) on the same screen.  We simply want the rest of the data to populate along with that (e.g. Name, Address, Account).  

Hi,

 

Yes, the Screen Pop is just like the workflow configuration. I pointed the ScreenPop Sample Gadget so you can see the code on how to access the callvariables.

 

If your purpose is to call a third party REST API to populate the callvariables, you may want to take a look at the Make REST Call from the CCX Scripting. Then you won't have to build a custom gadget.

 

If you do decide to build a custom gadget for Finesse, you will need to do the following:

1. Set up the gadget to trigger the REST API at the right time (ie. when a call arrives, when a call ends, etc). The code in the ScreenPopSampleGadget might be useful for this.

2. Call the REST API. The code in the ExternalRestApiSampleGadget will be useful for this.

3. Take the response from #2 and update the callvariables. The code in UpdateCallVariableDataSampleGadget will be useful for this.

 

I hope that helps.

 

Thanx,

Denise

After re-reading this thread I'm not 100% sure I understand the original issue. What Denise and I are solving for is this:

- Call comes in.

- API is called to retrieve some data.

- API Data and cal data is passed on to a screen pop in a CRM.

 

Is this not what you're doing?

 

david

Hi David,

 

I think John actually wants this:

 

- Call comes in

- API is called to retrieve some data

- Use the results of the API call to update the call variables so that it shows up in the existing call control details

 

This should be able to be accomplished via scripting correct? I mean, it can also be done with a custom gadget too, but the scripting might be cleaner?

 

Thanx,

Denise

 

Yes, then he doesn't need a custom gadget just a REST step in the scripting to make the request and get the data to write.

 

david

David:  Thanks for the response, and Denise is correct in what I am looking for.  I did get this working using the Screen Pop, but I really want to understand the REST step so I can do this within the script.  I agree this would be much cleaner! I need to see some documentation and/or sample script of this to figure it out.  Does anyone have this available?  Thanks so much!!

@david.macias would be the best person to point you in the right direction, but I do know there is a Make REST Call step: https://developer.cisco.com/docs/contact-center-express/#!make-rest-call/make-rest-call

 

Thanx,

Denise

@John Powell yeah I can help with making a REST call, can you help me understand what you’re stuck with? That way I can focus on the specifics. One thing to note, if your backend system utilized OAUTH (like SFDC), then things get sooooo much harder, but it’s still plausible to do it in UCCX.

 

david

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: