public.vwscheduledatacomplete

public.vwscheduledatacomplete

Description

Combined view of schedule data and full-day time-off data - Use this view to see complete schedule including users on time-off

Table Definition
CREATE VIEW vwscheduledatacomplete AS (
 SELECT sc.scheduleid,
    sc.userid,
    sc.shiftid,
    sc.shiftstartdate,
    sc.shiftstartdateltc,
    sc.shiftlengthtime,
    sc.activitystartdate,
    sc.activitystartdateltc,
    sc.activitylengthtime,
    sc.activitydescription,
    sc.activitycodeid,
    sc.activitypaid,
    sc.shiftmanuallyeditted,
    ud.name AS agentname,
    ud.managerid,
    ud.managername,
    ad.name AS activitycodedesc,
    COALESCE(NULLIF((ad.name)::text, ''::text), (ad.category)::text) AS activitycodename,
    'SHIFT'::text AS scheduletype
   FROM ((scheduledata sc
     LEFT JOIN vwuserdetail ud ON (((ud.id)::text = (sc.userid)::text)))
     LEFT JOIN activitycodedetails ad ON ((((ad.businessunitid)::text = (sc.buid)::text) AND ((ad.id)::text = (sc.activitycodeid)::text))))
UNION ALL
 SELECT td.scheduleid,
    td.userid,
    NULL::integer AS shiftid,
    td.businessunitdate AS shiftstartdate,
    td.businessunitdate AS shiftstartdateltc,
    td.length AS shiftlengthtime,
    td.businessunitdate AS activitystartdate,
    td.businessunitdate AS activitystartdateltc,
    td.length AS activitylengthtime,
    td.description AS activitydescription,
    td.activitycode AS activitycodeid,
    td.paid AS activitypaid,
    NULL::"bit" AS shiftmanuallyeditted,
    ud.name AS agentname,
    ud.managerid,
    ud.managername,
    ad.name AS activitycodedesc,
    COALESCE(NULLIF((ad.name)::text, ''::text), (ad.category)::text) AS activitycodename,
    'TIMEOFF'::text AS scheduletype
   FROM ((timeoffdata td
     LEFT JOIN vwuserdetail ud ON (((ud.id)::text = (td.userid)::text)))
     LEFT JOIN activitycodedetails ad ON ((((ad.businessunitid)::text = (td.buid)::text) AND ((ad.id)::text = (td.activitycode)::text))))
  WHERE (td.isfulldayrequest = '1'::"bit")
)

Columns

Name Type Default Nullable Children Parents Comment
scheduleid varchar(50) true Schedule GUID
userid varchar(50) true User GUID
shiftid integer true Shift GUID (NULL for time-off entries)
shiftstartdate timestamp without time zone true Start date of the shift or time-off (UTC)
shiftstartdateltc timestamp without time zone true Start date in local time
shiftlengthtime integer true Length of the shift or time-off (seconds)
activitystartdate timestamp without time zone true Start date of the activity (UTC)
activitystartdateltc timestamp without time zone true Start date of the activity in local time
activitylengthtime integer true Length of the activity (seconds)
activitydescription varchar(200) true Activity Description
activitycodeid varchar(50) true Activity code GUID
activitypaid bit(1) true Activity paid or not
shiftmanuallyeditted “bit” true Shift was manually edited or not (NULL for time-off)
agentname varchar(200) true Agent Name
managerid varchar(50) true Manager GUID
managername varchar(200) true Name of the manager
activitycodedesc varchar(50) true Description of the activity code
activitycodename text true Name of the activity code
scheduletype text true Type of schedule entry: SHIFT or TIMEOFF

Referenced Tables

Name Columns Comment Type
public.scheduledata 16 BASE TABLE
public.vwuserdetail 17 See UserDetail: User Description in detail VIEW
public.activitycodedetails 11 Activity Code Lookup Data BASE TABLE
public.timeoffdata 12 BASE TABLE

    • Related Articles

    • README

      Logo Genesys Adapter Data Dictionary Tables Name Columns Comment Type public.tabledefinitions 5 Subscription Detailed Data BASE TABLE public.activeqmembersdata 9 Historical Active Membership of Queues BASE TABLE public.activitycodedetails 11 Activity ...
    • 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.evaldata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(100) false conversationid varchar(50) false evaluationid varchar(50) false calibrationid varchar(50) true evaluationformid varchar(50) true evaluatorid varchar(50) ...
    • public.convvoicetopicdetaildata

      Description Columns Name Type Default Nullable Children Parents Comment keyid varchar(100) false conversationid varchar(50) true starttime timestamp without time zone false starttimeltc timestamp without time zone true participant varchar(50) 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 ...