Class AgentLinkClass
Constructor Attributes | Constructor Name and Description |
---|---|
AgentLinkClass(container)
AgentLink API entry point.
|
Field Attributes | Field Name and Description |
---|---|
Array of possible global actions for agent.
|
|
URL to the Hermes.Net Admin Webservice to be called on the server side by the LocalWebServiceProxy.
|
|
URL to the Hermes.Net Admin Webservice.
|
|
- Id of the agent currently logged.
|
|
- Lastname and firstname of the agent currently logged.
|
|
- Oid of the agent currently logged.
|
|
- Adress for the CTIProxy NT Service
|
|
- Current Agent Global state.
|
|
- Current Agent Global state detail code.
|
|
- Current Agent Global state as string.
|
|
- Id of the statioh used by the agent.
|
|
- True if the agent phone auto answer, false if agent has to answer manually.
|
|
- Two items, one for each agent line containing CallData.
|
|
- Array of {@link Campaign) containing all the campaigns on which the agent is affected (active or disabled).
|
|
- Manage the chat context (agent rights on context, opened session, etc.
|
|
- True while proxy socket is alive.
|
|
- Array of Contact available for this agent.
|
|
URL to the Hermes.Net CRM Webservice to be called on the server side by the LocalWebServiceProxy.
|
|
URL to the Hermes.Net CRM Webservice.
|
|
- Id of the Hermes.Net customer - Readonly.
|
|
- Manage the fax context (agent rights on context, opened session, etc.
|
|
- True if the socket to the proxy has been connected during the instance lifetime.
|
|
- Localisation to use by CTIProxy (complete list)
|
|
Url for the "webProxy" page to use if needed with cross domain calls.
|
|
- True after a successul agent login, until logout or socket down.
|
|
- Manage the email context (agent rights on context, opened session, etc.
|
|
URL to the Hermes.Net MailEditor webservice
|
|
URL to the Hermes.Net MailEditor webservice to be called on the server side by the LocalWebServiceProxy.
|
|
- Array of {@link ManualCampaign) containing all the manual campaigns on which the agent is affected.
|
|
URL to the Hermes.Net OnMedia Webservice followed by the MediaServer connection information.
|
|
URL to the Hermes.Net OnMedia Webservice to be called on the server side by the LocalWebServiceProxy, followed by the MediaServer connection information.
|
|
- Array of PauseCode available for this agent.
|
|
- Port to connect to the CTIProxy NT Service
|
|
- Informations about options, proxy version, etc.
|
|
- Array of {@link SentenceCategory) available for the agent.
|
|
- Manage the social network context (agent rights on context, opened session, etc.
|
|
- Array of SuperviseGroup defined on the agent Hermes.Net site.
|
|
- Manage the telephony context (agent rights on context, opened session, etc.
|
|
- Manage the voicemail context (agent rights on context, opened session, etc.
|
|
- Current webcam supervise state.
|
Method Attributes | Method Name and Description |
---|---|
ActionIsReady(action)
Used to know if a global action is allowed at this time.
|
|
attachEvent(event, handler)
Used to listen a particular event.
|
|
Cancel the previous TempNotReady request (AgentLinkClass#RequestTempNotReady())
|
|
ChangeRecordName(context, path)
Change the name of the recording in progress.
|
|
Connect()
Connect to the CTIProxy.
|
|
CrmAddClient(oidCompany, client, mediaKey, crmOid)
Add a new contact in the adress book.
|
|
CrmDeleteClient(oidCompany, client, crmOid)
Delete a contact in the adress book, if the client is not found in the adress book.
|
|
CrmGetClientInfos(oidCompany, mediaInfo, sessionId, crmOid, media, subType)
Search a contact in the adress book with the specified media value (phonenumber, email, etc).
|
|
CrmSaveClient(oidCompany, client, mediaKey, crmOid, manualOperation)
Save a contact in the adress book.
|
|
CrmSearchClient(oidCompany, client, mediaKey, crmOid)
Search a contact in the adress book.
|
|
CrmUpdateContactGuid(ctxType, companyOid, newContactGuid, sessionId)
Update the GUID of a contact on the Address Book
|
|
Disconnect from the CTIProxy.
|
|
GetCampaignById(campaignId)
Get the campaign object for an id
|
|
GetCanalAllCallbacks(context, hermesday, timezone, fctHandler)
Request to get all the callbacks for a context.
|
|
GetCommandObj(contextType)
Return the AgentLink command object (TelephonyContext|ChatContext|FaxContext|MailContext|SocialNetworkContext|VoicemailContext) for a context type
|
|
GetContextPersonalCallbacksStart(context, hermesday)
Request to get all personal callbacks for a context.
|
|
Stop to listen for personal callbacks for a context (started with function AgentLinkClass#GetContextPersonalCallbacksStart)
|
|
GetHolidays(group)
Get the holidays items in the holiday group
|
|
GetOpeningHours(group)
Get the timerange items in the opening hour group
|
|
GetPause(code)
Get a PauseCode from the pause code id
|
|
GetSentencesByCategory(groupOid, categoryOid)
Get the sentences on a category of a sentence group.
|
|
GetSentencesByCategoryPath(groupOid, categoryOid)
Get the sentences on a category of a sentence group.
|
|
Hangup()
Hangup the active personal phone call.
|
|
HelpMe(state)
Send a help request to the supervisor
|
|
HistoryLoadClientHistory(oidCompany, client, askKey)
Load the contact history.
|
|
HistoryLoadOfflineChatHistory(campaignId, indice, gmt, askKey)
Load a chat feed in the history.
|
|
HistoryLoadOfflineFaxHistory(campaignId, indice, askKey, additionalData)
Load a fax's informations in the history.
|
|
HistoryLoadOfflineMailHistory(campaignId, askKey, sessionId, treatmentDate, withInitialMessage)
Load a mail's informations in the history.
|
|
HistoryLoadOfflineSocialNetworkHistory(campaignId, sessionId, askKey, treatmentDate, additionalData)
Load a social network feed's informations in the history.
|
|
HistoryLoadOfflineVoiceMailHistory(campaignId, indice, askKey)
Load a voicemail file path in the history.
|
|
Get the name of the last command that fireing the OfCom mode
|
|
Login(userID, password, station)
Connect specified agent, station can be empty.
|
|
Logout()
Disconnect specified agent.
|
|
LostSoftPhone(islost)
Inform supervision of a problem with the SoftPhone audio device
|
|
Return the delay to wait to ensure OfCom functionnality.
|
|
PersonalCall(number, type, data, memo)
Dial a personal phone call.
|
|
Play(soundFile, startPosition)
Play a wav file on the Agent first line.
|
|
PlaySVI(ivr)
Play a SVI file on the Agent first line.
|
|
QualificationCodes(group)
Get the list of Qualification in the group
|
|
Record(fileName, option, force)
Start recording the agent call that is in progress.
|
|
Stop the record in progress.
|
|
RequestPause(reason, typeAction)
Change the agent state to Pause.
|
|
Change the agent state to Ready.
|
|
Request CTI to set the agent as not ready, used to left time for manual dialing.
|
|
SearchModeSelect(indice, makeCall, number)
Call a client for a search mode on an outbound campaign.
|
|
SendChatSupMsg(typeMessage, messageStr, oid)
Send a chat message to the supervisor on a chatroom previously opened by the supervisor.
|
|
SignalContextDisplayed(context)
Signal the current context displayed on the agent interface.
|
|
SignalScriptPosition(context, sessionId, pageName, scriptId, marker, markerType)
Send a marker to the supervision module.
|
|
SignalWebcamState(state)
Signal the current webcam state.
|
|
StartContext(context, detail)
Start the specified context.
|
|
StartQueue(context, queue_array)
Start a list of queues on the specified context.
|
|
Stop()
Stop the wav file played on the Agent first line.
|
|
StopContext(context, detail)
Stop the specified context.
|
|
StopQueue(context, queue_array)
Stop a list of queues on the specified context.
|
Event Attributes | Event Name and Description |
---|---|
OnAddClientDone(guid, clientAdded, mediaKey)
When the CRM Add operation requested by function AgentLinkClass#CrmAddClient is done
|
|
OnAffectationChange(context, action, theObject)
A queue has changed for this agent (or state of one of the queues affected).
|
|
OnAgentStateChange(media, stateCode, stateLabel)
Agent state was changed.
|
|
OnChatRecordChangeName(session)
When the name of the last chat recording made must renamed, according the name strategy defined on the Hermes.Net Admin
Instead of telephony records, the renaming is at the charge of integrator (as starting the videochat record)
|
|
OnChatRecordDeleted(session)
When the last chat recording must be deleted
Instead of telephony records, the renaming is at the charge of integrator (as starting the videochat record)
|
|
OnChatSessionMsgReceived(sessionId, msgType, message, senderType, sender, whisper)
A regular chat Message received
|
|
OnConfigChange(action, objectType, theObject)
An object was created/updated/deleted in admin.
|
|
OnConnect(success)
Fired on connection completion.
|
|
Fired when the connection process is starting
|
|
Fired when the connection timeout is reached.
|
|
OnCountCallbacksComplete(contextType, callbacks)
Fired when callbacks for the current hour are received
Next callbacks are loaded by calling the function CountNextCallbacks an a context manager
|
|
OnCrmReceiveClientInfo(mediaKey, mediaNumber, results)
When the client has been identified in adress book (on AgentLinkClass#CrmGetClientInfos function)
mediaNumber : phone number (or email) that permit to identify the client
The result array contains one or more clients of type Consumers
|
|
OnCrmWsError(statusCode, statusText)
When an error occur on CRM webservice
No Adress book informations will be available
|
|
OnDisconnect(true)
Fired on disconnect request completion, or when link failed after a successful connection
|
|
OnGetContextPersonalCallbacks(callbacks)
Fired when personal callbacks for the current hour are received
Personnal callbacks start to be loaded periodicaly by calling the method AgentLinkClass#GetContextPersonalCallbacksStart() and stop by the method AgentLinkClass#GetContextPersonalCallbackStop()
Loading personnal callbacks for FAX / VOICEMAIL / EMAIL / SOCIAL NETWORK needs that MediaServer service is started
|
|
OnGetPhrases(groupOid, phrases)
When the predefined phrases are loaded.
|
|
OnHistoryWsError(statusCode, statusText)
When an error occur on History webservice
No history informations will be available
|
|
OnIgnoreMessageDone(contextType)
When the ignore command sended to mediaserver for SocialNetwork is done.
|
|
OnInfo(context, level, message, code)
A message was received
|
|
OnLineStateChange(lineID, lineState)
When there is a change on the agent telephony line's state
|
|
OnLoadClientHistoryDone(results, askKey)
Fired when the requested history data is loaded, requested by function AgentLinkClass#HistoryLoadClientHistory
|
|
OnLoadOfflineChatHistoryDone(results, askKey)
Fired when the chat feed requested by the function HistoryLoadOfflineChatHistory has been loaded
|
|
OnLoadOfflineFaxHistoryDone(faxInfo, askKey)
Fired when the fax requested by function AgentLinkClass#HistoryLoadOfflineFaxHistory has been loaded
|
|
OnLoadOfflineMailHistoryDone(mailInfo, askKey, withInitialMessage)
Fired when the email information requested by function AgentLinkClass#HistoryLoadOfflineMailHistory has been loaded
|
|
OnLoadOfflineSocialNetworkHistoryDone(snInfo, askKey)
Fired when the socialnetwork feed requested by function AgentLinkClass#HistoryLoadOfflineSocialNetworkHistory has been loaded
|
|
OnLoadOfflineVoiceMailHistoryDone(wInfo, askKey)
Fired when the voicemail information requested by function AgentLinkClass#HistoryLoadOfflineVoiceMailHistory has been loaded
|
|
OnNewIdentificationReady(userId, userPassword, extension)
When user change identification : notify that the Extension informations has been received
|
|
OnPlayingVoiceMail(voicemailSessionId)
When the VoiceMail asked by agent start to play
|
|
OnPlayWavStart(filename)
One Wav File start to play
|
|
OnPlayWavStop(filename)
One Wav File stop to play
|
|
OnQueueStateChange(context, nbPrimary, nbSecondary, nbPersonal)
The number of media waiting change for this agent (on his primary, secondary and personal queue).
|
|
Fired on proxy reconnexion when recovering contexts failed.
|
|
OnSaveClientDone(result, clientSaved, mediaKey, was_forced_saved)
When the CRM save operation requested by function AgentLinkClass#CrmSaveClient is done
result value : 1 : OK, -1 : invalid phone number, -2 : save error
|
|
OnSearchClientDone(result, client, mediaKey, adressBookOid)
When the CRM Search operation requested by function AgentLinkClass#CrmSearchClient is done
|
|
OnSectionsStateChange(context, allowedSections)
Fired when the list of sections allowed on one context change
|
|
OnSessionClose(context, sessionId)
One session is closed
|
|
OnSessionOpen(context, sessionId)
New session opened on one context
|
|
OnSessionStateChange(context, sessionId)
Event on a previously opened sesssion
|
|
OnSessionUpdate(context, sessionId)
Update on session (session is passing from SearchMode to traiting.
|
|
OnSupervisionDatasReceived(context, subContext, agentProdStats)
When production statics listened have change.
|
|
OnSupervisionServiceStateChange(isStarted)
When the state of supervision service state change
The Supervision service is used to get the production statistics and listing agents/supervisor for transfer, consultation, manual call, etc.
|
|
OnSupervisorChatMsgReceived(messageType, message, chatRoomOid, supervisorName)
A chat Message received from supervisor, and if ChatMessageTypes is ChatClosed : it's the end of conversation
|
|
OnSupStateChange(recording, nbListening)
When there is a change of supervisor state (Listening/Recording)
|
|
OnTelephonyRecordChangeName(oldPath, newPath)
Fired when the last recording file should be renamed, according the name strategy defined on the Hermes.Net Admin
|
|
OnTelephonyRecordDelete(filePath)
Fired when the last recording made must be deleted (for automatic record case only).
|
|
OnTelephonyRecordStart(filePath)
When a telephony recording is starting.
|
|
OnTelephonyRecordStop(filePath)
When a telephony recording is stopping
|
|
OnTransferComplete(context, sessionId)
The transfer request is done - will be followed by the OnSessionClose event
|
|
OnUserIdentification(userID, userName, extension, defaultContext, isNetworkRecovering)
User login information.
|
|
OnWebcamSuperviseStateChange(supervisorKey, state)
When the supervisor is showing/unshowing the agent webcam (state change)
The management of webcam video
|
Class Detail
AgentLinkClass(container)
AgentLink API entry point.
- Parameters:
- {DOMObject} container
- - The dom object where the flash component will be added
Field Detail
{COMArray}
ActionsAllowed
Array of possible global actions for agent. Before making a global action, you have to check if the action is in this list. Contains a list of AgentActionAllowed.
To Test if an action is allowed you can use the method AgentLinkClass.ActionIsReady
{string}
AdminServerUrl
URL to the Hermes.Net Admin Webservice to be called on the server side by the LocalWebServiceProxy.
agentlink.AdminUrl = "http://YourServerLocalIP/hermes_net_v5/admin";
{string}
AdminUrl
URL to the Hermes.Net Admin Webservice.
agentlink.AdminUrl = "http://YourServerIP/hermes_net_v5/admin";
{number}
AgentCode
- Id of the agent currently logged. Readonly.
{string}
AgentName
- Lastname and firstname of the agent currently logged. Readonly.
{string}
AgentOid
- Oid of the agent currently logged. Readonly.
{string}
AgentProxy
- Adress for the CTIProxy NT Service
{AgentGlobalStates}
AgentState
- Current Agent Global state. Readonly.
{number}
AgentStateDetail
- Current Agent Global state detail code. Readonly.
{string}
AgentStateLabel
- Current Agent Global state as string. Readonly.
{string}
AgentStation
- Id of the statioh used by the agent. Readonly.
{boolean}
AutoAnswer
- True if the agent phone auto answer, false if agent has to answer manually. Readonly.
{COMArray}
CallInformation
- Two items, one for each agent line containing CallData. Readonly.
{COMArray}
Campaigns
- Array of {@link Campaign) containing all the campaigns on which the agent is affected (active or disabled). Readonly.
{ChatContext}
Chat
- Manage the chat context (agent rights on context, opened session, etc.)
{boolean}
Connected
- True while proxy socket is alive. Readonly.
{COMArray}
Contacts
- Array of Contact available for this agent. Readonly.
{string}
CrmServerUrl
URL to the Hermes.Net CRM Webservice to be called on the server side by the LocalWebServiceProxy.
agentlink.CrmServerUrl = "http://YourServerLocalIP/hermes_net_v5/CRM/";
{string}
CrmUrl
URL to the Hermes.Net CRM Webservice.
agentlink.CrmUrl = "http://YourServerIP/hermes_net_v5/CRM/";
{string}
CustomerId
- Id of the Hermes.Net customer - Readonly.
{FaxContext}
Fax
- Manage the fax context (agent rights on context, opened session, etc.)
{boolean}
HasBeenConnected
- True if the socket to the proxy has been connected during the instance lifetime. Readonly.
{string}
Locale
- Localisation to use by CTIProxy (complete list)
{string}
LocalWebServiceProxy
Url for the "webProxy" page to use if needed with cross domain calls.
The webservice proxy has to send request to the distant server using the "URL" GET request and by
forwading the POST request data.
If not set, no local webproxy will be used.
{boolean}
LoggedIn
- True after a successul agent login, until logout or socket down. Readonly.
{MailContext}
Mail
- Manage the email context (agent rights on context, opened session, etc.)
{string}
MailEditorWebService
URL to the Hermes.Net MailEditor webservice
agentlink.MailEditorWebService = "http://YourServerIP/hermes_net_v5/plateformpublication/MailEditor/Web_Service/MailEditorWS.asmx";
{string}
MailEditorWebserviceServerUrl
URL to the Hermes.Net MailEditor webservice to be called on the server side by the LocalWebServiceProxy.
agentlink.MailEditorWebService = "http://YourServerLocalIP/hermes_net_v5/plateformpublication/MailEditor/Web_Service/MailEditorWS.asmx";
{COMArray}
ManualCampaigns
- Array of {@link ManualCampaign) containing all the manual campaigns on which the agent is affected. Readonly.
{string}
OnMediaWebService
URL to the Hermes.Net OnMedia Webservice followed by the MediaServer connection information.
The MediaServer connection information is relative to the OnMediaWebservice making the call.
var on_media_service = "MediaServerIP:5002"; agentlink.OnMediaWebService = "http://YourServerIP/hermes_net_v5/plateformpublication/OnMedia/Web_Service/MailService.asmx?OMS=" + on_media_service;
{string}
OnMediaWebServiceServerUrl
URL to the Hermes.Net OnMedia Webservice to be called on the server side by the LocalWebServiceProxy, followed by the MediaServer connection information.
The MediaServer connection information is relative to the OnMediaWebservice making the call.
var on_media_service = "MediaServerIP:5002"; agentlink.OnMediaWebServiceServerUrl = "http://YourServerLocalIP/hermes_net_v5/plateformpublication/OnMedia/Web_Service/MailService.asmx?OMS=" + on_media_service;
{COMArray}
PauseCodes
- Array of PauseCode available for this agent. Readonly.
{number}
Port
- Port to connect to the CTIProxy NT Service
{CProxySupport}
ProxySupport
- Informations about options, proxy version, etc. Readonly.
{COMArray}
SentenceCategories
- Array of {@link SentenceCategory) available for the agent. Readonly.
{SocialNetworkContext}
SocialNetwork
- Manage the social network context (agent rights on context, opened session, etc.)
{COMArray}
SuperviseGroups
- Array of SuperviseGroup defined on the agent Hermes.Net site. Readonly.
{TelephonyContext}
Telephony
- Manage the telephony context (agent rights on context, opened session, etc.)
{VoicemailContext}
VoiceMail
- Manage the voicemail context (agent rights on context, opened session, etc.)
{number}
WebcamSuperviseState
- Current webcam supervise state. (0 : Stopped, 1 : Started). Readonly.
Method Detail
ActionIsReady(action)
Used to know if a global action is allowed at this time.
if (agentlink.ActionIsReady(AgentActionAllowed.Logout)) { agentlink.Logout(); }
- Parameters:
- {AgentActionAllowed} action
- - the action to test
- Returns:
- true if the action is allowed, false if the action is not allowed
attachEvent(event, handler)
Used to listen a particular event.
var fctHandler = function(connected) { Log("MyLogger", "DEBUG", "connected"); } agentlink.attachEvent("OnConnect", fctHandler);
- Parameters:
- {string} event
- - the event name to listen
- {function} handler
- - the javascript function handler to call when the event is fired
CancelTempNotReady()
Cancel the previous TempNotReady request (AgentLinkClass#RequestTempNotReady())
ChangeRecordName(context, path)
Change the name of the recording in progress.
- Parameters:
- {ContextTypes} context
- - the context where the record is in progress
- {string} path
- - the new file path to use for the record in progress
Connect()
Connect to the CTIProxy.
Will fire the "OnConnect" event
Will fire the "OnConnect" event
- Returns:
- true if AgentLink isn't already connected
CrmAddClient(oidCompany, client, mediaKey, crmOid)
Add a new contact in the adress book.
This function is asynchronous, when done, fire the "OnAddClientDone" event.
This function is asynchronous, when done, fire the "OnAddClientDone" event.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {Consumers} client
- - client informations to add
- {string} mediaKey
- - type of media used to search the client. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} crmOid
- - adress book oid in the Hermes.Net Admin
CrmDeleteClient(oidCompany, client, crmOid)
Delete a contact in the adress book, if the client is not found in the adress book.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {Consumers} client
- - client informations to add
- {string} crmOid
- - adress book oid in the Hermes.Net Admin
CrmGetClientInfos(oidCompany, mediaInfo, sessionId, crmOid, media, subType)
Search a contact in the adress book with the specified media value (phonenumber, email, etc).
This function is asynchronous, when done, fire the "OnCrmReceiveClientInfo" event.
This function is asynchronous, when done, fire the "OnCrmReceiveClientInfo" event.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {string} mediaInfo
- - value of the media to search
- {string} sessionId
- - session id identifing the media session for wich wa are searhing the client
- {string} crmOid
- - adress book oid in the Hermes.Net Admin
- {string} media
- - type of media on adress book. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} subType
- - used for SocialNetwork context. 1 : Facebook, 2:Twitter. Ignored for other context.
CrmSaveClient(oidCompany, client, mediaKey, crmOid, manualOperation)
Save a contact in the adress book.
This function is asynchronous, when done, fire the "OnSaveClientDone" event.
This function is asynchronous, when done, fire the "OnSaveClientDone" event.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {Consumers} client
- - client informations to save
- {string} mediaKey
- - type of media used to search the client. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} crmOid
- - adress book oid in the Hermes.Net Admin
- {boolean} manualOperation
- - true if the save is done by a manual operation - false if the save is for an automatic operation
CrmSearchClient(oidCompany, client, mediaKey, crmOid)
Search a contact in the adress book.
This function is asynchronous, when done, fire the "OnSearchClientDone" event.
This function is asynchronous, when done, fire the "OnSearchClientDone" event.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {Consumers} client
- - client informations to search. All fields set will be used for search.
- {string} mediaKey
- - type of media used to search the client. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} crmOid
- - adress book oid in the Hermes.Net Admin
CrmUpdateContactGuid(ctxType, companyOid, newContactGuid, sessionId)
Update the GUID of a contact on the Address Book
- Parameters:
- {ContextTypes} ctxType
- - context where to update the contact
- {string} companyOid
- - company oid for the current agent
- {string} newContactGuid
- - new guid to save on contact
- {string} sessionId
- - session id of media for the contact to update
Disconnect()
Disconnect from the CTIProxy.
Will fire the "OnDisconnect" event
Will fire the "OnDisconnect" event
{Campaign}
GetCampaignById(campaignId)
Get the campaign object for an id
- Parameters:
- {string} campaignId
- - id of the campaign to get
- Returns:
- {Campaign} or null if the id is not found
GetCanalAllCallbacks(context, hermesday, timezone, fctHandler)
Request to get all the callbacks for a context.
- Parameters:
- {ContextTypes} context
- - the context used to retrieve the callbacks
- {string} hermesday
- - day used to retrive callbacks (format : yyyyMMdd)
- {number} timezone
- - agent timezone, used to convert callbacks time in the agent timezone
- {function} fctHandler
- - function to call when callbacks will be loaded.
{TelephonyContext|ChatContext|FaxContext|MailContext|SocialNetworkContext|VoicemailContext}
GetCommandObj(contextType)
Return the AgentLink command object (TelephonyContext|ChatContext|FaxContext|MailContext|SocialNetworkContext|VoicemailContext) for a context type
- Parameters:
- {ContextTypes} contextType
- - contextType for wich the command object is required
- Returns:
- {TelephonyContext|ChatContext|FaxContext|MailContext|SocialNetworkContext|VoicemailContext} or null for a not managed context type
GetContextPersonalCallbacksStart(context, hermesday)
Request to get all personal callbacks for a context. When there is new personnal callback, the client will be notified with the event "OnGetContextPersonalCallbacks".
Use the function AgentLinkClass#GetContextPersonalCallbackStop to stop requesting the personal callbacks for the context.
Use the function AgentLinkClass#GetContextPersonalCallbackStop to stop requesting the personal callbacks for the context.
- Parameters:
- {ContextTypes} context
- - the context used to retrieve the callbacks
- {string} hermesday
- - day used to retrive callbacks (format : yyyyMMdd)
GetContextPersonalCallbackStop()
Stop to listen for personal callbacks for a context (started with function AgentLinkClass#GetContextPersonalCallbacksStart)
{Holiday[]}
GetHolidays(group)
Get the holidays items in the holiday group
- Parameters:
- {string} group
- - holiday's group id
- Returns:
- {Holiday[]} or null if the group is not found
{TimeRange[]}
GetOpeningHours(group)
Get the timerange items in the opening hour group
- Parameters:
- {string} group
- - opening hours group id
- Returns:
- {TimeRange[]} or null if the group is not found
{PauseCode}
GetPause(code)
Get a PauseCode from the pause code id
- Parameters:
- {number} code
- - id of the pause code to get
- Returns:
- {PauseCode} or null if the code is not found
GetSentencesByCategory(groupOid, categoryOid)
Get the sentences on a category of a sentence group.
If the sentences are not currently loaded, they will be loading asynchronously.
When sentences are loaded, this function fire the "OnGetPhrases" event.
If the sentences are not currently loaded, they will be loading asynchronously.
When sentences are loaded, this function fire the "OnGetPhrases" event.
- Parameters:
- {string} groupOid
- - Sentences group oid in the Hermes.Net Admin
- {string} categoryOid
- - Sentences category oid in the Hermes.Net Admin
GetSentencesByCategoryPath(groupOid, categoryOid)
Get the sentences on a category of a sentence group.
If the sentences are not currently loaded, they will be loading asynchronously.
When sentences are loaded, this function fire the "OnGetPhrases" event.
If the sentences are not currently loaded, they will be loading asynchronously.
When sentences are loaded, this function fire the "OnGetPhrases" event.
- Parameters:
- {string} groupOid
- - Sentences group oid in the Hermes.Net Admin
- {string} categoryOid
- - Sentences category oid in the Hermes.Net Admin
Hangup()
Hangup the active personal phone call.
Before calling this function, check the agent right AgentActionAllowed.Hangup
Before calling this function, check the agent right AgentActionAllowed.Hangup
HelpMe(state)
Send a help request to the supervisor
- Parameters:
- {number} state
- - 0 : no help requested, 1 : help is requested
HistoryLoadClientHistory(oidCompany, client, askKey)
Load the contact history.
This function is asynchronous, when done, fire the "OnLoadClientHistoryDone" event.
- Parameters:
- {string} oidCompany
- - oid company in the Hermes.Net Admin on which the adress book is defined
- {Consumers} client
- - client informations to search. The ReferenceClient field is used for the history searcg.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
HistoryLoadOfflineChatHistory(campaignId, indice, gmt, askKey)
Load a chat feed in the history.
This function is asynchronous, when done, fire the "OnLoadOfflineChatHistoryDone" event.
- Parameters:
- {string} campaignId
- - Id of the campaign where the chat has been made.
- {number} indice
- - client indice for the chat requested.
- {number} gmt
- - agent GMT offset used to convert the conversation times.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
HistoryLoadOfflineFaxHistory(campaignId, indice, askKey, additionalData)
Load a fax's informations in the history.
This function is asynchronous, when done, fire the "OnLoadOfflineFaxHistoryDone" event.
- Parameters:
- {string} campaignId
- - Id of the campaign where the fax has been recorded.
- {number} indice
- - client indice for the fax when traited by the agent.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
- {boolean} additionalData
- - unused, reserved for a futur usage
HistoryLoadOfflineMailHistory(campaignId, askKey, sessionId, treatmentDate, withInitialMessage)
Load a mail's informations in the history.
This function is asynchronous, when done, fire the "OnLoadOfflineMailHistoryDone" event.
- Parameters:
- {string} campaignId
- - Id of the campaign where the mail has been recorded.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
- {string} sessionId
- - SessionId of the media managed
- {string} treatmentDate
- - Date string of the media treatment date in format yyyyMMddHHmmss
- {boolean} withInitialMessage
- - True if the history can contains the origin message (on email context session, no on email sended on another context)
HistoryLoadOfflineSocialNetworkHistory(campaignId, sessionId, askKey, treatmentDate, additionalData)
Load a social network feed's informations in the history.
This function is asynchronous, when done, fire the "OnLoadOfflineSocialNetworkHistoryDone" event.
- Parameters:
- {string} campaignId
- - Id of the campaign where the fax has been recorded.
- {number} sessionId
- - Session ID of the traitment session.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
- {string} treatmentDate
- - Date when the session has been managed. Format : yyyyMMddHHmmss
- {boolean} additionalData
- - unused, reserved for a futur usage
HistoryLoadOfflineVoiceMailHistory(campaignId, indice, askKey)
Load a voicemail file path in the history.
This function is asynchronous, when done, fire the "OnLoadOfflineVoiceMailHistoryDone" event.
- Parameters:
- {string} campaignId
- - Id of the campaign where the voicemail has been recorded.
- {number} indice
- - client indice for the voicemail when traited by the agent.
- {string} askKey
- - key gived as parameter to identify the event cause if you call this method multiple times before getting the answer.
LastOfComCommand()
Get the name of the last command that fireing the OfCom mode
- Returns:
- the name of the last command that fireing the OfCom mode : CALL, LOGIN, PAUSE, SEARCH_MODE, STOP_CAMPAIGN, STOP_CONTEXT, TEMPNOTREADY, STOP_QUEUE, DISCONNECT_ORDER
Login(userID, password, station)
Connect specified agent, station can be empty. If the station is empty, telephony will be disabled.
Fire "OnUserIdentification" event if success
Fire "OnUserIdentification" event if success
- Parameters:
- {number} userID
- - the agent id in the Hermes.net Admin
- {string} password
- - the agent password
- {string} station
- - the extension id in the Hermes.Net Admin
Logout()
Disconnect specified agent. Keep the connection alive so agent can reconnect with another idents.
Fire "OnUserIdentification" event if success
Fire "OnUserIdentification" event if success
LostSoftPhone(islost)
Inform supervision of a problem with the SoftPhone audio device
- Parameters:
- {boolean} islost
- - true when audio device is lost, false when audio device is retrieve
OfComDelay()
Return the delay to wait to ensure OfCom functionnality.
- Returns:
- the delay to wait in second. -1 if there is no delay to wait
PersonalCall(number, type, data, memo)
Dial a personal phone call.
Before calling this function, check the agent right AgentActionAllowed.PersonalCall
Before calling this function, check the agent right AgentActionAllowed.PersonalCall
- Parameters:
- {string} number
- - phonenumber to dial
- {PhoneNumberTypes} type
- - phonenumber type to dial. Used to add a prefix if needed
- {string} data
- - associate data to specify on the call
- {string} memo
- - memo to specify on the call
Play(soundFile, startPosition)
Play a wav file on the Agent first line.
- Parameters:
- {string} soundFile
- - absolute path of the file on the ACD
- {number} startPosition
- - time shift in second, to start the playing at the specified position
PlaySVI(ivr)
Play a SVI file on the Agent first line.
- Parameters:
- {string} ivr
- - absolute path of the IVR script to play
{Qualification[]}
QualificationCodes(group)
Get the list of Qualification in the group
- Parameters:
- {string} group
- - group qualification code to get
- Returns:
- {Qualification[]} or null if the group is not found
Record(fileName, option, force)
Start recording the agent call that is in progress.
Before calling this function, check the agent right AgentActionAllowed.StartRecording
Before calling this function, check the agent right AgentActionAllowed.StartRecording
- Parameters:
- {string} fileName
- - absolute path of the recorded file to create
- {number} option
- - 0 : agent and customer, 1 : customer only, 2 agent only
- {Boolean} force
- : force the record, even if disabled in the IVR
RecordStop()
Stop the record in progress.
Before calling this function, check the agent right AgentActionAllowed.StopRecording
Before calling this function, check the agent right AgentActionAllowed.StopRecording
RequestPause(reason, typeAction)
Change the agent state to Pause.
If the action AgentActionAllowed.Pause is not allowed, the pause request will be pending
If the action AgentActionAllowed.Pause is not allowed, the pause request will be pending
- Parameters:
- {number} reason
- - the pause code to use
- {number} typeAction
- - if 0, request the pause immediately, if > 0, can use the pending pause mode.
RequestReady()
Change the agent state to Ready.
Verify that the action AgentActionAllowed.Ready is allowed before calling this method.
Verify that the action AgentActionAllowed.Ready is allowed before calling this method.
RequestTempNotReady()
Request CTI to set the agent as not ready, used to left time for manual dialing.
SearchModeSelect(indice, makeCall, number)
Call a client for a search mode on an outbound campaign.
- Parameters:
- {number} indice
- - the indice of client to call in the database
- {number} makeCall
- - 0 : direct all, 1 : preview call
- {string} number
- - phone number to call formatted as an external phone number
- Deprecated:
- use the TelephonySession#SearchModeSelect instead
SendChatSupMsg(typeMessage, messageStr, oid)
Send a chat message to the supervisor on a chatroom previously opened by the supervisor.
- Parameters:
- {ChatMessageTypes} typeMessage
- - the type of message to send
- {string} messageStr
- - the message to send
- {string} oid
- - the chat room oid for this conversation
SignalContextDisplayed(context)
Signal the current context displayed on the agent interface. One delay of 1sec will apply before sending the information to the proxy.
- Parameters:
- {ContextTypes} context
- - the context displayed on the agent interface
SignalScriptPosition(context, sessionId, pageName, scriptId, marker, markerType)
Send a marker to the supervision module. Marker are used to help the supervisor to monitor the agent activity.
- Parameters:
- {ContextTypes} context
- - the context linked to the marker
- {string} sessionId
- - the session identifier linked to the marker
- {string} pageName
- - the script page name linked to the marker (you can use a free string if you are not in a script)
- {number} scriptId
- - the script id linked to the marker (you can use a free id if you are not in a script)
- {string} marker
- - marker identifier
- {number} markerType
- - 0 : automatic marker, 1 : free marker
SignalWebcamState(state)
Signal the current webcam state. This allow the supervisor if this agent can be monitored.
- Parameters:
- {number} state
- - 3 : ready, 2 : webcam use is denied by the user, 1 : no webcam on the computer, 5 : connection to the FMS failed
StartContext(context, detail)
Start the specified context.
Check the right ContextActionAllowed.EnableContext|ContextActionAllowed.EnableContextInbound|ContextActionAllowed.EnableContextOutbound before using this function.
Check the right ContextActionAllowed.EnableContext|ContextActionAllowed.EnableContextInbound|ContextActionAllowed.EnableContextOutbound before using this function.
- Parameters:
- {ContextTypes} context
- - the context to start
- {TelephonyModes} detail
- - for telephony, specify the telephony context to start. In other case use TelephonyModes.All
StartQueue(context, queue_array)
Start a list of queues on the specified context.
Check the right ContextActionAllowed.ChangeAffectation|ContextActionAllowed.ChangeAffectationInbound|ContextActionAllowed.ChangeAffectationOutbound before using this function.
When calling this function, the array must contains at least one queue id.
Check the right ContextActionAllowed.ChangeAffectation|ContextActionAllowed.ChangeAffectationInbound|ContextActionAllowed.ChangeAffectationOutbound before using this function.
When calling this function, the array must contains at least one queue id.
- Parameters:
- {ContextTypes} context
- - the context on wich starting queues
- {number[]} queue_array
- - list of queues id to start
Stop()
Stop the wav file played on the Agent first line.
Before calling this function, check the agent right AgentActionAllowed.StopWav
Before calling this function, check the agent right AgentActionAllowed.StopWav
StopContext(context, detail)
Stop the specified context.
If some session are still open on the context, the stop will be effective only when all sessions will be closed.
Check the right ContextActionAllowed.EnableContext|ContextActionAllowed.EnableContextInbound|ContextActionAllowed.EnableContextOutbound before using this function.
If some session are still open on the context, the stop will be effective only when all sessions will be closed.
Check the right ContextActionAllowed.EnableContext|ContextActionAllowed.EnableContextInbound|ContextActionAllowed.EnableContextOutbound before using this function.
- Parameters:
- {ContextTypes} context
- - the context to start
- {TelephonyModes} detail
- - for telephony, specify the telephony context to start. In other case use TelephonyModes.All
StopQueue(context, queue_array)
Stop a list of queues on the specified context.
Check the right ContextActionAllowed.ChangeAffectation|ContextActionAllowed.ChangeAffectationInbound|ContextActionAllowed.ChangeAffectationOutbound before using this function.
Be sure to keep always one started queue after calling this function. If all queues has to be stopped, use the AgentLinkClass#StopContext instead.
Check the right ContextActionAllowed.ChangeAffectation|ContextActionAllowed.ChangeAffectationInbound|ContextActionAllowed.ChangeAffectationOutbound before using this function.
Be sure to keep always one started queue after calling this function. If all queues has to be stopped, use the AgentLinkClass#StopContext instead.
- Parameters:
- {ContextTypes} context
- - the context on wich stopping queues
- {number[]} queue_array
- - list of queues id to stop
Event Detail
OnAddClientDone(guid, clientAdded, mediaKey)
When the CRM Add operation requested by function AgentLinkClass#CrmAddClient is done
var fctHandler = function(guid, client, mediaKey) { if (guid != "") { Log("MyLogger", "DEBUG", "Contact " + client.Name + " has been added to the adress book"); } else { Log("MyLogger", "DEBUG", "Error while adding contact " + client.Name); } } agentlink.attachEvent("OnAddClientDone", fctHandler);
- Parameters:
- {string} guid
- - new guid for the added client. If null or empty : error on add
- {Consumers} clientAdded
- - the client added on this event
- {string} mediaKey
- - type of media on adress book. Valid values are "cti", "mail", "fax", "social_network", "cookie"
OnAffectationChange(context, action, theObject)
A queue has changed for this agent (or state of one of the queues affected). A queue is removed, started, stopped, etc.
var fctHandler = function(contextType, configOperation, obj) { var context = ""; if (contextType == ContextTypes.Telephony) { context = (obj.IsTelephonyOutbound) ? "OUTBOUND" : "INBOUND"; } else { context = ContextNameFromEnum(contextType); } var operationNamed = ""; switch (configOperation) { case ConfigOperations.Update: operationNamed = "UPDATED"; break; case ConfigOperations.Delete: operationNamed = "DELETED"; break; case ConfigOperations.Create: operationNamed = "CREATED"; break; } Log("MyLogger", "DEBUG", "A queue configuration change on the context named :" + context + ". Operation:" + operationNamed); } agentlink.attachEvent("OnAffectationChange", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context destinatory of the message
- {ConfigOperations} action
- - Type of action fireing the event
- {object} theObject
- - Object of wich the change occur
OnAgentStateChange(media, stateCode, stateLabel)
Agent state was changed. Global state, or state for a specified context
var fctHandler = function(contextType, state, stateString) { if (contextType == ContextTypes.Global) { if (state == AgentGlobalStates.Off) { Log("MyLogger", "DEBUG", "Agent is disconnected"); } else if (state == AgentGlobalStates.Pause) { Log("MyLogger", "DEBUG", "Agent is in pause"); } else { Log("MyLogger", "DEBUG", "Agent state : " + stateString); } } } agentlink.attachEvent("OnAgentStateChange", fctHandler);
- Parameters:
- {ContextTypes} media
- - context for whitch the text change
- {AgentGlobalStates} stateCode
- - new agent state
- {string} stateLabel
- - textual representation of the state
OnChatRecordChangeName(session)
When the name of the last chat recording made must renamed, according the name strategy defined on the Hermes.Net Admin
Instead of telephony records, the renaming is at the charge of integrator (as starting the videochat record)
var fctHandler = function(chatSession) { Log("MyLogger", "DEBUG", "Videochat recorded file has to be renamed for session " + chatSession.SessionId); } agentlink.attachEvent("OnChatRecordChangeName", fctHandler);
- Parameters:
- {ChatSession} session
- - the chatsession with the record to rename
OnChatRecordDeleted(session)
When the last chat recording must be deleted
Instead of telephony records, the renaming is at the charge of integrator (as starting the videochat record)
var fctHandler = function(chatSession) { Log("MyLogger", "DEBUG", "Videochat recorded file has to be deleted for session " + chatSession.SessionId); } agentlink.attachEvent("OnChatRecordDeleted", fctHandler);
- Parameters:
- {ChatSession} session
- - the chatsession with the record to delete
OnChatSessionMsgReceived(sessionId, msgType, message, senderType, sender, whisper)
A regular chat Message received
var fctHandler = function(sessionId, msgType, message, senderType, sender, senderName, whisper) { Log("MyLogger", "DEBUG", "Chat message received : " + message); } agentlink.attachEvent("OnChatSessionMsgReceived", fctHandler);
- Parameters:
- {string} sessionId
- - The chat session where the message is received
- {ChatMessageTypes} msgType
- - The type of message received
- {string} message
- - The message received
- {ChatterTypes} senderType
- - The type of message sender
- {string} sender
- - Name of the message sender
- {boolean} whisper
- - Indicate that the message is private for this agent or not (on chat consulation or supervisor whisper message)
OnConfigChange(action, objectType, theObject)
An object was created/updated/deleted in admin. Show ConfigObjects enum to see the list of supported objects.
var fctHandler = function(operation, objType, obj) { Log("MyLogger", "DEBUG", "A change operation occure on the object type:" + objType); } agentlink.attachEvent("OnConfigChange", fctHandler);
- Parameters:
- {ConfigOperations} action
- - Type of action fireing the event
- {ConfigObjects} objectType
- - Type of object fireing the event
- {object} theObject
- - Object of wich the change occur
OnConnect(success)
Fired on connection completion. True if connection is sucessfull. Login can be called after this event
var fctHandler = function(connected) { Log("MyLogger", "DEBUG", "connected"); } agentlink.attachEvent("OnConnect", fctHandler);
- Parameters:
- {boolean} success
OnConnectionStart()
Fired when the connection process is starting
var fctHandler = function() { Log("MyLogger", "DEBUG", "agentlink is starting to connect to the CT-Proxy"); } agentlink.attachEvent("OnConnectionStart", fctHandler);
OnConnectionTimeout()
Fired when the connection timeout is reached. AgentLink will try to reconnect automaticaly
var fctHandler = function() { Log("MyLogger", "DEBUG", "Connection timeout. Trying to reconnect in 2sec"); } agentlink.attachEvent("OnConnectionTimeout", fctHandler);
OnCountCallbacksComplete(contextType, callbacks)
Fired when callbacks for the current hour are received
Next callbacks are loaded by calling the function CountNextCallbacks an a context manager
var fctHandler = function(contextType, callbacks) { var count = 0; for (var i = 0; i < callbacks.length; i++) { count += callbacks[i].CallbacksNumber; } Log("MyLogger", "DEBUG", "Number of callbacks in the next hour : " + count); } //Attach the event one time only agentlink.attachEvent("OnCountCallbacksComplete", fctHandler);
- Parameters:
- {ContextTypes} contextType
- - contextType on which next callbacks are just loaded
- {CallbackStruct[]} callbacks
- - list of callbacks for the next hour
OnCrmReceiveClientInfo(mediaKey, mediaNumber, results)
When the client has been identified in adress book (on AgentLinkClass#CrmGetClientInfos function)
mediaNumber : phone number (or email) that permit to identify the client
The result array contains one or more clients of type Consumers
var fctHandler = function(mediaKey, mediaNumber, results) { Log("MyLogger", "DEBUG", results.length + " contacts with email adress " + mediaNumber + " are founds in the adress book"); } //Attach the event one time only agentlink.attachEvent("OnCrmReceiveClientInfo", fctHandler); //Get a client on the adress book, identified by email var oid_company = "YourCompanyOid"; //needed var session = agentlink.Mail.GetSession(); agentlink.CrmGetClientInfos(oid_company, session.ContactNumber, session.SessionId, session.CrmOid, "mail", 0);
- Parameters:
- {string} mediaKey
- - type of media on adress book. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} mediaNumber
- - media value (phone number for cti, email adress for adress, etc)
- {Array} results
- - Array of Consumers matching the CrmGetClientInfos requested
OnCrmWsError(statusCode, statusText)
When an error occur on CRM webservice
No Adress book informations will be available
- Parameters:
- {number} statusCode
- - error code
- {string} statusText
- - textual reason for the error
OnDisconnect(true)
Fired on disconnect request completion, or when link failed after a successful connection
var fctHandler = function(isUserChoice) { Log("MyLogger", "DEBUG", "disconnected. normal:" + isUserChoice); } agentlink.attachEvent("OnDisconnect", fctHandler);
- Parameters:
- {boolean} true
- if the disconnection is the result of the user choice.
OnGetContextPersonalCallbacks(callbacks)
Fired when personal callbacks for the current hour are received
Personnal callbacks start to be loaded periodicaly by calling the method AgentLinkClass#GetContextPersonalCallbacksStart() and stop by the method AgentLinkClass#GetContextPersonalCallbackStop()
Loading personnal callbacks for FAX / VOICEMAIL / EMAIL / SOCIAL NETWORK needs that MediaServer service is started
function LZ(x) { return (x < 0 || x > 9 ? "" : "0") + x } var fctHandler = function(callbacks) { var count = 0; for (var i = 0; i < callbacks.PersonalCallbacks.length; i++) { for (var j = 0; j < callbacks.PersonalCallbacks[i].Callbacks.length; j++) { count += callbacks.PersonalCallbacks[i].Callbacks[j].CallbacksNumber; } } Log("MyLogger", "DEBUG", "Number of email personal callbacks today : " + count); } //Attach the event one time only agentlink.attachEvent("OnGetContextPersonalCallbacks", fctHandler); //Start to listen the number of personal callbacks var dte = new Date(); var dateString = dte.getYear() + LZ(dte.getMonth() + 1) + LZ(dte.getDate()); agentlink.GetContextPersonalCallbacksStart(ContextTypes.Mail, dateString);
- Parameters:
- {CallbackForDayPerMinute} callbacks
- - struct with all personal callbacks for one context / day
OnGetPhrases(groupOid, phrases)
When the predefined phrases are loaded. This event is fired only after a call to the function GetSentencesByCategory
If sentences are already loaded, the events will be fired directly. Else, the sentences will be loaded on a webservice
var fctHandler = function(groupOid, phrases) { Log("MyLogger", "DEBUG", phrases.Count + " phrases are available on group " + groupOid); } //attach the event one time only agentlink.attachEvent("OnGetPhrases", fctHandler); //Request sentences when needed. var groupOidToLoad = "GroupOidTest"; var categoryOidToLoad = "CategoryOidTest"; agentlink.GetSentencesByCategory(groupOidToLoad, categoryOidToLoad);
- Parameters:
- {string} groupOid
- - The oid of sentences group loaded
- {COMArray} phrases
- - Array of sentences loaded
OnHistoryWsError(statusCode, statusText)
When an error occur on History webservice
No history informations will be available
- Parameters:
- {number} statusCode
- - error code
- {string} statusText
- - textual reason for the error
OnIgnoreMessageDone(contextType)
When the ignore command sended to mediaserver for SocialNetwork is done.
This command is managed asynchronously.
- Parameters:
- {ContextTypes} contextType
- - contextType on which the event is fired. Only SocialNetwork and Email for now.
OnInfo(context, level, message, code)
A message was received
var fctHandler = function(mediaType, level, message, code) { Log("MyLogger", "DEBUG", "Message CTI - Level:" + level + " - Message:" + message); } agentlink.attachEvent("OnInfo", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context destinatory of the message
- {MessageLevels} level
- - Type of information contains in the message
- {string} message
- - The message content
- {string} code
- - The message type code
OnLineStateChange(lineID, lineState)
When there is a change on the agent telephony line's state
var fctHandler = function(lineID, lineState) { switch (lineState) { case LineStates.Cleared: Log("MyLogger", "DEBUG", "Call on line " + lineID + " is terminated"); break; case LineStates.Alerting: Log("MyLogger", "DEBUG", "Line " + lineID + " is alerting - agent should take the call"); break; case LineStates.Online: Log("MyLogger", "DEBUG", "Call on " + lineID + " is established"); break; case LineStates.Hold: Log("MyLogger", "DEBUG", "Call on " + lineID + " is on hold"); break; case LineStates.Dialing: Log("MyLogger", "DEBUG", "Call on " + lineID + " is dialing"); break; } } agentlink.attachEvent("OnLineStateChange", fctHandler);
- Parameters:
- {number} lineID
- - The index of the telephony line where ths state change (0/1)
- {LineStates} lineState
- - The new telephony line's state
OnLoadClientHistoryDone(results, askKey)
Fired when the requested history data is loaded, requested by function AgentLinkClass#HistoryLoadClientHistory
var fctHandler = function(results, askKey) { Log("MyLogger", "DEBUG", results.length " history entries are found"); } agentlink.attachEvent("OnLoadClientHistoryDone", fctHandler);
- Parameters:
- {Array} results
- - Array of CallInformation
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
OnLoadOfflineChatHistoryDone(results, askKey)
Fired when the chat feed requested by the function HistoryLoadOfflineChatHistory has been loaded
var fctHandler = function(results, askKey) { Log("MyLogger", "DEBUG", results.length " messages on the history chat conversation"); } agentlink.attachEvent("OnLoadOfflineChatHistoryDone", fctHandler);
- Parameters:
- {Array} results
- - Array of messages (type: ChatElement) for the chat entire conversation
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
OnLoadOfflineFaxHistoryDone(faxInfo, askKey)
Fired when the fax requested by function AgentLinkClass#HistoryLoadOfflineFaxHistory has been loaded
var fctHandler = function(faxInfo, askKey) { Log("MyLogger", "DEBUG", "Fax loaded from history. Uid:" + faxInfo.FaxUid); } agentlink.attachEvent("OnLoadOfflineFaxHistoryDone", fctHandler);
- Parameters:
- {FaxSimpleInformations} faxInfo
- - The historized fax informations
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
OnLoadOfflineMailHistoryDone(mailInfo, askKey, withInitialMessage)
Fired when the email information requested by function AgentLinkClass#HistoryLoadOfflineMailHistory has been loaded
var fctHandler = function(mailInfo, askKey, withInitialMessage) { Log("MyLogger", "DEBUG", "Email loaded from history. Uid:" + mailInfo.MailUid); } agentlink.attachEvent("OnLoadOfflineMailHistoryDone", fctHandler);
- Parameters:
- {MailSimpleInformations} mailInfo
- - The historized email informations
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
- {boolean} withInitialMessage
- - True if the history can contains the origin message (on email context session, no on email sended on another context)
OnLoadOfflineSocialNetworkHistoryDone(snInfo, askKey)
Fired when the socialnetwork feed requested by function AgentLinkClass#HistoryLoadOfflineSocialNetworkHistory has been loaded
var fctHandler = function(socialNetworkInfos, askKey) { Log("MyLogger", "DEBUG", "SocialNetwork informations loaded from history. Uid:" + faxInfo.FaxUid); } agentlink.attachEvent("OnLoadOfflineSocialNetworkHistoryDone", fctHandler);
- Parameters:
- {SocialNetworkInformation} snInfo
- - The historized social network informations
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
OnLoadOfflineVoiceMailHistoryDone(wInfo, askKey)
Fired when the voicemail information requested by function AgentLinkClass#HistoryLoadOfflineVoiceMailHistory has been loaded
var fctHandler = function(wInfo, askKey) { Log("MyLogger", "DEBUG", "Wav file for the voicemail has a duration of " + wInfo.Fileduration + " seconds"); } agentlink.attachEvent("OnLoadOfflineVoiceMailHistoryDone", fctHandler);
- Parameters:
- {WavInformation} wInfo
- - The historized wav file informations
- {string} askKey
- - Webservice call identifier (for managing more than one request at a time)
OnNewIdentificationReady(userId, userPassword, extension)
When user change identification : notify that the Extension informations has been received
var fctHandler = function(userId, userPassword, extension) { agentlink.Login(userId, userPassword, extension.ExtensionId); } agentlink.attachEvent("OnUserIdentification", fctHandler);
- Parameters:
- {int} userId
- - new agent id
- {string} userPassword
- - new agent password
- {Extension} extension
- - new extension informations
OnPlayingVoiceMail(voicemailSessionId)
When the VoiceMail asked by agent start to play
var fctHandler = function(voiceMailId) { Log("MyLogger", "DEBUG", "Voicemail : " + voiceMailId + " is playing"); } //Attach the event one time only agentlink.attachEvent("OnPlayingVoiceMail", fctHandler);
- Parameters:
- {string} voicemailSessionId
- - the id of voicemail playing
OnPlayWavStart(filename)
One Wav File start to play
var fctHandler = function(filename) { Log("MyLogger", "DEBUG", "Agent is listening file : " + filename); } //Attach the event one time only agentlink.attachEvent("OnPlayWavStart", fctHandler);
- Parameters:
- {string} filename
- - the windows path of wav file currently playing on the agent line
OnPlayWavStop(filename)
One Wav File stop to play
var fctHandler = function(filename) { Log("MyLogger", "DEBUG", "Agent ends to listen file : " + filename); } //Attach the event one time only agentlink.attachEvent("OnPlayWavStop", fctHandler);
- Parameters:
- {string} filename
- - the windows path of wav file that ends to play
OnQueueStateChange(context, nbPrimary, nbSecondary, nbPersonal)
The number of media waiting change for this agent (on his primary, secondary and personal queue).
var fctHandler = function(contextType, primary, secondary, personal) { Log("MyLogger", "DEBUG", "Queue state on context " + contextType + ":" + primary + "-" + secondary + "-" + personal); } agentlink.attachEvent("OnQueueStateChange", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where queue state change
- {number} nbPrimary
- - Number of media on the agent's primary queue
- {number} nbSecondary
- - Number of media on the agent's secondary queue
- {number} nbPersonal
- - Number of media on the agent's personal queue
OnRecoverFailed()
Fired on proxy reconnexion when recovering contexts failed.
Interface has to be reinit
var fctHandler = function() { Log("MyLogger", "DEBUG", "Recover state failed on proxy reconnection"); } agentlink.attachEvent("OnRecoverFailed", fctHandler);
OnSaveClientDone(result, clientSaved, mediaKey, was_forced_saved)
When the CRM save operation requested by function AgentLinkClass#CrmSaveClient is done
result value : 1 : OK, -1 : invalid phone number, -2 : save error
var fctHandler = function(result, client, mediaKey, was_forced_saved) { if (isSaveForced) { client.IsAutoCreated = false; client.IsIdentified = 1; } if (parseInt(results, 10) == 0) { Log("MyLogger", "DEBUG", "Contact " + client.Name + " is saved"); } else { Log("MyLogger", "DEBUG", "Error while saving contact " + client.Name); } } agentlink.attachEvent("OnSaveClientDone", fctHandler);
- Parameters:
- {number} result
- - result value : 1 : OK, -1 : invalid phone number, -2 : save error
- {Consumers} clientSaved
- - the client saved on this event
- {string} mediaKey
- - type of media on adress book. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {boolean} was_forced_saved
- - saved by agent, can set IsIdentified to 1 and IsAutoCreated to false (Integrator responsability)
OnSearchClientDone(result, client, mediaKey, adressBookOid)
When the CRM Search operation requested by function AgentLinkClass#CrmSearchClient is done
var fctHandler = function(result, client, mediaKey, adressBookOid) { Log("MyLogger", "DEBUG", result.length " contacts matching the reference client"); } agentlink.attachEvent("OnSearchClientDone", fctHandler);
- Parameters:
- {Array} result
- - Array of Consumers matching the search
- {Consumers} client
- - Client struct used to perform the search
- {string} mediaKey
- - type of media on adress book. Valid values are "cti", "mail", "fax", "social_network", "cookie"
- {string} adressBookOid
- - oid of the adress book where the search has been done
OnSectionsStateChange(context, allowedSections)
Fired when the list of sections allowed on one context change
var fctHandler = function(contextType, allowedSections) { var sectionsAllowedStr = ""; for (var i = 0; i < allowedSections.Count; i++) { var sectionItem = allowedSections.Item(i); sectionAllowedStr += sectionItem + " "; } Log("MyLogger", "DEBUG", "Agent can display sections :" + sectionsAllowedStr + " - on context :" + contextType); } agentlink.attachEvent("OnSectionsStateChange", fctHandler);
- Parameters:
- {ContextTypes} context
- - the context on wich the list of allowed session has changed
- {COMArray} allowedSections
- - array of ContextSectionsAllowed containing the list of section allowed for the agent
OnSessionClose(context, sessionId)
One session is closed
var fctHandler = function(contextType, sessionId) { Log("MyLogger", "DEBUG", "Session " + sessionId + " has been closed"); } agentlink.attachEvent("OnSessionClose", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where one session is closing
- {string} sessionId
- - The Id of session that is closing
OnSessionOpen(context, sessionId)
New session opened on one context
var fctHandler = function(contextType, sessionId) { switch (contextType) { case ContextTypes.Telephony: var sessionObj = agentlink.Telephony.GetSession(); break; case ContextTypes.Mail: //Get the session object that just open var sessionObj = agentlink.Mail.GetSession(sessionId); break; default : //you can do similar traitment for each other contexts break; } if (sessionObj != null) { Log("MyLogger", "DEBUG", "Session script indice : " + sessionObj.Indice); } } agentlink.attachEvent("OnSessionOpen", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where the session is opening
- {string} sessionId
- - The Id of session opened
OnSessionStateChange(context, sessionId)
Event on a previously opened sesssion
var fctHandler = function(contextType, sessionId) { switch (contextType) { case ContextTypes.Telephony: var sessionObj = agentlink.Telephony.GetSession(); break; case ContextTypes.Mail: //Get the session object that just open var sessionObj = agentlink.Mail.GetSession(sessionId); break; default : //you can do similar traitment for each other contexts break; } if (sessionObj != null) { Log("MyLogger", "DEBUG", "New Session state : " + sessionObj.SessionStateLabel); } } agentlink.attachEvent("OnSessionStateChange", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where one session state is changing
- {string} sessionId
- - The Id of session with changed state
OnSessionUpdate(context, sessionId)
Update on session (session is passing from SearchMode to traiting. Script must me reload)
var fctHandler = function(contextType, sessionId) { Log("MyLogger", "DEBUG", "Search mode session " + sessionId + " change to online session"); } agentlink.attachEvent("OnSessionUpdate", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where one session is closing
- {string} sessionId
- - The Id of session that is closing
OnSupervisionDatasReceived(context, subContext, agentProdStats)
When production statics listened have change.
This event is fired only on contexts where the function StartListeningQueueForProductionStatistics has been called.
This statistics are sended by the Supervision Service.
var fctHandler = function(context, subContext, agentProdStats) { Log("MyLogger", "DEBUG", "Agent argued " + agentProdStats.AgentDayProd.CA + " contacts today on the context " + context); } //Attach the event one time only agentlink.attachEvent("OnSupervisionDatasReceived", fctHandler); //Will start the receiving of the event for the email context for all queues and all supervising group agentlink.Mail.StartListeningQueueForProductionStatistics(-1, "", false);
- Parameters:
- {ContextTypes} context
- - the context for the production statistics received
- {ContextTypes} subContext
- - for Telephony only : Inbound or Outbound
- {AgentProdStat} agentProdStats
- - production statistics received
OnSupervisionServiceStateChange(isStarted)
When the state of supervision service state change
The Supervision service is used to get the production statistics and listing agents/supervisor for transfer, consultation, manual call, etc.
var fctHandler = function(isStarted) { if (!isStarted) { Log("MyLogger", "DEBUG", "Supervision service has stopped - interface will works in degrated mode"); } } agentlink.attachEvent("OnSupervisionServiceStateChange", fctHandler);
- Parameters:
- {boolean} isStarted
- - true when the supervision service is started, false when it is stopped
OnSupervisorChatMsgReceived(messageType, message, chatRoomOid, supervisorName)
A chat Message received from supervisor, and if ChatMessageTypes is ChatClosed : it's the end of conversation
var fctHandler = function(messageType, message, roomOid, senderName) { if (messageType == ChatMessageTypes.TextMessage) { Log("MyLogger", "DEBUG", "Supervisor message received : " + message); } else if (messageType == ChatMessageTypes.ChatClose) { Log("MyLogger", "DEBUG", "Supervisor close the internal chatRoom with oid : " + roomOid); } } agentlink.attachEvent("OnSupervisorChatMsgReceived", fctHandler);
- Parameters:
- {ChatMessageTypes} messageType
- - The type of message received. if type is ChatClosed, it's the end of the conversation
- {string} message
- - The message sended by the supervisor
- {string} chatRoomOid
- - The oid of the chat room where the message has been received
- {string} supervisorName
- - The name of the supervisor who sends the message
OnSupStateChange(recording, nbListening)
When there is a change of supervisor state (Listening/Recording)
var fctHandler = function(recording, nbListening) { if ((nbListening > 0) || (recording == true)) { Log("MyLogger", "DEBUG", "Your current call is listening by at least one supervisor"); } } agentlink.attachEvent("OnSupStateChange", fctHandler);
- Parameters:
- {boolean} recording
- - a supervisor is listening or recording the agent active call
- {number} nbListening
- - when recording is true, indicate the number of supervisor listening the agent active call
OnTelephonyRecordChangeName(oldPath, newPath)
Fired when the last recording file should be renamed, according the name strategy defined on the Hermes.Net Admin
var fctHandler = function(oldPath, newPath) { Log("MyLogger", "DEBUG", "Recorded file " + oldPath + " will be renamed as :" + newPath); } agentlink.attachEvent("OnTelephonyRecordChangeName", fctHandler);
- Parameters:
- {string} oldPath
- - the windows path of the recorded file to rename
- {string} newPath
- - the new file name for the recorded file
OnTelephonyRecordDelete(filePath)
Fired when the last recording made must be deleted (for automatic record case only).
var fctHandler = function(filePath) { Log("MyLogger", "DEBUG", "Last recorded file will be deleted"); } agentlink.attachEvent("OnTelephonyRecordDelete", fctHandler);
- Parameters:
- {string} filePath
- - the windows path of the recorded file to delete
OnTelephonyRecordStart(filePath)
When a telephony recording is starting.
Fired for all cases of record (automatic, supervisor, agent)
var fctHandler = function(filePath) { Log("MyLogger", "DEBUG", "Your current call is being recorded"); } agentlink.attachEvent("OnTelephonyRecordStart", fctHandler);
- Parameters:
- {string} filePath
- - the windows path of the recorded file
OnTelephonyRecordStop(filePath)
When a telephony recording is stopping
var fctHandler = function(filePath) { Log("MyLogger", "DEBUG", "End of call recording"); } agentlink.attachEvent("OnTelephonyRecordStop", fctHandler);
- Parameters:
- {string} filePath
- - the windows path of the recorded file
OnTransferComplete(context, sessionId)
The transfer request is done - will be followed by the OnSessionClose event
var fctHandler = function(contextType, sessionId) { Log("MyLogger", "DEBUG", "Session " + sessionId + " is transfered to another party"); } agentlink.attachEvent("OnTransferComplete", fctHandler);
- Parameters:
- {ContextTypes} context
- - The context where one session has been transfered
- {string} sessionId
- - The Id of session that is transfered
OnUserIdentification(userID, userName, extension, defaultContext, isNetworkRecovering)
User login information. Called on successfull login
var fctHandler = function(userId, userName, station, defaultContext, isNetworkRecovering) { if (agentlink.LoggedIn) { Log("MyLogger", "DEBUG", "Agent is logged in"); } else { Log("MyLogger", "DEBUG", "Agent is logged out"); } } } agentlink.attachEvent("OnUserIdentification", fctHandler);
- Parameters:
- {int} userID
- - agent id
- {string} userName
- - agent name and first name
- {string} extension
- - telephony extension
- {ContextTypes} defaultContext
- - default context to display on login
- {boolean} isNetworkRecovering
- - indicate if the event is fired after an automatic reconnection on network lost
OnWebcamSuperviseStateChange(supervisorKey, state)
When the supervisor is showing/unshowing the agent webcam (state change)
The management of webcam video
var fctHandler = function(supervisorKey, state) { if (state == 1) { Log("MyLogger", "DEBUG", "Supervisor " + supervisorKey + " is asking to watch the agent webcam"); } } agentlink.attachEvent("OnWebcamSuperviseStateChange", fctHandler);
- Parameters:
- {string} supervisorKey
- - Unique key to identify the supervisor
- {number} state
- - state of webcam supervising for this supervisor (0 : unwatch, 1 : watch)