Table name: agent_events

Contains/Role: All the “call centre events”, and also the Conversation events (i.e. events representing the time when the agent is involved in calls)


Column Name Datatype Description


Primary key.

Internal, auto-numbered. A unique id for each record.

agent_id int A unique number identifying an agent. The table has a foreign key against table agents for this column.
dte_start datetime When the start of the event occurred.
profile nvarchar(100) Name of the profile the agent used at (last) login.
service_num varchar(100) The service number the agent is in context of when logged in.
phone_num varchar(100) The phone number to the agent (specified at last login).
duration_sec int

The total duration of the event (in secods).

NOTE! So-called “call centre events”, i.e. logging in and out, and moving into or returning from pause, will always have a duration of 0. Though, working against the table through built-in table functions will also return additional duration columns expressing the time the agent stayed in each of the “call centre events”. Though, the Conversation events (type ‘c’) will hold a duration > 0
event_type char(1) Refers (foreign key) to table agent_event_types.
event_source char(1) Refers (foreign key) to table agent_event_sources.
result_code char(2) A result code telling something about the “outcome” of the event. Refers (foreign key) to table agent_result_codes.
queue_key nvarchar(100) The key (short code) for the queue involved in the event. See table queues for a more descriptive name (NOTE! Use both the queue_key and the service_num as join criteria columns, the key itself is not necessarily unique if the database holds data for more than one customer!) Outer join is recommended, since there might exist keys without extended descriptions.
pause_type_name nvarchar(100) Name of a pause type, only set for events of type ‘p’.
pause_type_id int A numeric id (also) identifying the pause reason.
call_transfer bit Set to 0 or 1 for events of type ‘c’ (conversation), for all other events the value is NULL. If 1, the call has been transferred (to another agent or to just another number) by the agent just before he/she terminated his/her conversation.
wrap_up_sec int Only set for events of type ‘c’, and only if a wrap up time is predefined for the agent. Wrap-up time is the time after a terminated call until the agent is ready for new incoming calls. Value is expressed in seconds.
block_duration_sec int Only used for Conversation events, and only if busy or no-answer is the result for the call. After such a result, the user may be set “passive” for a short period. The duration of such a period will be set here. Value is expressed in seconds.
internal_adr_id bigint For internal use, for “connection” back to Puzzel’s internal system. Only set for “call centre events”.
internal_odr_id bigint Only set for Conversation events. For internal use, and also the column linking the event to it’s “origin” in the call_event table. NOTE! For emails and chats we do not have any internal_odr_id from the “base system”, still a “link” to the corresponding record in table call_events is wanted. To separate this from phone calls (avoid value conflicts), all internal_odr_id values for email and chats conversation will hold negative values –  as the corresponding record’s column rec_id in table call_events is multiplied with -1
internal_country_ src_db Varchar(10) Mostly for internal use. Indicates the country for the database (internally) where the original record is fetched from. International standard for country codes is used (for example ‘NO’ for Norway, ‘SE’ for Sweden, and so on).
dte_updated datetime A timestamp indicating when this agent_event record is stored/last updated in this database.
phone_type int To indicate if it’s a Puzzel Softphone or external phone that is used by the agent. Value 1 or 2. See table ‘phone_types’ for details. (Introduced in version NULL value for older records.)
usergroup_id int See ‘table’ (actually a view) user_groups for description.


Last updated