Jump to content

Cisco Finesse UDF


rcmaehl
 Share

Recommended Posts

Hi all, 

Recently my work swapped from Cisco CTIOS to Finesse. This completely threw me off as I had been automating the Win32 application and I had never done IUIAutomation before. As such I've been messing around with the API and will be adding code as I figure it out. While I do have Supervisor access, I will likely not be adding functions for those features yet.

Currently Available Functions:

User API - Query and Set User Info

Spoiler

_FinesseGetCalls($sAPI, $sUser, $sPassword)

  • Gets a list of Calls and other Dialog for a User

_FinesseGetReason($sAPI, $iID, $sUser, $sPassword)

  • Gets a specific reason assigned to an ID

_FinesseGetReasonList($sAPI, $sState, $sUser, $sPassword)

  • Gets available reasons for States that require it

_FinesseGetState($sAPI, $sUser, $sPassword)

  • Gets Agent State

_FinesseGetUser($sAPI, $sUser, $sPassword)

  • Gets Agent Information

_FinesseGetUsers($sAPI, $sUser, $sPassword)

  • Gets a list of all users

_FinesseGetWrapUpReason($sAPI, $iID, $sUser, $sPassword)

  • Gets a specific WrapUp reason assigned to an ID

_FinesseGetWrapUpReasonList($sAPI, $sUser, $sPassword)

  • Gets available reasons for WrapUp that require it

_FinesseLogin($sAPI, $sUser, $sPassword, $iExtension)

  • Logs agent in with LOGIN status at the requested Extension
  • Works but won't sign you into the Web App

_FinesseLogout($sAPI, $sUser, $sPassword)

  • Signs agent out with LOGOUT state

_FinesseMobileLogin($sAPI, $sUser, $sPassword, $iExtension, $sMode, $iForward)

  • Logs agent in with LOGIN status at the requested Extension
  • Redirects calls to Listed Mobile Number
  • Works but won't sign you into the Web App

_FinesseSetState($sAPI, $sState, $sReason, $sUser, $sPassword)

  • Sets Agent State
  • Leave $sReason blank for states not requiring it

Dialog API - Query and Set Call and other Dialog Info

Spoiler

_FinesseGetCall($sAPI, $iID, $sUser, $sPassword)

  • Gets Call or other Dialog Details

_FinesseMakeCall($sAPI, $iFrom, $iTo, $sUser, $sPassword)

  • Places a call through your Soft or Hard Phone
  • Phone may be required to be off hook depending on model
  • Call Variables support planned

Queue API - Query Assigned Queues

Spoiler

_FinesseGetQueue($sAPI, $iID, $sUser, $sPassword)

  • Gets a Specific Queue

_FinesseGetUserQueues($sAPI, $sUser, $sPassword)

  • Gets Queues assigned to a Specific User

Team API - Query Users in a Team

Spoiler

_FinesseGetTeam($sAPI, $iID, $sUser, $sPassword)

  • Gets Users and User info in a specific team



Changelog:

Spoiler

5/03/19

  • Corrected FinesseQueue functions not returning Data on Success

7/11/18

  • Corrected Finesse misspelling in FinesseGetCall, FinesseMakeCall, FinesseGetQueue, FinesseGetUserQueues, and FinesseGetTeam
    SCRIPT BREAKING! Resolution: Replace All Fineese with Finesse

6/25/18

  • Corrected Header for _FinesseGetCall
  • Added Team API including FinesseGetTeam
  • Added Queue APIs including FinesseGetQueue, FinesseGetUserQueues

6/22/18 Ver 2

  • Corrected Include Variable Conflict
  • Corrected Link in _FinesseGetReason
  • Corrected Extra Data in _FinesseGetCall
  • Corrected HTTP  Method in _FinesseGetCall
  • Corrected API URL in _FinesseGetWrapUpReason

6/22/18

  • Updated All Headers to be even more detailed
  • Functions are now Separated per API in the docs
  • Added _FinesseGetCall - Gets call details, returned in XML currently
  • Added _FinesseGetReason - Gets Reason assigned to an ID
  • Added _FinesseGetUsers - Gets a list of All Users
  • Added _FinesseGetWrapUpReason - Gets a specific WrapUp reason assigned to an ID
  • Added _FinesseGetWrapUpReasonList - Gets available reasons for WrapUp that require it

6/21/18

  • Added _FinesseLogout
  • Corrected issue with Mobile Agent Login
  • Corrected issue with Setting State returning error incorrectly

6/20/18 10:00 EST

  • Added _FinesseMobileLogin
  • Updated all Function headers to be accurate and detailed
  • Moved Download to Downloads Section

6/19/18 08:00 EST

  • Minor fix to _FinesseGetUser header
  • Added _FinesseGetReasonList, currently returns XML

6/18/18 08:00 EST

  • Added _FinesseGetUser, currently returns XML
  • Added _FinesseMakeCall, call variable support to be added

