" /> Infomart script to retrieve calls taken by agent per skill - Genesys CTI User Forum

Author Topic: Infomart script to retrieve calls taken by agent per skill  (Read 2440 times)

Offline brendanb

  • Newbie
  • *
  • Posts: 32
  • Karma: 0
Infomart script to retrieve calls taken by agent per skill
« on: September 08, 2017, 06:06:02 AM »
Advertisement
Hi

I require assistance in getting a script that can retrieve calls taken by an agent according to the different skills assigned to the agent

I do have the following script but the result of this script only gives you the number of calls taken by the agent and does not link them to a skill.

SELECT * FROM AG2_AGENT_DAY WHERE
RESOURCE_KEY IN (SELECT RESOURCE_KEY FROM RESOURCE_ WHERE AGENT_FIRST_NAME = '<enter_first_name_here>' AND AGENT_LAST_NAME = '<last_name_here>')
AND DATE_TIME_KEY IN (SELECT DATE_TIME_KEY FROM DATE_TIME WHERE LABEL_YYYY_MM_DD = '<enter_the_date_here>')


Offline newguy

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Infomart script to retrieve calls taken by agent per skill
« Reply #1 on: September 12, 2017, 01:19:28 AM »
Hi ,

Do you store the associated skill of a call in the dimension tables? If yes, you can map the dimension table to irf_user_data keys and get the required result.

Else you can associate LAST_VQ_RESOURCE_KEY from INTERACTION_RESOURCE_FACT to get the skill.

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Infomart script to retrieve calls taken by agent per skill
« Reply #2 on: September 13, 2017, 05:40:15 PM »
Do you mean something like... the skill expression used to route the call? If not, can you elaborate a bit more with examples of what you need?

Offline newguy

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Infomart script to retrieve calls taken by agent per skill
« Reply #3 on: September 14, 2017, 02:23:25 AM »
Hello,

This is how you can fetch skill , if you are storing skill to any of the user dimension tables
select
USER_DATA_CUST_DIM_01.SKILL,
from interaction_resource_fact r , irf_user_datat_keys , user_data_cust_dim_01
where
IRF_USER_DATA_KEYS.INTERACTION_RESOURCE_ID = R.INTERACTION_RESOURCE_ID
IRF_USER_DATA_KEYS.CUSTOM_KEY_01 = USER_DATA_CUST_DIM_01.ID



Else , in GIM 8.5 , we have a table known as SKILL which contains the skill details like skill_name , skill_key etc.
Join the skill table with requested_skill table and then join requested_skill.skill_key = interaction_resource_fact.requested_skill_key

You can try this and hope this helps.





Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Infomart script to retrieve calls taken by agent per skill
« Reply #4 on: September 14, 2017, 02:39:12 PM »
[quote author=newguy link=topic=10606.msg48203#msg48203 date=1505355805]


Else , in GIM 8.5 , we have a table known as SKILL which contains the skill details like skill_name , skill_key etc.
Join the skill table with requested_skill table and then join requested_skill.skill_key = interaction_resource_fact.requested_skill_key

You can try this and hope this helps.





[/quote]

Yeah, but he is fetching from the aggregate tables from RAA (AG2_AGENT_DAY)... So, my guess is that your first suggestion (use USER DATA low cardinality) is the best. But with more details we can be sure about it :)

Offline brendanb

  • Newbie
  • *
  • Posts: 32
  • Karma: 0
Re: Infomart script to retrieve calls taken by agent per skill
« Reply #5 on: September 18, 2017, 06:46:19 PM »
Hi All

Thank you for helping. I managed to get the information.

Regards