cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
686
Views
0
Helpful
2
Replies

Agent vs Attributes vs Precision Queue

hari chandran
Level 1
Level 1

Hi , 

 

Does any have the Query to see a Specific PQ has what are Agents and Attrubites assigned or An Agent Belongs to what all the Attributes and PQ. 

 

We tried writing JOIN Query using multiple tables but ended up in getting wrong result. In my Example-

I Took an Agent, Assigned him Attributes Spanish, Member, Newyork, and Prof. All the Attributes is available on the Step 1 and Stet 2 in PQ1.

 

 

When i tried writing query Joining Multiple tables such as Agt_Attri, Attri, PQ_Term, Agent, PQ. and where Agent.SkillTragetID='XX'

The Result -  it gives more than 200+ rows, when i see one by one. I noticed it pulled all the PQs which has Spanish and Member and Newyork etc. 

 

 

So Im trying to find exact PQ names assigned for any given Agent. Also Exact Agents list for that any PQ

Please advise

 

2 Replies 2

Igor Filatov
Level 1
Level 1

Hi.

"Specific PQ has what are Agents and Attrubites assigned or An Agent Belongs to what all the Attributes and PQ"

Please check a standard RTD Agent Precision Queue Membership report to get it.

Check query for the report to create a custom reports based on Attributes or PQ names as a key criterias.

Omar Deen
Spotlight
Spotlight

Something like this maybe?

SELECT DISTINCT P.FirstName, P.LastName, A.EnterpriseName, AT.AttributeValue, ATT.EnterpriseName AS Attribute, PQ.EnterpriseName AS PrecisionQueue
FROM Agent A, Agent_Attribute AT, Attribute ATT, Person P, Precision_Queue PQ, Precision_Queue_Term PQT
WHERE A.SkillTargetID = AT.SkillTargetID
AND ATT.AttributeID = AT.AttributeID
AND ATT.AttributeID = PQT.AttributeID
AND PQT.PrecisionQueueID = PQ.PrecisionQueueID
AND A.PersonID = P.PersonID
AND A.EnterpriseName = '5021.6548240'

Replace the Agent EnterpriseName with your own