cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1657
Views
0
Helpful
9
Replies

Queue Call via SQL

Hello all,

 

I'm, developing one DashBoard for my CCX, I need create one select to get Call in Queue (CSQ) and abandoned calls.

Whats structure of the select via Informix?

 

 

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

I am assuming you've already connected to the database and can run SQL queries against the two Real Time tables.

 

This query pulls CSQ Name, Calls Queued, and Calls Abandoned for the day (since midnight) and orders the output by CSQ Name alphabetically.

 

select csqname, callswaiting, callsabandoned from rtcsqssummary order by csqname asc

View solution in original post

9 Replies 9

Anthony Holloway
Cisco Employee
Cisco Employee

I am assuming you've already connected to the database and can run SQL queries against the two Real Time tables.

 

This query pulls CSQ Name, Calls Queued, and Calls Abandoned for the day (since midnight) and orders the output by CSQ Name alphabetically.

 

select csqname, callswaiting, callsabandoned from rtcsqssummary order by csqname asc

@Anthony Holloway

 

Very thank you:)

I get the information only in Master?

Correct.  Cisco recommends that you figure out which node is currently Master by accessing the following URL on each node:

 

https://<your uccx server>/uccx/isDBMaster

Very thank you, my Friend, I tested now and It worked.

 

I have more only question, I can see the agents login, but only number.

 

Have some form of get the agent names?

Right.  The only two Real time tables Cisco let's you access with the wallboard user are: RtICDStatistics and RtCSQsSummary.  Neither of which have Agent names/states in them.

 

There is another table you can access called AgentStateDetail, but it requires a different user account, and is technically not supported as a Real Time table for you to poll as often as you like.  Hence, the limitations on your Wallboard user account.

 

If one were so inclined, you might find the following SQL useful, but I cannot say anymore.  ;)

 

SELECT
	t1.resourceName, t1.resourceType, t2.eventType, t2.reasonCode,
	t1.assignedTeamID, t1.datetime
FROM
	(
		SELECT
			t3.resourceID, t3.resourceType, t3.resourceName, t3.assignedTeamID,
			MAX(t4.eventDateTime) AS datetime
		FROM
			Resource AS t3
		INNER JOIN
			AgentStateDetail AS t4
		ON
			t4.agentID = t3.resourceID AND t3.active = 1
		GROUP BY
			t3.resourceID, t3.resourceType, t3.resourceName, t3.assignedTeamID
	) AS t1
INNER JOIN
	AgentStateDetail AS t2
ON
	t2.agentID = t1.resourceID AND t2.eventDateTime = t1.datetime

Whats table T1 ?

It's an alias, or like a nickname.  So, when you're working with multiple tables in SQL queries, sometimes the tables all have the same column names, and the only way to tell the system which column in which table you mean, is to qualify the column name with a table name.  E.g., mylongtablename.columnname

 

However, it becomes tedious to type mylongtablename.columnname too many times, so you alias the table name to something shorter like from mylongtablename as t1, and then you can use t1.columnname now.

 

Make sense?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: