See CallAbandonedSummary: Summary of abandoned calls with relevant details
CREATE VIEW z_vwcallabandonedsummary AS (
SELECT det.conversationid,
det.conversationstartdate,
(det.conversationstartdate AT TIME ZONE 'Australia/Sydney'::text) AS conversationstartdateltc,
det.conversationenddate,
(det.conversationenddate AT TIME ZONE 'Australia/Sydney'::text) AS conversationenddateltc,
det.segmentstartdate,
(det.segmentstartdate AT TIME ZONE 'Australia/Sydney'::text) AS segmentstartdateltc,
det.segmentenddate,
(det.segmentenddate AT TIME ZONE 'Australia/Sydney'::text) AS segmentenddateltc,
det.convtosegmentendtime AS totalcalltime,
det.segmenttime AS queuetime,
det.ani,
det.dnis,
det.queueid,
que.name AS queuename,
det.purpose,
det.segmenttype,
det.disconnectiontype
FROM (detailedinteractiondata det
LEFT JOIN queuedetails que ON (((det.queueid)::text = (que.id)::text)))
WHERE (((det.segmenttype)::text = ANY ((ARRAY['delay'::character varying, 'Interact'::character varying, 'alert'::character varying, 'ivr'::character varying])::text[])) AND ((det.purpose)::text = ANY ((ARRAY['acd'::character varying, 'ivr'::character varying])::text[])) AND ((det.disconnectiontype)::text = 'peer'::text) AND (det.conversationenddate = det.segmentenddate))
)
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
conversationid | varchar(50) | true | Conversation GUID | |||
conversationstartdate | timestamp without time zone | true | Conversation Start Date (UTC) | |||
conversationstartdateltc | timestamp with time zone | true | Conversation Start Date (LTC) | |||
conversationenddate | timestamp without time zone | true | Conversation End Date (UTC) | |||
conversationenddateltc | timestamp with time zone | true | Conversation End Date (LTC) | |||
segmentstartdate | timestamp without time zone | true | Segment Start Date (UTC) | |||
segmentstartdateltc | timestamp with time zone | true | Segment Start Date (LTC) | |||
segmentenddate | timestamp without time zone | true | Segment End Date (UTC) | |||
segmentenddateltc | timestamp with time zone | true | Segment End Date (LTC) | |||
totalcalltime | numeric(20,2) | true | Total Call Time (Seconds) | |||
queuetime | numeric(20,2) | true | Queue Time (Seconds) | |||
ani | varchar(400) | true | ANI (Automatic Number Identification) | |||
dnis | varchar(400) | true | DNIS (Dialed Number Identification Service) | |||
queueid | varchar(50) | true | Queue ID | |||
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 |