cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
454
Views
0
Helpful
2
Replies
Highlighted
Enthusiast

Not All Agent Teams appearing in newly created Real Time report


I have create a report that is lookin only at Agents States & Reason codes (Thanks Jameson) having run the report it is only showing 3 'live agent teams' in my nw report, however if I run the usual Agent team RT report, all of the Agent teams have data against, them.

Unfortunately I cannot run the SQL against the SQL DB as I do not have access to the Customer DB.

This is my code, which clearly shows all the Agent Team IDs.

SELECT Agent_Team.EnterpriseName,
AgentTeamSkillID = Agent_Team.AgentTeamID,

SUM (CASE Agent_Real_Time.AgentState WHEN '0' THEN 1 ELSE 0 END) AS LoggedOut,
SUM (CASE Agent_Real_Time.AgentState WHEN '1' THEN 1 ELSE 0 END) AS LoggedIn,
SUM (CASE Agent_Real_Time.AgentState WHEN '2' THEN 1 ELSE 0 END) AS NotReady,
SUM (CASE Agent_Real_Time.AgentState WHEN '3' THEN 1 ELSE 0 END) AS Available,
SUM (CASE Agent_Real_Time.AgentState WHEN '4' THEN 1 ELSE 0 END) AS Talking,
SUM (CASE Agent_Real_Time.AgentState WHEN '5' THEN 1 ELSE 0 END) AS Wrapup,
SUM (CASE Agent_Real_Time.AgentState WHEN '10' THEN 1 ELSE 0 END) AS OnHold,
SUM (CASE Agent_Real_Time.AgentState WHEN ' ' THEN 1 ELSE 0 END) AS Other,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '115' THEN 1 ELSE 0 END) AS Admin,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '117' THEN 1 ELSE 0 END) AS Personal,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '106' THEN 1 ELSE 0 END) AS EndofShift,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '102' THEN 1 ELSE 0 END) AS Lunch,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '103' THEN 1 ELSE 0 END) AS Meeting,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '113' THEN 1 ELSE 0 END) AS IT,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '101' THEN 1 ELSE 0 END) AS Brea,
SUM (CASE Agent_Real_Time.ReasonCode WHEN '111' THEN 1 ELSE 0 END) AS Development,
SUM (CASE Agent_Real_Time.ReasonCode WHEN ' ' THEN 1 ELSE 0 END) AS None

FROM Agent (nolock)
INNER JOIN Agent_Real_Time (nolock) on Agent.SkillTargetID = Agent_Real_Time.SkillTargetID

INNER Join Agent_Team_Member (nolock) on Agent_Team_Member.SkillTargetID =Agent.SkillTargetID
INNER Join Agent_Team (nolock) on Agent_Team.AgentTeamID = Agent_Team_Member.SkillTargetID where Agent_Team.AgentTeamID IN (5032, 5033, 5035, 5036, 5037, 5034, 5031, 5030, 5027, 5019, 5020, 5021, 5041, 5014, 5022, 5023, 5024, 5000, 5001, 5002, 5003, 5004, 5015, 5028, 5025, 5005, 5029, 5040, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5016, 5017, 5026, 5039, 5018, 5013)

Group BY  Agent_Team.EnterpriseName, Agent_Team.AgentTeamID

I have attached a real time view of my report, plus a real time view of the Stock Agent Team report, which I have modified to just show necessary data...

As always any and all help is greatly appreciated.

Thanks Sarah

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Rising star

Re: Not All Agent Teams appearing in newly created Real Time report

Sarah,

This:

INNER Join Agent_Team (nolock) on Agent_Team.AgentTeamID = Agent_Team_Member.SkillTargetID

Should be:

INNER Join Agent_Team (nolock) on Agent_Team.AgentTeamID = Agent_Team_Member.AgentTeamID

-Jameson

-Jameson

View solution in original post

2 REPLIES 2
Highlighted
Rising star

Re: Not All Agent Teams appearing in newly created Real Time report

Sarah,

This:

INNER Join Agent_Team (nolock) on Agent_Team.AgentTeamID = Agent_Team_Member.SkillTargetID

Should be:

INNER Join Agent_Team (nolock) on Agent_Team.AgentTeamID = Agent_Team_Member.AgentTeamID

-Jameson

-Jameson

View solution in original post

Highlighted
Enthusiast

Re: Not All Agent Teams appearing in newly created Real Time report

You have come to my rescue again - I knew it was something simple, but when you look at things forever it is never clear!

Thanks :-)

This widget could not be displayed.