/// <summary>
 /// Gets the instance.
 /// </summary>
 /// <returns></returns>
 public static ChatRejected GetInstance()
 {
     if (_thisObject == null)
     {
         _thisObject = new ChatRejected();
     }
     return(_thisObject);
 }
Exemple #2
0
        public void InteractionEventChat(IXNCustomData chatData)
        {
            try
            {
                this._logger.Info("Chat Event Received : " + chatData.EventName);
                switch (chatData.EventName)
                {
                case "InteractionChatAcceptChat":
                    GetChatData(chatData.InteractionId, chatData);
                    ChatSessionConnected.GetInstance().PopupRecords(chatData, SFDCCallType.InboundChat);
                    return;

                case "InteractionChatDeclineChat":
                    GetChatData(chatData.InteractionId, chatData);
                    ChatRejected.GetInstance().UpdateRecords(chatData, chatData.InteractionType);
                    return;

                case "InteractionChatCloseInteraction":

                case "InteractionChatDisconnectChat":

                case "InteractionChatAutoCloseInteraction":

                case "InteractionChatAutoDisconnect":
                    GetChatData(chatData.InteractionId, chatData);
                    ChatSessionEnded.GetInstance().PopupRecords(chatData, chatData.InteractionType);
                    return;

                case "InteractionMarkDone":
                    GetChatData(chatData.InteractionId, chatData);
                    ChatMarkDone.GetInstance().UpdateRecords(chatData, chatData.InteractionType);
                    break;

                default:

                    return;
                }
            }
            catch (Exception generalException)
            {
                this._logger.Error("Error occurred while processing chat event, exception : " + generalException.ToString());
            }
        }