Infomart script to retrieve calls taken by agent per skill

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>’)

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.

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?

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.

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

Hi All

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

Regards