Author Message
ChrisS
Joined: Mar 7, 2018
Messages: 1
Offline
I need to send typing notifications from the browser to let the agent know when a customer is typing. I haven't been able to find any docs on our version of EMC (not sure exact version, but was setup in 2015). We have been calling the EMC webservice to open, send messages, and close chat session - Interface is called "WebChatWSSoap"

Is there a way to send a message back to Avaya to let the agent know the customer is typing? Here's the code that handles the messages coming from the Agent and there's a messagetype called "TypingNotification"

var receiveTask = ChatProvider.RecieveMessagesForUserAsync(SERVICE,
sessionId);
...
foreach (var result in x.Result)
{
var parts = result.Split(new []{':'}, 3);

switch (parts[MESSAGE_TYPE_INDEX])
{

case "TypingNotification":
//todo: send typing notification
break;

case "CloseSession":
case "CloseSession\n":
closed = true;

if (parts.Length >= MESSAGE_INDEX + 1)
{

Clients.Client(connectionId).broadcastMessage("system",
parts[MESSAGE_INDEX]);
}

ChatRespository.AddTranscript(chatId,
ChatTranscriptRepository.GetTranscript(chatId));

// TODO: This seems to only happen if the agent initiates the close

break;

case "SessionState":
case "StdMessage":
case "SessionOpened":

ChatTranscriptRepository.AddMessage(chatId,
isSystemMessage ? "system" : "Agent",
parts[MESSAGE_INDEX],
DateTime.Now);
Clients.Client(connectionId).broadcastMessage(
isSystemMessage ? "system" : "Agent",
parts[MESSAGE_INDEX]);
if (parts[MESSAGE_INDEX].Contains("The conversation request has been accepted by an agent."))
{
isSystemMessage = false;
}

break;
PankajGandhe
Joined: Jan 28, 2015
Messages: 30
Offline
Here is the API.. this is used in the out of box sample client too, so you can have a look for usage there too.

SendNotificationToService: Used by WebChat ASP to send typing notification to the Web Service.

void SendNotificationToService(string SessionID, string userID, int notificationCode)

string SessionID - Session ID returned by OpenSession string userID - Valid text username i.e. name of the customer as seen on Agent side. (can pass an empty string) int notificationCode – 0 when Customer is typing 1 when Customer has stopped typing. (Need to set a timer of 5 seconds wherein pass value 0 as notification code when customer is typing and pass value 1 five seconds after customer has stopped typing to notify the service that customer has stopped typing).

If you need the full document, please reach out to me at pgandhe@avaya.com
Go to:   
Mobile view