Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: kinguzzo on July 15, 2021, 03:57:37 PM

Title: WDE | Show Toaster custom
Post by: kinguzzo on July 15, 2021, 03:57:37 PM
Hello to everyone,
I'm working on WDE (8.5) and trying to show a custom toaster after an event (the event itself is not important). The toaster should show just a message to user and disappear after a while without any interaction by user. I'm looking online for some examples about that, but finding WDE code online is a very difficult task and the documentation I have is very poor.
Hope someone can help me.
Title: Re: WDE | Show Toaster custom
Post by: Kubig on July 15, 2021, 05:42:23 PM
In case you just need to show toaster based on your custom trigger, you can use AlertEvent object and publish it via EventAggregator. Example below:

[code]
var info = new AlertInformation("Public")
                {
                    Id = message,
                    Severity = SeverityType.Information
                };
ContainerAccessPoint.Container.Resolve<IEventAggregator>().GetEvent<AlertEvent>().Publish(info);
[/code]
Title: Re: WDE | Show Toaster custom
Post by: kinguzzo on July 20, 2021, 12:14:44 PM
This is just what I was looking for. Thank you!!!
Title: Re: WDE | Show Toaster custom
Post by: cavagnaro on July 20, 2021, 01:04:05 PM
Can you later post a screenshot on how this endup being shown at WDE?
Title: Re: WDE | Show Toaster custom
Post by: kinguzzo on July 20, 2021, 03:09:06 PM
Hi,

here we have how the "AlertInformation" appears.

[url=https://imgbb.com/][img]https://i.ibb.co/wccrKQ4/Immagine.png[/img][/url]

BR
Title: Re: WDE | Show Toaster custom
Post by: cavagnaro on July 21, 2021, 02:07:43 AM
8)  Awesome! Thanks!