cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2060
Views
20
Helpful
9
Replies

HTTP GET request from Finesse desktop

BrunoAun
Level 1
Level 1

Hi there,

We are trying to integrate our CRM (Oracle Service Cloud) with Finesse via HTTP GET request.

The goal is to trigger the Screen Pop functionality of OSvC passing a Contact ID.

 

We were actually able to accomplish the desired result by using the BROWSER POP Action within Finesse (see screenshot), which causes an undesired browser windows to pop on the Agent's desktop.

We've also tried the HTTP GET action instead, but it didn't trigger the desired event.

 

I read on another thread there is possible to use Javascript's XMLHttpRequest (Ajax) in order to initiate the HTTP request via "HandleNewDialog", but we couldn't find any further details on this matter.

 

I was also told that the HTTP request could be made from Finesse calling an external .EXE via COMMAND PROMPT, but I cannot find this option in Finesse.

 

Any hints / suggestions regarding these two options would be greatly appreciated!

Thank you

 

FINESSE.PNG

 

9 Replies 9

dekwan
Cisco Employee
Cisco Employee

Hi,

 

Let me make sure I understand your situation correctly. You are trying to call Oracle Service Cloud's HTTP GET with a contact Id from the Finesse desktop. You do not want a new window/tab to open from the Finesse desktop, hence you do not want to use the browser pop workflow feature.

 

You can call an external REST API by building a custom gadget. You can start with the ExternalRestApiSampleGadget and customize it to your liking: https://github.com/CiscoDevNet/finesse-sample-code/tree/master/ExternalRestApiSampleGadget.

 

I hope that helps.

 

Thanx,

Denise

@dekwanThe workflow is supposed to open in the same tab/window though, so to me that's the issue. @BrunoAun if you use a more unique name for the Window Name does that reuse the same tab?

 

david

Hi,

 

I tested this out on a 11.6(1) UCCX system. I see from the screenshot you have 11.6(2), but I don't have that testbed available to try. I was able to have the workflow open up in the same window every time it got triggered. I used a simple name called "testing".

 

 

This matches the behavior listed in the Admin guide: https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/finesse/finesse_1251/admin/guide/cfin_b_1251-administration-guide/cfin_b_1251-administration-guide_chapter_01000.html#task_3EAA554250740FFA3C4D9167F98F8F4F

 

Thanx,

Denise

Hello Denise,

 

Thank you for your response, and sorry for the late reply.

AS a matter of fact there was a technical problem with the thread which was disabling the REPLY button for me (now it's clearly fixed).

 

Ok, I just have one question before moving ahead with the Widget implementation.

Instead of calling a REST API, would it be OK to just call a PHP script which is hosted on an external domain?
This script is ready and currently working, except it requires the undesired browser pop from Finesse. 
If I run it directly from Postman for instance, it works perfectly.

https://mchs--tst2.custhelp.com/cgi-bin/mchs.cfg/php/custom/finesse.php?phone=<<< CALLER_ID_VARIABLE >>>

I am assuming there is a way to capture the caller ID inside the widget and pass it to the JS function

 

I look forward to your response

Best regards,

Bruno

Hi,

 


@BrunoAun wrote:

This script is ready and currently working, except it requires the undesired browser pop from Finesse. 
If I run it directly from Postman for instance, it works perfectly.

https://mchs--tst2.custhelp.com/cgi-bin/mchs.cfg/php/custom/finesse.php?phone=<<< CALLER_ID_VARIABLE >>>

I am assuming there is a way to capture the caller ID inside the widget and pass it to the JS function


If you can run it from postman, then I don't see why you can't use it in the externalRestApi sample gadget. Remember that a REST API is just a url that is being requested, so in your case, it is a GET on that url.

As far as the caller id, yes you can. Take a look at this JavaScript method: https://developer.cisco.com/docs/finesse/#!rest-services-dialog/getfromaddress

 

Take a look at the final version of the LearningSampleGadget (https://github.com/CiscoDevNet/finesse-sample-code/tree/master/LearningSampleGadget) to see how to get the dialog object to use the above method. This sample doesn't use the exact one you need, but after you get the dialog object, you should be good to go!

 

Thanx,

Denise

 

Hi Denise,

I just got back to working on this project.

Here's the situation: I ONLY NEED THE CALLER ID so that I can append it to a URI.

 

I understand that i need to work with the getFromAddress() function which belongs to the DIALOG object.

 

Now, referring to the sample gadget, there is a lot going on and I am confused as to how to wire it up.

I JUST NEED THE BAREBONES CODE TO INIT THE DIALOG OBJ AND CALL THE getFromAddress()...

Is there a simpler example of just that available?

 

thank you 

 

Hi,

 

Did you go through the PDF in the learning sample gadget? It explains each step and helps you understand how to build it. 

 

I don't know if it is going to be any better, but you can try the screen pop sample gadget: https://github.com/CiscoDevNet/finesse-sample-code/tree/master/ScreenPopSampleGadget. It doesn't have steps though.

 

Thanx,

Denise

 

 

 

Thanx,

Denise

Yes I read the whole Sample gadget PDF

One more question:

Does the DIALOG obj requires an existent instance of the USER obj in order to be implemented?the documentation is not clear about it, but it seems that it needs the definition of "_user" beforehand

 

var _dialogs = _user.getDialogs({ etc...

 

thanks

Hi,

 

Yes. The user object is instantiated in the init function

 

user = new finesse.restservices.User({
       id: cfg.id, 
       onLoad : handleUserLoad,
       onChange : handleUserChange
});

This user object represents the user that is currently logged in.

 

Thanx,

Denise