6/15/18 08:00 EST

  • Added Missing <String.au3> requirement
  • Added _FinesseLogin() - NOTE: Won't sign you into the Web App, just Finesse
  • Functions now return True on success unless otherwise stated

6/14/18 11:30 EST

  • Initial Release

 

Download:

 

Support:

Support for this UDF can be obtained in my Discord Server

Edited by rcmaehl
Add support link

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

I will keep an eye on this project.
In the meantime, could you provide a link to  Finesse reference documentation ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

35 minutes ago, mLipok said:

I will keep an eye on this project.
In the meantime, could you provide a link to  Finesse reference documentation ?

Here's what I'm using

https://solutionpartner.cisco.com/media/finesseDevGuide2/

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Updated:

  • Added Missing <String.au3> requirement
  • Added _FinesseLogin() - NOTE: Won't sign you into the Web App, just Finesse
  • Functions now return True on success unless otherwise stated because Finesse doesn't return anything other than HTTP 202
Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Updated:

  • Added _FinesseGetUser, currently returns XML
  • Added _FinesseMakeCall, call variable support to be added

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Updated:

  • Minor fix to _FinesseGetUser header
  • Added _FinesseGetReasonList, currently returns XML


@mLipok Since you're following, anything you'd like to me prioritize adding? Currently, I've only added stuff I've needed in my own scripts.

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

I do not have access to CISCO, but the project is interesting.

I think soon I will be happy :) do add your UDF to WIKI page ...

btw.
You should add some internal COM Error Handler.

EDIT:
I know that your UDF is currently small and it's just getting better, but if you will be ready you should post this code here:

https://www.autoitscript.com/forum/files/category/19-social-media-and-other-website-api/

As this is a good place for users to search updates for UDF's.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Updated:

  • Added _FinesseMobileLogin
  • Updated all Function headers to be accurate and detailed
  • Moved Download to Downloads Section

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

super fine.

but I do not think that "Databases and web connections" is correct place for this UDF , for this I sugested other group.

This should be consistent with Wiki
https://www.autoitscript.com/wiki/User_Defined_Functions#Databases_and_web_connections

And when I look there then I see one "releated" UDF in:
https://www.autoitscript.com/wiki/User_Defined_Functions#Hardware

I thought about: _FB_Tools - manage your FritzBox from Autoit

But maybe you have right, could you explain your choice ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

34 minutes ago, mLipok said:

But maybe you have right, could you explain your choice ?

I had based my choice on what was currently in the Downloads page under the existing categories: https://www.autoitscript.com/forum/files/categories/

I feel like this might fit under IT Administration since it's mainly something HelpDesks/ServiceDesks will be using, however I didn't see an appropriate sub category.

The category of Social Media and other Website API felt like more like publicly accessible pages and API in which anyone could access from anywhere compared to a local server that shouldn't have the Cisco API available to the public, only authenticated users.

Internet protocol suite might have worked but was mainly used for big Protocols so far (UDF, TCP, POP, IRC)

I chose Databases and web connections, for the web connections part. Databases generally aren't directly publicly accessible which Finesse also follows as it should only be accessible within a local network. I'll take a look at the Wiki and see if there's a better grouping based on what's on the Wiki. 

Hardware definitely feels like a better fit than Social Media and other website API though

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Updated:

  • Added _FinesseLogout
  • Corrected issue with Mobile Agent Login
  • Corrected issue with Setting State returning error incorrectly
  • Download is now located in the Hardware section of Downloads
Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

6/22/18

  • Updated All Headers to be even more detailed
  • Functions are now Separated per API in the docs
  • Added _FinesseGetCall - Gets call details, returned in XML currently
  • Added _FinesseGetReason - Gets Reason assigned to an ID
  • Added _FinesseGetUsers - Gets a list of All Users
  • Added _FinesseGetWrapUpReason - Gets a specific WrapUp reason assigned to an ID
  • Added _FinesseGetWrapUpReasonList - Gets available reasons for WrapUp that require it

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

6/25/18

  • Corrected Header for _FinesseGetCall
  • Added Team API including FinesseGetTeam
  • Added Queue APIs including FinesseGetQueue, FinesseGetUserQueues

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

7/11/18

  • Corrected Finesse misspelling in FinesseGetCall, FinesseMakeCall, FinesseGetQueue, FinesseGetUserQueues, and FinesseGetTeam
    SCRIPT BREAKING! Resolution: Replace All Fineese with Finesse

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

  • 9 months later...

5/03/18

  • Corrected FinesseQueue functions not returning Data on Success
Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

  • 1 year later...

Is there any examples to reference this UDF. 
I am trying to make a script that will get the current phone state. For example, If I am logged in and ready to receive a call I want to make a script that gives me a always on display icon of a green Phone Icon, and if its Not Ready I want a red phone icon with the reason code - Phone failure, Not ready- missed call, etc. I am struggling to get started with this project and would like a basic reference example. 
 

Also is this UDF for Cisco Finesse desktop client or web application?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...