Genesys CTI User Forum > Genesys-related Development

Configuring and reading an agent specific Key/Value from WDE

(1/1)

DeonsSGGU:
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

daniel_san:
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.

abudwill:
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.

DeonsSGGU:
Thank you very much for both replies.

I will try both options today.

Navigation

[0] Message Index

Go to full version