myContactCenterManual

Events and commands

All events an agent script can react to, the commands and properties it can use, the most important data of a conversation and the namespaces of the types.

An agent script overrides the events it should react to. All of them are public virtual void; an event that the script does not override only writes a line to the log.

Events for conversations

Each event exists twice: for all conversations the Agent knows, and with My_ in front for its own — those this agent is assigned to. conversation is always of type Struct_Conversation.

Event Further parameters Occurs when …
ConversationRegistered – the Agent learns about a conversation
ConversationUnregistered – a conversation ends; the own event also when this agent was its previous agent
ConversationStateChanged ConversationState previousState, ConversationState state its state changes — the most frequently used event
ConversationAgentChanged Struct_Agent agent another agent takes it over
ConversationSkillChanged Struct_Skill previousSkill, Struct_Skill skill its skill changes
ConversationLanguageChanged Struct_Language language its language changes
ConversationAgentLanguageChanged Struct_Language language the language in which the agent conducts it changes
ConversationAttachedDataReceived Struct_ConversationAttachedData elements its attached data arrives again in full
ConversationAttachedDataElementAdded, ConversationAttachedDataElementRemoved ConversationDataElement element an item of attached data is added or removed
ConversationPositionChanged int position its position in the queue changes
ConversationQueueTimeChanged, ConversationStartTimeChanged DateTime time the time of queuing or of the start changes
ConversationQuickPicked Struct_Agent agent an agent picks it; the own event if it was this agent
ConversationSenderChanged, ConversationRecipientChanged string sender or string recipient the name of the sender or recipient changes
ConversationContactIdChanged string previousContactId, string contactId its contact ID changes
ConversationTypeChanged ConversationType previousType, ConversationType type its conversation type changes
ConversationVIPClassChanged Struct_VIPClass vipClass it gets a VIP class
ConversationPbxSettingsChanged Struct_PbxSettings previous, Struct_PbxSettings pbxSettings its phone system changes
ConversationRecordingPermissionChanged bool permitted whether it may be recorded changes
ConversationRecordingChanged all: Struct_Agent agent before conversation; both: bool isRecording a recording starts or ends

Only for all conversations, there are also ConversationTranscribingChanged(Struct_Agent agent, Struct_Conversation conversation, bool isTranscribing) — a transcription starts or ends — and ConversationsReplaced(): the Agent has reloaded the list of all conversations.

Events for all agents

The first parameter is always the agent concerned, Struct_Agent agent.

Event Further parameters Occurs when …
AgentLogon, AgentLogoff for AgentLogoff: AgentLogoffReason reason an agent logs in or off
AgentWrapupChanged bool state an agent goes into wrap-up or ends it
AgentWrapupUntil DateTime until it is known when their dynamic wrap-up ends
AgentWrapupTerminated – their dynamic wrap-up ends
AgentActivityChanged bool state, Struct_Activity activityType an agent starts or ends an activity
AgentPresenceStateChanged RichPresenceState richPresenceState their presence changes
AgentMicrophoneMuteChanged bool muteState they mute or unmute their microphone
AgentConfigChanged – their settings change
AgentPbxSettingsChanged string pbx their phone system changes

Events for this agent

Event Parameters Occurs when …
My_AgentLogon, My_AgentLogoff for My_AgentLogoff: AgentLogoffReason reason the agent logs in or off
My_AgentConnected, My_AgentDisconnected for My_AgentDisconnected: UnregisterReason reason the connection to the server is established or lost
My_AgentIdleChanged bool state the agent becomes free or busy
My_AgentWrapupChanged bool state they go into wrap-up or end it
My_AgentWrapupUntil DateTime until it is known when their dynamic wrap-up ends
My_AgentWrapupTerminated – their dynamic wrap-up ends
My_AgentMaxWrapupTimeElapsed – the maximum duration of their dynamic wrap-up has elapsed
My_AgentActivityChanged bool state, Struct_Activity activityType they start or end an activity
My_AgentPresenceStateChanged RichPresenceState richPresenceState their presence changes
My_AgentMicrophoneMuteChanged bool muteState they mute or unmute their microphone
My_AgentConfigurationChanged – their settings change
My_AgentPbxSettingsChanged string pbx their phone system changes
My_AgentConversationDispatched Struct_Conversation contact a conversation is delivered to them
My_AgentWarnHandlingTimeReached Struct_Conversation conversation the warning time for handling is reached
My_AgentActivityPermissionReceived, My_AgentWrapupPermissionReceived, My_AgentLogoffPermissionReceived, My_AgentSkillChangePermissionReceived, My_AgentLanguageChangePermissionReceived ConstraintReason permission the server answers a request for an activity, wrap-up, logoff or a change of skill or language, see Constraints
My_AgentChatMessageReceived string conversationId, string message a chat message arrives; message is HTML
My_AgentChatFeedReceived string conversationId, IEnumerable<ChatMessage> feed the history of a chat arrives
My_AgentMimeMessageReceived MimeMessage mimeMessage a requested email arrives, see Request_MimeMessage
My_AgentPOPUPMessageReceived string head, string body a message for the notification window arrives
My_AgentStatisticsReceived RealtimeAgentStatistics statistics their real-time statistics arrive
My_RecordingSummaryReceived RecordingSummary recordingSummary a recording is complete; contains FilePath, FileTotalTime and FileSize, among others

