Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: luchosrock on February 15, 2013, 02:51:33 PM

Title: [SOLVED] Action code for NotReady state
Post by: luchosrock on February 15, 2013, 02:51:33 PM
Hi guys, i have two questions, but related to the same:

[b]1.[/b] How can i set the Action code for a Not Ready state from a softphone application (let's say [i]bathroom[/i] or [i]lunch[/i])?
  I have them set in Configuration manager like this:
  [b]Configuration>Resources>Action Codes[/b]

[b]2.[/b] How can i retrieve all Action Codes set in configuration manager from my agent desktop application?

I'm using VB.net but an answer in C# or Java is also well received  :)

Thanks in advance
Title: Re: Action code for NotReady state
Post by: cavagnaro on February 15, 2013, 02:59:55 PM
Not by SDK by default, what I do is do a query on the cfgserver DB and then get those codes to be displayed
Title: Re: Action code for NotReady state
Post by: luchosrock on February 15, 2013, 03:17:56 PM
Thanks for the quick reply cav. How can i send the action code whenever i set NotReady state?
I'm currently using a RequestAgentNotReady and sending a response IMessage and it works fine, but i don't know how to add the reason information to the notReady state.
Title: Re: Action code for NotReady state
Post by: cavagnaro on February 15, 2013, 03:50:54 PM
Please search in the forum, we discussed this many many times
Title: Re: Action code for NotReady state
Post by: luchosrock on February 15, 2013, 06:40:18 PM
I already searched in the forum and i found some useful stuff, but i don't know if i am implementing it right, because the questions in that case were too specific and most of it refered to the CCPulse.
Anyway my implementation of it was like this, please correct me if i'm wrong:
[code]
        Dim reqAgentNotReady As RequestAgentNotReady
        reqAgentNotReady = RequestAgentNotReady.Create()
        reqAgentNotReady.ThisDN = DN 'value of DN
 
      ' Here is the part i don't know if it's wright
      Dim reqReasons As New KeyValueCollection
        reqReasons.Add(reasonCode, "1")
        reqAgentNotReady.Reasons = reqReasons
        '
        Dim response As IMessage
        response = Me.protocolManagementService("TServer").Request(reqAgentNotReady)
[/code]

BTW i'm using Platform SDK 8.1 for .NET development
Title: Re: Action code for NotReady state
Post by: Kubig on February 18, 2013, 08:32:04 AM
As a developer/programmer you have to identify how to implement some logic from DLL which you referencing in your project. This implementation depends on layer that you are using for develop your app (Platform,Enterprise,Interaction,..) . I think,if you are able to develop for example login process and further,you must be able to develop this simple process.
Title: Re: Action code for NotReady state
Post by: luchosrock on February 18, 2013, 01:16:30 PM
I could successfully send the reason code and monitor it through the CCPulse, setting the reasons in requestAgentNotReady object as a KeyValueCollection of Strings.
[code]
        Dim reqAgentNotReady As RequestAgentNotReady
        reqAgentNotReady = RequestAgentNotReady.Create()
        reqAgentNotReady.ThisDN = DNValue
        Dim reqReasons As New KeyValueCollection
        reqReasons.Add(ReasonCodeDescription, reasonCodeKey)
        reqAgentNotReady.Reasons = reqReasons
[/code]

Now for the second question, how could i retrieve the full list of Action codes present in the configuration manager? I already searched for this in the forums with no success.

Ps: Kubig, i'm currently using Platform SDK for .Net.
Title: Re: Action code for NotReady state
Post by: Kubig on February 18, 2013, 01:18:35 PM
You have to using CfgQuery which allows to you retrieve required objects from configuration
Title: Re: Action code for NotReady state
Post by: luchosrock on February 22, 2013, 06:15:49 PM
I could retrieve successfully the action codes list for the notReady state, using this:
[code]
Dim queryActionCodes As New CfgActionCodeQuery
Dim ActionCodes As ICollection(Of CfgActionCode)

queryActionCodes.CodeType = CfgActionCodeType.CFGNotReady
ActionCodes = IconfServerConf.RetrieveMultipleObjects(Of CfgActionCode)(queryActionCodes)
[/code]
but it only works for Synchronous, so i can't use the WarmStandbyUri :/