Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: DeonsSGGU on February 15, 2017, 07:12:32 AM
-
I need tag every agent with a value in the configuration. Example: AgentType = "Home" or "Work".
I then need to read the AgentType value for the specific logged in agent in a WDE custom module.
Can someone perhaps give some advice on:
- Where would I store this in the Genesys config?
- How do I read the value for the specific logged in agent from the WDE code?
I can easily read the application wide configuration but the problem is reading agent specific values.
Thanks
-
Using IAgent you can easily access to whatever value on your agent.
You can use container to resolve it.
"IAgent agent = container.resolve("IAgent")" ; not exactly...
inside agent you can access to userproperties and options.
Or resolve it in the constructor.
Regards.
-
As daniel_san suggests, look at documentation are IAgent.
I have done this many times (reading options from the WDE app object used to log in) with the following:
[code] IConfigurationService configService = container.Resolve<IConfigurationService>();
CfgApplication app = configService.MyApplication;
Genesyslab.Platform.Commons.Collections.KeyValueCollection annex = app.UserProperties;[/code]
I believe IAgent can be used in a similar way as above.
-
Thank you very much for both replies.
I will try both options today.