public.interactionlegdata

public.interactionlegdata

Description

One row per answered Leg (agent participant that handled a Conversation), rebuilt per UTC day by the Interaction job from vwInteractionLegDataBuild. Abandoned interactions produce no row; filter on conversationstartdate for partition pruning.

Columns

Name Type Default Nullable Children Parents Comment
conversationid varchar(50) false Conversation GUID
interactionid varchar(64) false Leg key: conversationid plus leg number (historical name, it identifies a Leg)
conversationstartdateltc timestamp without time zone true Conversation Start Date (LTC)
conversationenddateltc timestamp without time zone true Conversation End Date (LTC)
direction varchar(50) true Conversation Original Direction
mediatype varchar(50) true Interaction Media Type
conversationleg integer false Answered leg sequence within the conversation (1..N)
interactionstartdateltc timestamp without time zone true Leg start: first agent interact segment (LTC)
queuename varchar(255) true Queue Name handling this leg
agentname varchar(200) true Agent Name handling this leg
ivr_time numeric(20,2) true IVR Time in seconds, conversation level, reported on leg 1 only
queue_time numeric(20,2) true Queue wait time in seconds before this leg was answered: the leg’s Genesys tAnswered metric, with a same-queue/media ACD boundary fallback when that metric is absent
talk_time numeric(20,2) true Talk Time in seconds (sum of interact segment durations)
hold_time numeric(20,2) true Hold Time in seconds (sum of hold segment durations)
wrap_up_time numeric(20,2) true After Call Work time in seconds (sum of wrapup segment durations)
transferred_flag integer true Transferred indicator: 1 when the next leg was reached through a known queue, else 0 (direct agent-to-agent transfers show 0)
transferred_to_queue varchar(255) true Queue this leg was transferred to (next leg queue)
transferred_from_queue varchar(255) true Queue this leg was transferred from (previous leg queue)
ani varchar(400) true Conversation ANI (originating number/address)
dnis varchar(400) true Conversation DNIS (dialled number/address)
alert_time numeric(20,2) true Ring/alert time in seconds for this leg (sum of alert segment durations)
handle_time numeric(20,2) true Handle time in seconds: talk_time + hold_time + wrap_up_time
wrapupcode varchar(255) true Wrap-up code GUID from the leg wrapup segment
wrapupname varchar(255) true Wrap-up code name from the leg wrapup segment
disconnectiontype varchar(50) true Disconnect type of the leg interact segment (peer, client, transfer, endpoint)
ttalkcomplete numeric(20,2) true Genesys tTalkComplete metric summed for this leg (seconds, cumulative talk)
theldcomplete numeric(20,2) true Genesys tHeldComplete metric summed for this leg (seconds, completed holds)
tacw numeric(20,2) true Genesys tAcw metric summed for this leg (seconds of after call work)
tagentresponsetime numeric(20,2) true Genesys tAgentResponseTime metric summed for this leg (seconds, async media)
nconsulttransferred integer true Consult transfer count on this leg
nblindtransferred integer true Blind transfer count on this leg
queueid varchar(50) true Queue GUID handling this leg
userid varchar(50) true Agent GUID handling this leg
divisionid varchar(100) true Division GUID of the leg segments
remotedisplayable varchar(255) true Remote party display name/number
externaltag varchar(50) true External tag on the conversation
recordingexists integer true 1 when any segment of this leg has a recording, else 0
tanswered numeric(20,2) true Genesys tAnswered metric summed for this leg (seconds to answer)
tuserresponsetime numeric(20,2) true Genesys tUserResponseTime metric summed for this leg (seconds, async media, customer side)
nconsult integer true Consult count on this leg
ntransferred integer true Transfer count on this leg (all transfer types)
tactivecallback numeric(20,2) true Genesys tActiveCallback metric summed for this leg (seconds)
tactivecallbackcomplete numeric(20,2) true Genesys tActiveCallbackComplete metric summed for this leg (seconds)
conversationstartdate timestamp without time zone false Conversation Start Date (UTC); partition key, filter on this column for partition pruning

Constraints

Name Type Definition
interactionlegdata_pkey PRIMARY KEY PRIMARY KEY (interactionid, conversationstartdate)

Indexes

Name Definition
interactionlegdata_pkey CREATE UNIQUE INDEX interactionlegdata_pkey ON ONLY public.interactionlegdata USING btree (interactionid, conversationstartdate)
interactionlegdata_conversationid_idx CREATE INDEX interactionlegdata_conversationid_idx ON ONLY public.interactionlegdata USING btree (conversationid)
interactionlegdata_conversationstartdateltc_idx CREATE INDEX interactionlegdata_conversationstartdateltc_idx ON ONLY public.interactionlegdata USING btree (conversationstartdateltc)
interactionlegdata_conversationstartdate_idx CREATE INDEX interactionlegdata_conversationstartdate_idx ON ONLY public.interactionlegdata USING btree (conversationstartdate)