Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: MJaskowski on November 19, 2018, 03:46:57 AM

Title: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 19, 2018, 03:46:57 AM
Hello,

I work on new tab in InteractionDetailsRegion.
I want achieve exactly the same tab like Disposition Code tab but with different Buisness Attribute.
I created new Business Attribute - Test1 with Attribute Values: Sample1, Sample2.

I need tab with all behavior based on Disposition Code tab, is any way to get it?
How should I start?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 19, 2018, 09:20:33 PM
Anyone knows something about it?

I checked I think whole guide but no information there about similar situation :(
Generally tree view has been reproduced but I need add/update information to database and isMandatory option is necessary - these are the most important for me.

Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 20, 2018, 05:21:57 PM
Still I need help - maybe any signposts? Any ideas? Any tips?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: Kubig on November 20, 2018, 08:27:49 PM
May be I do not understand your needs well, but if you want to achieve exactly the same as the disposition view provides, what is the reason for overwritting the code at all?
On other hand, you could develop your own view which will cover exactly your needs and wont't be based and depend on existing solution.
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: cavagnaro on November 20, 2018, 08:49:11 PM

I want achieve exactly the same tab like Disposition Code tab but with different Buisness Attribute.




Wouldn't just be easier to send the new Disposition Code Business Attribute value by strategy?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 20, 2018, 09:39:54 PM
Thank you for answers.

"May be I do not understand your needs well, but if you want to achieve exactly the same as the disposition view provides, what is the reason for overwritting the code at all?
On other hand, you could develop your own view which will cover exactly your needs and wont't be based and depend on existing solution."

I can't overwritting the code for Disposition Code view because is not available - I only have access to IDispositionCode, but I do not have everything what I need in this interface.
I don't have body for these methods.

"Wouldn't just be easier to send the new Disposition Code Business Attribute value by strategy?"

I have already sent this value, I have recreated the treeview in which my Business Attribute was placed.

Code: [Select]
          ICollection<CfgEnumeratorValue> readDataList = helper.GetDataFromObjectById(1304, CfgObjectType.CFGEnumerator);

          foreach (var row in readDataList)
                {
                    itemsToFillView.Add(new Class
                    {
                        Name = row.Name
                    });
                }

        treeView.ItemsSource = itemsToFillView;

        public ICollection<CfgEnumeratorValue> GetDataFromObjectById(int dbId, CfgObjectType cfgObjectType)
        {
            ConfServerProtocol confServerProtocol =
                new ConfServerProtocol(
                       new Endpoint(
                                   myUserName,
                                   myIP,
                                   anyPort));

            confServerProtocol.UserName = myUserName;
            confServerProtocol.UserPassword = "password";
            IProtocol protocol = confServerProtocol;
            protocol.Open();

            IConfService confService = ConfServiceFactory.CreateConfService(protocol);
            ICfgObject readObject = confService.RetrieveObject(dbId, cfgObjectType);


            CfgEnumeratorQuery cfgEnumeratorQuery = new CfgEnumeratorQuery(confService)
            {
                Dbid = readObject.ObjectDbid
            };

            CfgEnumerator cfgEnumerator = cfgEnumeratorQuery.ExecuteSingleResult();
            CfgEnumeratorValueQuery cfgEnumeratorValueQuery = new CfgEnumeratorValueQuery(confService)
            {
                EnumeratorDbid = cfgEnumerator.DBID
            };

            return cfgEnumeratorValueQuery.Execute();
        }

But now I have to save these data and I need isMandatory option. That's mean if Agent doesn't select any item in treeView then he gets information/alert about it (orange window message).
I don't know how should I save this data - I read something about AttachedData but I'm not sure how it's work.

Maybe I will explain again more specifically what I mean.
I want to create bookmarks "Call status" and "Source of knowledge" - I will have Disposition Code, Call status and Source of knowledge tabs.
These windows should behave similarly to DispositionCode but with different input data.
Each agent before the end of a call must mandatory select one of the options in these tabs.

I wanted to refer to DispositionCode by copying its behavior - unfortunately I do not have access to this code.
Maybe I think badly and there is another way to solve this topic?


Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: cavagnaro on November 20, 2018, 11:08:30 PM
?? Just send the values selected as Attached Data. Then your Reporting interface will store them if you configure it to catch those KVP
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 20, 2018, 11:25:09 PM
Quote
?? Just send the values selected as Attached Data. Then your Reporting interface will store them if you configure it to catch those KVP

And exactly I read about it but I can't find example of use - how can I call method "Attached Data" - which class handle this area? I cannot find any implementation in guide. Could you share with me this knowledge?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: Kubig on November 20, 2018, 11:50:36 PM
Sorry, but I do not see any difference between your needs and benefits that standard (OOB) Disposition Code solution brings. What is the reason for not using the disposition code? Do not reinvent the wheel...
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MatSzafraniec on November 21, 2018, 01:24:59 AM
Sorry, but I do not see any difference between your needs and benefits that standard (OOB) Disposition Code solution brings. What is the reason for not using the disposition code? Do not reinvent the wheel...

But how we can use standard OOB Disposition Code solution to handling our predefined business attributes?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 21, 2018, 01:26:29 AM
Of course, I just want to use the benefits of DispositionCode, but I need to do it on 2 separate tabs, but still based on DC. And I do not know how to bite it - what class allows me to use this resource?
In general, I understand that it is possible to do something like this?
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: PeteHoyle on November 21, 2018, 09:13:18 PM
Have a look at the ExtensionSample that is provided with the WDE Samples, that has an example of how to implement your own DispositionCode View.

https://docs.genesys.com/Documentation/IW/8.5.1/Developer/AbouttheExtensionSamples
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on November 21, 2018, 10:44:26 PM
Thank you for answer.

I know this part of documentation - I created own view, I have treeview with binded own Business Attributes, that's working. But I need know how can I use it/handle it like DispositionCode tab. I mean how can I set isMandatory option, how can I save data to database when I selected some Business Attribute inside tab - these situation are unclear for me, I do not know which class allow me handle it.

Should I use delegate to DispositionCode class or maybe can I use any references? There is no information about it, no use example. That's why I'm asking about it.
Maybe someone created something similar? If something is incomprehensible or wrong explained, please give me information then I will try explain it in other words.

Regards,
Matt
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: Kubig on November 21, 2018, 10:55:17 PM
Just debug the chain (InteractionVoiceIfPossibleCloseInteraction) and find out what parameters are used and how they are filled.
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: cavagnaro on November 21, 2018, 11:19:12 PM
Thank you for answer.

I know this part of documentation - I created own view, I have treeview with binded own Business Attributes, that's working. But I need know how can I use it/handle it like DispositionCode tab. I mean how can I set isMandatory option, how can I save data to database when I selected some Business Attribute inside tab - these situation are unclear for me, I do not know which class allow me handle it.

Should I use delegate to DispositionCode class or maybe can I use any references? There is no information about it, no use example. That's why I'm asking about it.
Maybe someone created something similar? If something is incomprehensible or wrong explained, please give me information then I will try explain it in other words.

Regards,
Matt


I think you need to understand how disposition code works in first place. You are creating scenarios in your head that simply doesn't exists. DC or WDE doesn't store anything to a DB, as I said before, there are other components who achieve this, say ICON or OCS. Depends on your needs.
Your DC only sends KVPs, then something else react! on these KVPs and store them for historical (ICON/GIR), report (CCA) or just store the value at a Calling List (OCS).


So, better understand how each Genesys component works and do with the DC KVPs.

Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: MJaskowski on December 07, 2018, 12:04:12 AM
Thank you cavagnaro for reply,

Your comments were very useful - unfortunately still I have problem with use isMandatory option.
In case where we use DispositionCode tab, if you don't tick any position then you'll obtain orange alert "Disposition Code is mandatory value" ( or something similar ).
Can I achieve it for my own tab ( "own tab" I mean not DispositionCodeEx, only own with TreeView where I can select option from list )?

Regards
Matt
Title: Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
Post by: PeteHoyle on December 07, 2018, 07:06:29 PM
There are a few different ways you could do this, probably the easiest way is to create a custom command and add it to the BundleClose command

Code: [Select]
container.Resolve<ICommandManager>().CommandsByName["BundleClose"].Insert(0, new CommandActivator() { CommandType = typeof(MarkDoneCustomCommand) });
Your custom command will be called when the Mark Done button is pressed.

In your custom command you then need to check if IsMandatory is enabled, if so you then need to check if there is a value set in your custom view, if not then return true and display a message, returning true mean that the BundleClose command does not continue..

Code: [Select]
if(interaction.DispositionCode.IsMandatory)
{
if (!myCustomViewValueSet)
{
                //Display a message explaining that no value is selected in the custom view.
               //Return True means the chain of command will not continue
return true;
}
}
//return false and the chain of command will continue
return false;