public.vwuserpresencedata

public.vwuserpresencedata

Description

See UserPresenceData - Expands all the GUIDs with their lookups

Table Definition

CREATE VIEW vwuserpresencedata AS (
 SELECT pd.id,
    pd.userid,
    ud.name AS agentname,
    ud.managerid,
    ud.managername,
    ud.divisionid,
    dd.name AS divisionname,
    pd.startdate,
    pd.startdateltc,
    (pd.startdate + ((( SELECT timezonecalcs.diff
           FROM timezonecalcs('Australia/Sydney'::text) timezonecalcs(utctime, ltctime, diff, timezonechosen)))::double precision * '00:00:01'::interval)) AS startdateusrtz,
    pd.timetype,
    pd.systempresenceid,
    pd.presenceid,
        CASE pd.timetype
            WHEN 'Presence'::text THEN pd.presencetime
            ELSE (0)::numeric
        END AS presencetime,
    (pd.presencetime / 86400.00) AS presencetimeday,
    pd.routingid,
        CASE pd.timetype
            WHEN 'Routing'::text THEN pd.presencetime
            ELSE (0)::numeric
        END AS routingtime,
    (pd.routingtime / 86400.00) AS routingtimeday,
    pd.updated
   FROM ((userpresencedata pd
     LEFT JOIN vwuserdetail ud ON (((ud.id)::text = (pd.userid)::text)))
     LEFT JOIN divisiondetails dd ON (((dd.id)::text = (ud.divisionid)::text)))
)

Columns

Name Type Default Nullable Children Parents Comment
id varchar(50) true Primary Key
userid varchar(50) true User GUID
agentname varchar(200) true Agent Name
managerid varchar(50) true Manager GUID
managername varchar(200) true
divisionid varchar(50) true
divisionname varchar(50) true Division Name
startdate timestamp without time zone true Start Date(UTC)
startdateltc timestamp without time zone true Start Date (LTC)
startdateusrtz timestamp without time zone true
timetype varchar(20) true
systempresenceid varchar(50) true System Presence GUID
presenceid varchar(50) true Presence GUID
presencetime numeric true Presence Time
presencetimeday numeric true Presence Time (Days)
routingid varchar(50) true Routing GUID
routingtime numeric true Routing Time
routingtimeday numeric true Routing Time (Days)
updated timestamp without time zone true Last Updated Time

Referenced Tables

Name Columns Comment Type
timezonecalcs 0
public.userpresencedata 12 BASE TABLE
public.vwuserdetail 17 See UserDetail: User Description in detail VIEW
public.divisiondetails 4 BASE TABLE

    • Related Articles

    • public.vwqueuedetails

      Description See QueueDetails: Queue Lookup data Table Definition CREATE VIEW vwqueuedetails AS ( SELECT qd.id, qd.name, qd.description, "substring"((qd.description)::text, 'queuegroup=([^;]+)(;|$)'::text) AS queuegroup, ...
    • public.participantattributesdynamic

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false conversationid varchar(50) false conversationstartdate timestamp without time zone false conversationstartdateltc timestamp without time zone true ...
    • public.evalquestiondata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false evaluationid varchar(50) false evaluationformid varchar(50) false questiongroupid varchar(50) true questionid varchar(50) true answerid varchar(50) true ...
    • public.userpresencedetaileddata

      Description User Presence Detailed Data Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false Primary Key userid varchar(50) true Agent GUID starttime timestamp without time zone false Start Time (UTC) starttimeltc ...
    • public.userinteractionpresencedetaileddata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false userid varchar(50) true starttime timestamp without time zone false starttimeltc timestamp without time zone true endtime timestamp without time zone ...