Real-time queue conversation data
CREATE VIEW vwrealtimequeueconv AS (
SELECT qc.conversationid,
qc.media,
qc.actingas,
datediff('second'::character varying, qc.startdate, timezone('utc'::text, now())) AS statussecs,
((datediff('second'::character varying, qc.startdate, timezone('utc'::text, now())))::numeric / 86400.00) AS statusdays,
qc.skill1,
sk1.name AS skillname1,
qc.skill2,
sk2.name AS skillname2,
qc.skill3,
sk3.name AS skillname3,
qc.initialpriority,
qc.participantname,
qc.queueid,
qd.name AS queuename,
qd.divisionid AS division,
qc.userid,
ud.name AS agentname,
ud.department,
ud.managername,
qc.direction,
qc.ani,
qc.dnis,
qc.requestedrout1,
qc.requestedrout2,
qc.usedrout
FROM (((((queuerealtimeconvdata qc
LEFT JOIN skilldetails sk1 ON (((sk1.id)::text = (qc.skill1)::text)))
LEFT JOIN skilldetails sk2 ON (((sk2.id)::text = (qc.skill2)::text)))
LEFT JOIN skilldetails sk3 ON (((sk3.id)::text = (qc.skill3)::text)))
LEFT JOIN queuedetails qd ON (((qd.id)::text = (qc.queueid)::text)))
LEFT JOIN vwuserdetail ud ON (((ud.id)::text = (qc.userid)::text)))
)
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
conversationid | varchar(50) | true | ID of the conversation | |||
media | varchar(50) | true | Type of media | |||
actingas | varchar(50) | true | Role of the participant | |||
statussecs | integer | true | Duration of status (in seconds) | |||
statusdays | numeric | true | Duration of status (in days) | |||
skill1 | varchar(50) | true | First associated skill ID | |||
skillname1 | varchar(50) | true | Name of the first associated skill | |||
skill2 | varchar(50) | true | Second associated skill ID | |||
skillname2 | varchar(50) | true | Name of the second associated skill | |||
skill3 | varchar(50) | true | Third associated skill ID | |||
skillname3 | varchar(50) | true | Name of the third associated skill | |||
initialpriority | integer | true | Initial priority of the conversation | |||
participantname | varchar(200) | true | Name of the participant | |||
queueid | varchar(50) | true | ID of the associated queue | |||
queuename | varchar(255) | true | Name of the associated queue | |||
division | varchar(50) | true | ID of the associated division | |||
userid | varchar(50) | true | ID of the associated user | |||
agentname | varchar(200) | true | Name of the agent | |||
department | varchar(200) | true | Department of the handling agent | |||
managername | varchar(200) | true | Agent manager Name | |||
direction | varchar(50) | true | Direction of the conversation | |||
ani | varchar(400) | true | Automatic Number Identification | |||
dnis | varchar(400) | true | Dialed Number Identification Service | |||
requestedrout1 | varchar(50) | true | First requested route | |||
requestedrout2 | varchar(50) | true | Second requested route | |||
usedrout | varchar(50) | true | Used route |
Name | Columns | Comment | Type |
---|---|---|---|
public.queuerealtimeconvdata | 32 | BASE TABLE | |
public.skilldetails | 4 | BASE TABLE | |
public.queuedetails | 17 | Queue Lookup data | BASE TABLE |
public.vwuserdetail | 17 | See UserDetail: User Description in detail | VIEW |