public.interactionlegdata

public.interactionlegdata

Description

One row per Leg (agent participant that handled a Conversation, or a user whose session carries a queue), one row per Dial (outbound voice session an agent or user placed, connected or not) and one row per Queue Entry no agent answered (abandoned or flowed out; agent and handling-time columns NULL), rebuilt per UTC day by the Interaction job from vwInteractionLegDataBuild. Rows with a queuestartdate and agent_to_agent_flag 0 count like Genesys nOffered; filter on conversationstartdate for partition pruning.

Columns

Name Type Default Nullable Children Parents Comment
conversationid varchar(50) false Conversation GUID
interactionid varchar(64) false Row key: conversationid plus conversationleg (historical name, it identifies a Leg or an unanswered Queue Entry)
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 Row sequence within the conversation: Legs 1..N in handling order, then the unanswered Queue Entries in queue order
interactionstartdateltc timestamp without time zone true Leg start: first agent interact segment (LTC); NULL on an unanswered Queue Entry
queuename varchar(255) true Queue Name handling this leg
agentname varchar(200) true Agent Name handling this leg; NULL on an unanswered Queue Entry
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: on a Leg the seconds before it was answered (the leg’s Genesys tAnswered metric, with a same-media ACD boundary fallback when that metric is absent); on an unanswered Queue Entry the seconds in queue before the abandon or flow-out
talk_time numeric(20,2) true Talk Time in seconds (sum of interact segment durations outside a callback session)
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 agent started a blind or consult transfer on this leg (ntransferred > 0), else 0; a consult the agent took back is 0
transferred_to_queue varchar(255) true When this leg transferred: queue of the next leg that took the interaction over, skipping legs it only consulted
transferred_from_queue varchar(255) true Queue of the previous leg that took the interaction over, when that leg transferred it; NULL on a consulted leg
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 + callback_time; NULL on an unanswered Queue Entry
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); on an unanswered Queue Entry, of its ACD segment
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
callback_time numeric(20,2) true Callback session interact time in seconds that no voice segment covers (before dialling, between attempts, after the call); 0 on a leg without a callback session
sessiondirection varchar(50) true Direction of the session the queue delivered (the first interact segment’s session; the ACD session on an unanswered Queue Entry), the direction the Genesys queue aggregates group by; direction is the Conversation’s original direction instead
queuestartdate timestamp without time zone true When this row’s Queue Entry entered the queue (UTC), the time Genesys counts its nOffered in; NULL on a Leg that did not come from a queue (agent_to_agent_flag 1, or an agent’s own outbound call). Filter on this column to count rows like Genesys Offered
queuestartdateltc timestamp without time zone true When this row’s Queue Entry entered the queue (LTC); NULL on a Leg that did not come from a queue
agent_to_agent_flag integer true 1 on a Leg handed over directly, by no queue, so no Genesys nOffered: another agent’s blind transfer, consult transfer or consult, or the Leg of a Genesys user whose session carries a queue (participantpurpose ‘user’); else 0; exclude these rows to count rows like Genesys Offered
abandoned integer true 1 on an unanswered Queue Entry the customer abandoned (Genesys tAbandon present), else 0; SUM() per day and queue matches the Genesys Abandon count
abandon_time numeric(20,2) true Genesys tAbandon metric of an unanswered Queue Entry: seconds in queue before the customer abandoned; NULL on a Leg and on an unanswered entry that flowed out
dialing_time numeric(20,2) true Genesys tDialing of a Dial row: seconds the agent’s outbound call spent dialling (session metric, segment length when the metric is missing); 0 on a Leg, NULL on an unanswered Queue Entry
contacting_time numeric(20,2) true Genesys tContacting of a Dial row: seconds spent contacting before dialling; 0 on a Leg, NULL on an unanswered Queue Entry
dial_attempt integer true On a Dial row, the attempt number among the participant’s outbound voice sessions in dialling order (a callback dialled twice has attempts 1 and 2); NULL on a Leg and on an unanswered Queue Entry. Dial rows with participantpurpose ‘agent’ count like the Genesys queue nOutbound
dial_connected integer true On a Dial row, the Genesys nConnected of the dial: how many called parties answered (customer or external participant sessions whose outbound voice interact overlapped the dial), 0 when nobody did, 1 normally, 2 when a second party was reached during the same session; NULL elsewhere. dial_connected > 0 is a connected dial and SUM(dial_connected) matches the Genesys queue nConnected
callback_interactionid varchar(64) true On a Dial row placed for a callback, the interactionid of the callback Leg (same Conversation, same participant); NULL on a direct outbound call and on every other row
participantpurpose varchar(20) true Genesys participant purpose of a Leg or Dial row: ‘agent’, or ‘user’ for a Genesys user not acting as the queue’s agent: a Dial the user placed on behalf of a queue (the queue view counts it in nHandle and the times, not in nOutbound) or a Leg for the user’s session that carries a queue, such as answering a colleague’s call placed on behalf of it (counted in the times only); NULL on an unanswered Queue Entry
interactionenddateltc timestamp without time zone true When the row’s last segment ended (LTC): the Leg’s or Dial’s last segment (wrap-up included), the ACD segment’s end on an unanswered Queue Entry (NULL while the entry is still queued). Genesys books a session’s talk, ACW and handle in the interval the session ends, so time sums bucketed by this column match the queue view per day; interactionstartdateltc buckets counts
conversationenddate timestamp without time zone true Conversation end (UTC); the UTC twin of conversationenddateltc, NULL while the Conversation is open
interactionstartdate timestamp without time zone true Row start (UTC): first agent interact segment of a Leg, start of the dialling on a Dial; the UTC twin of interactionstartdateltc; NULL on an unanswered Queue Entry
interactionenddate timestamp without time zone true When the row’s last segment ended (UTC); the UTC twin of interactionenddateltc, NULL while an unanswered Queue Entry is still queued

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)