Properties

Property Content
Agent this agent (Struct_Agent), with Name, Id, Extension, Wrapup, Activity, Idle, among others
AgentConversations the conversations of this agent
Conversations all conversations the Agent knows; subsets such as Calls, Emails, Chats and InboundCalls
Trace the log of the script: Trace.Info(…), Trace.Warning(…), Trace.Error(…), Trace.Verbose(…)

Commands

Command Effect
BrowseTo(string url, bool openInNewTab = false) opens the address in the Browser module — in the active tab or in a new one
Show(Form form) shows a window of your own above the main window of the Agent
AcceptConversation(Struct_Conversation conversation) accepts a call on the softphone of the Agent; the command does not accept other channels
TerminateConversation(Struct_Conversation conversation) ends the conversation
HangupActiveCall() hangs up all accepted calls on the softphone, including held ones
HangupAllCalls() hangs up all calls on the softphone
Wrapup(bool state) true requests wrap-up, with the same checks as when done manually; false ends it
TerminateDynamicWrapup() ends the current dynamic wrap-up
Activity(false) ends the current activity
Logoff() requests logoff like the agent does manually; if it is allowed, the agent is logged off and the program closes
CreateEMail(string subject, string to), CreateEMail(string subject, string to, string skill, string language) creates a new email; skill and language by name
Request_MimeMessage(Struct_Conversation conversation) requests the email of the conversation; it arrives with My_AgentMimeMessageReceived
SendMail(MimeMessage email, string conversationId) sends the message as a reply in an existing email conversation
ShowBusyLight(ConversationState state), ShowBusyLight(RichPresenceState state), SetBusyLightOff() controls a connected status light (busylight)

Data of a conversation

The most important properties of Struct_Conversation:

Property Content
Id, TicketId ID of the conversation and of its ticket
State, PreviousState state and previous state
ConversationType, ChannelType conversation type and channel
IsCall, IsInboundCall, IsEmail, IsChat kind of conversation
Skill, SkillName, Language skill and language
Agent the agent of the conversation
SenderName, SenderNumber, SenderMailAddress name, number and address of the sender
CallerNumber, CalledNumber number of the caller and the dialed number
Subject subject
AttachedData the attached data

You read attached data with conversation.AttachedData.StringValue("Key") — case-insensitive, and an empty string if the key is missing. The script only reads attached data; it cannot change it.

Namespaces

Namespace Types
ilogixx.Agent MyCCAgentScript
ilogixx.SharedFiles.GeneralDefinitions Struct_Conversation, Struct_Agent, Struct_Skill, Struct_Language, Struct_Activity, Struct_VIPClass, Struct_PbxSettings, Struct_ConversationAttachedData, ConversationDataElement
ilogixx.SharedFiles.GeneralEnums ConversationState, ConversationType, ChannelType, RichPresenceState
ilogixx.SharedFiles ConstraintReason, ChatMessage, RealtimeAgentStatistics
ilogixx AgentLogoffReason, UnregisterReason
ilogixx.General.Shared RecordingSummary
MimeKit MimeMessage
System.Windows.Forms Form

The script can use all libraries in the program folder of the Agent — so also .NET itself, for example System.Net.Http for web services or System.Diagnostics.Process to start programs.

    ↑ ↓ select · Enter open · Esc close