Shows the details of agents missing calls (Not Responding) from the DetailedInteractionData table - Expands all the GUIDs with their lookups
CREATE VIEW vwcallnotrespondingdetails AS (
SELECT det.conversationid,
det.userid,
ud.name AS agentname,
md.id AS managerid,
md.name AS managername,
det.mediatype,
det.conversationstartdate,
det.conversationstartdateltc,
det.conversationenddate,
det.conversationenddateltc,
det.segmentstartdate,
det.segmentstartdateltc,
det.segmentenddate,
det.segmentenddateltc,
det.convtosegmentendtime AS totalcalltime,
det.segmenttime AS queuetime,
(det.convtosegmentendtime / 86400.00) AS totalcalltimeday,
(det.segmenttime / 86400.00) AS queuetimeday,
det.ani,
det.dnis,
det.queueid,
que.name AS queuename,
det.purpose,
det.segmenttype,
det.disconnectiontype
FROM (((detailedinteractiondata det
LEFT JOIN queuedetails que ON (((que.id)::text = (det.queueid)::text)))
LEFT JOIN userdetails ud ON (((ud.id)::text = (det.userid)::text)))
LEFT JOIN userdetails md ON (((md.id)::text = (ud.manager)::text)))
WHERE (((det.segmenttype)::text = 'alert'::text) AND ((det.purpose)::text = 'agent'::text) AND ((det.disconnectiontype)::text = ANY ((ARRAY['client'::character varying, 'endpoint'::character varying, 'noAnswerTransfer'::character varying])::text[])))
)
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
conversationid | varchar(50) | true | Conversation GUID | |||
userid | varchar(50) | true | User GUID | |||
agentname | varchar(200) | true | Agent Name | |||
managerid | varchar(50) | true | Manager GUID | |||
managername | varchar(200) | true | Manager Name | |||
mediatype | varchar(50) | true | Media Type | |||
conversationstartdate | timestamp without time zone | true | Conversation Start Date(UTC) | |||
conversationstartdateltc | timestamp without time zone | true | Conversation Start Date in LTC | |||
conversationenddate | timestamp without time zone | true | Conversation End Date(UTC) | |||
conversationenddateltc | timestamp without time zone | true | Conversation End Date in LTC | |||
segmentstartdate | timestamp without time zone | true | Segment Start Date(UTC) | |||
segmentstartdateltc | timestamp without time zone | true | Segment Start Date in LTC | |||
segmentenddate | timestamp without time zone | true | Segment End Date(UTC) | |||
segmentenddateltc | timestamp without time zone | true | Segment End Date in LTC | |||
totalcalltime | numeric(20,2) | true | Total Call Time | |||
queuetime | numeric(20,2) | true | Queue Time | |||
totalcalltimeday | numeric | true | Total Call Time per Day | |||
queuetimeday | numeric | true | Queue Time per Day | |||
ani | varchar(400) | true | ANI | |||
dnis | varchar(400) | true | DNIS | |||
queueid | varchar(50) | true | Queue GUID | |||
queuename | varchar(255) | true | Queue Name | |||
purpose | varchar(50) | true | Purpose | |||
segmenttype | varchar(50) | true | Segment Type | |||
disconnectiontype | varchar(50) | true | Disconnection Type |
Name | Columns | Comment | Type |
---|---|---|---|
public.detailedinteractiondata | 101 | Conversation Detailed Data | BASE TABLE |
public.queuedetails | 17 | Queue Lookup data | BASE TABLE |
public.userdetails | 13 | BASE TABLE |