06-02-2023
08:35 AM
- last edited on
06-22-2023
07:41 AM
by
Paul Zimmerman
Hi Team,
I am new member in the cisco finesse.
I am working on one requirement to make call from our Dynamics 365 (CRM) screen to customer (click to call). Dynamics 365 has customer detail with phone number. As of now user has to type phone number into cisco finesse app after reading from dynamics 365.
I am trying to built "click to call" solution in CRM, custom button using javascript make call thru cisco finesse API. I have tried connecting API thru postman based on cisco finesse development guide but I am facing 400 error.
Any help or correct direction would help. Appreciate your support.
06-24-2023 08:53 AM
Hi,
If you are getting a 400 error, it usually means there is something missing/invalid in your request. Here is the documentation for making a call: https://developer.cisco.com/docs/finesse/#!dialog%e2%80%94create-a-new-dialog-make-a-call/dialogcreate-a-new-dialog-make-a-call
Also, make sure that the user making the call is signed in: https://developer.cisco.com/docs/finesse/#!user%e2%80%94sign-in-to-finesse
Can you paste/screenshot your API request here?
Thanx,
Denise
06-27-2023 05:27 AM - edited 07-05-2023 05:14 AM
Hey
Remember if it is an UCCX you have to use the port 8445
Dialog—Create a New Dialog (Make a Call) - Finesse - Document - Cisco Developer
With Jquery:
var settings = {
"url": "https://<your server>l:8445/finesse/api/<userId>/Dialogs",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/xml",
"Authorization": "Basic 1234567890"
},
"data": "<Dialog>\r\n <requestedAction>MAKE_CALL</requestedAction>\r\n <fromAddress>1001</fromAddress>\r\n <toAddress>1002</toAddress>\r\n</Dialog>",
};
$.ajax(settings).done(function (response) {
console.log(response);
});
This code is from postman where agent 1001 is making a call to 1003 (an working)
The authorization is the agents username and passwordas basic auth (Not 1234567890 :-)).
The from address is the agents extensions, and the to address is the number the agent is calling.
As Denise is write. The agent has to be logged in
Without jQuery (Fetch method) :
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/xml");
myHeaders.append("Authorization", "Basic 1234567890");
var raw = "<Dialog>\r\n <requestedAction>MAKE_CALL</requestedAction>\r\n <fromAddress>1001</fromAddress>\r\n <toAddress>1003</toAddress>\r\n</Dialog>";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://<your server>:8445/finesse/api/User/<userId>/Dialogs", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
06-27-2023 05:40 AM
And screenshot from postman
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