Hi,
it looks like you are using something similar to LCA (last-called-agent) and if that agent is not ready then route it to somebody else that in the same skill-group.
I do not like the fact that CED includes agent ID, because this does not look the best way to do things; however, I am sure you have a reason for doing it this way.
Unfortunately, there is no simple way of getting this with IRD. What you can acquire are
target_name. vq ,dn, agent Id, employee ID, place.
This obviously does not help you.
I then thought about using TargetObjectSelected, but it did not help either.
So, I decided to do it the hard way ... Accessing CME.
It is not really difficult, and you can do it - it is pretty straight forward.
first, the concept:
We know that agent id is stored in cfg_agent_login table.
so we need to retrieve unique dbid associated with this agent from here:
select dbid from cfg_agent_login where login_code = '[glow=red,2,300]your_CED_value_here[/glow]'
after you retrieve dbid, your next step would be to use it to retrieve person who has this agent id:
select person_dbid from cfg_login_info where agent_login_dbid = [glow=red,2,300]dbid_you_have_retrieved_above![/glow]
ok... we almost there now.
now, since we have person_dbid, you can retrieve all the skills associated with this person.
select skill_dbid from cfg_skill_level where person_dbid = [glow=red,2,300]the_person_dbid_you_retrieved_above[/glow]
retrieve all skills related to this dbid. But, as you can see, it retrieves it as dbid and not skillname. Since you want to actually get the skillname, you should do the final step and pillage the cfg_skill which contains the actual skillnames :
select name from cfg_skill where dbid = [glow=red,2,300]the_skill_dbid_you_have_retrieved_in_previous_query[/glow]
well, you probably have noticed that all of this can be written in one relational-query, so your URS would only access your cfg_db once per call.
I will stop here, but if you need more help, just ask.
Good luck!
Vic