/// <summary> /// Updates SDFC Records on EventAttachedDataChanged Event /// </summary> /// <param name="datachanged"></param> /// <param name="callType"></param> /// <param name="callDuration"></param> public void UpdateRecords(EventAttachedDataChanged datachanged, SFDCCallType callType, string callDuration) { try { this._logger.Info("Trying to update sfdc on EventAttachedDataChanged event for the " + callType.ToString() + " call"); if (callType == SFDCCallType.InboundVoice) { _sfdcPopupData = this._voiceEvents.GetInboundUpdateData(datachanged, callType, callDuration, "datachanged"); } else if (callType == SFDCCallType.OutboundVoiceSuccess) { _sfdcPopupData = this._voiceEvents.GetOutboundUpdateData(datachanged, callType, callDuration, "datachanged"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = datachanged.ConnID.ToString(); this._searchHandler.ProcessUpdateData(datachanged.ConnID.ToString(), _sfdcPopupData); } else { this._logger.Info("Search data is empty"); } } catch (Exception generalException) { _logger.Info("CallAttachedDataChanged: Error Occurred : " + generalException.ToString()); } }
/// <summary> /// Popup SFDC Records on EventAbandoned Event /// </summary> /// <param name="eventAbandoned"></param> /// <param name="callType"></param> public void PopupRecords(EventAbandoned eventAbandoned, SFDCCallType callType) { try { this._logger.Info("CallEventAbandoned PopupRecords method Invoked for the " + callType.ToString() + " call"); if (Settings.ClickToDialData.ContainsKey(eventAbandoned.ConnID.ToString())) { this._voiceEvents.GetClickToDialLogs(eventAbandoned, eventAbandoned.ConnID.ToString(), callType, Settings.ClickToDialData[eventAbandoned.ConnID.ToString()], "not reachable"); } else if (Settings.SFDCOptions.EnablePopupDialedFromDesktop) { if (callType == SFDCCallType.OutboundVoiceFailure) { _sfdcPopupData = this._voiceEvents.GetOutboundFailurePopupData(eventAbandoned, callType, "not reachable"); if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventAbandoned.ConnID.ToString(); this._searchHandler.ProcessSearchData(eventAbandoned.ConnID.ToString(), _sfdcPopupData, callType); } else { this._logger.Info("Search data is empty"); } } } } catch (Exception generalException) { _logger.Info("PopupRecords : Error Occurred : " + generalException.ToString()); } }
/// <summary> /// Popup Records on EventRinging Event /// </summary> /// <param name="eventRinging"></param> /// <param name="callType"></param> public void PopupRecords(EventRinging eventRinging, SFDCCallType callType) { try { this._logger.Info("Trying to Popup sfdc on EventRinging event for the " + callType.ToString() + " call"); if (callType == SFDCCallType.InboundVoice) { _sfdcPopupData = this._voiceEvents.GetInboundPopupData(eventRinging, callType, "ringing"); } else if (callType == SFDCCallType.ConsultVoiceReceived) { _sfdcPopupData = this._voiceEvents.GetConsultReceivedPopupData(eventRinging, callType, "ringing"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventRinging.ConnID.ToString(); this._searchHandler.ProcessSearchData(eventRinging.ConnID.ToString(), _sfdcPopupData, callType); } else { this._logger.Info("Search data is empty"); } } catch (Exception generalException) { _logger.Info("EventRinging : Error Occurred : " + generalException.ToString()); } }
public IUserActivity GetEmailCreateUserAcitivityData(IMessage message, SFDCCallType callType) { try { this._logger.Info("GetEmailCreateUserAcitivityData : Reading Email UserActivity Log Data....."); this._logger.Info("GetEmailCreateUserAcitivityData : Event Name : " + message.Name); dynamic popupEvent = null; switch (message.Id) { #region Events case Genesyslab.Platform.OpenMedia.Protocols.InteractionServer.Events.EventInvite.MessageId: popupEvent = (Genesyslab.Platform.OpenMedia.Protocols.InteractionServer.Events.EventInvite)message; break; case Genesyslab.Platform.WebMedia.Protocols.BasicChat.Events.EventSessionInfo.MessageId: popupEvent = (Genesyslab.Platform.WebMedia.Protocols.BasicChat.Events.EventSessionInfo)message; break; default: break; #endregion Events } if (popupEvent != null) { IUserActivity userActivity = new UserActivityData(); #region Collect Lead Data userActivity.ObjectName = this._emailUserActivityOptions.ObjectName; if (callType == SFDCCallType.InboundEmail || callType == SFDCCallType.InboundEmailPulled) { userActivity.CreateActvityLog = this._emailUserActivityOptions.InboundCanCreateLog; if (this._emailUserActivityOptions.InboundCanCreateLog && this._emailUserActivityLog != null) { userActivity.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._emailUserActivityLog, popupEvent, callType); } } else if (callType == SFDCCallType.OutboundEmailFailure || callType == SFDCCallType.OutboundEmailSuccess || callType == SFDCCallType.OutboundEmailPulled) { userActivity.CreateActvityLog = this._emailUserActivityOptions.OutboundCanCreateLog; if (this._emailUserActivityOptions.OutboundCanCreateLog && this._emailUserActivityLog != null) { userActivity.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._emailUserActivityLog, popupEvent, callType); } } #endregion Collect Lead Data return(userActivity); } } catch (Exception generalException) { this._logger.Error("GetChatCreateUserAcitivityData : Error occurred : " + generalException.ToString()); } return(null); }
/// <summary> /// Updates the records. /// </summary> /// <param name="chatData">The chat data.</param> /// <param name="callType">Type of the call.</param> public void UpdateRecords(IXNCustomData chatData, SFDCCallType callType) { try { if (callType == SFDCCallType.InboundChat) { _sfdcUpdateData = this._chatEvents.GetInboundUpdateData(chatData, "rejected"); } else if (callType == SFDCCallType.ConsultChatReceived) { _sfdcUpdateData = this._chatEvents.GetConsultUpdateData(chatData, "rejected"); } if (_sfdcUpdateData != null) { _sfdcUpdateData.InteractionId = chatData.InteractionId; this._searchHandler.ProcessUpdateData(chatData.InteractionId, _sfdcUpdateData); } else { this._logger.Info("UpdateRecords: Search data is empty"); } } catch (Exception generalException) { this._logger.Error("UpdateRecords : Error Occurred While collecting log data : " + generalException.ToString()); } }
public ILead GetLeadChatUpdateData(IMessage message, SFDCCallType callType, string duration, string chatContent) { try { this.logger.Info("GetLeadChatUpdateData : Reading Lead Update Data....."); this.logger.Info("GetLeadChatUpdateData : Event Name : " + message.Name); if (this.leadChatOptions != null) { dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { ILead lead = new LeadData(); #region Collect Lead Data lead.ObjectName = leadChatOptions.ObjectName; if (callType == SFDCCallType.InboundChat) { if (leadChatOptions.InboundCanUpdateLog) { lead.UpdateActivityLog = true; lead.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(this.LeadChatLogConfig, popupEvent, callType, duration, chatContent); } } if (callType == SFDCCallType.ConsultChatReceived) { if (leadChatOptions.ConsultCanUpdateLog) { lead.UpdateActivityLog = true; lead.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(this.LeadChatLogConfig, popupEvent, callType, duration, chatContent); } } //update lead record fields lead.UpdateRecordFields = leadChatOptions.CanUpdateRecordData; if (GetNoRecordFoundAction(callType, leadChatOptions).Equals("createnew") && this.LeadRecordConfig != null) { if (leadChatOptions.CanUpdateRecordData) { lead.UpdateRecordFieldsData = this.sfdcObject.GetChatUpdateActivityLog(this.LeadRecordConfig, popupEvent, callType, duration, chatContent); } } #endregion Collect Lead Data return(lead); } } else { this.logger.Info("Can not Collect Lead Update data because Lead Configuration is null."); } } catch (Exception generalException) { this.logger.Error("GetLeadChatUpdateData : Error occurred while reading Lead Data : " + generalException.ToString()); } return(null); }
/// <summary> /// Popup SFDC on EventInvite Event /// </summary> /// <param name="ixnData"></param> /// <param name="callType"></param> public void PopupRecords(IXNCustomData ixnData, SFDCCallType callType) { try { this._logger.Info("PopupRecords: ChatSessionConnected Event "); if (callType == SFDCCallType.InboundChat) { _sfdcPopupData = this._chatEvents.GetInboundPopupData(ixnData, callType, "established"); } else if (callType == SFDCCallType.ConsultChatReceived) { _sfdcPopupData = this._chatEvents.GetInboundPopupData(ixnData, callType, "established"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = ixnData.InteractionId; this._searchHandler.ProcessSearchData(ixnData.InteractionId, _sfdcPopupData, callType); } else { this._logger.Info("PopupRecords : Search data is empty"); } } catch (Exception generalException) { this._logger.Error("PopupRecords : Error Occurred at ChatConnected : " + generalException.ToString()); } }
public void UpdateRecords(IXNCustomData emailData, SFDCCallType callType) { try { this._logger.Info("Trying to update SFDC on EmailMoveToWorkbin Event, Email Type: " + callType.ToString()); if (callType == SFDCCallType.InboundEmail) { this._sfdcPopupData = this._emailEvents.GetInboundUpdateData(emailData, callType, "movetoworkbin"); } else if (callType == SFDCCallType.OutboundEmailSuccess) { this._sfdcPopupData = this._emailEvents.GetOutboundEmailUpdateData(emailData, callType, "movetoworkbin"); } if (this._sfdcPopupData != null) { this._sfdcPopupData.InteractionId = emailData.InteractionId; this._searchHandler.ProcessUpdateData(emailData.InteractionId, this._sfdcPopupData); } else { this._logger.Info("UpdateRecords ; Search data is empty"); } } catch (Exception exception) { this._logger.Error("EmailMoveToWorkbin: Error Occurred while collecting data : " + exception.ToString()); } }
public void UpdateRecords(IXNCustomData emailData, SFDCCallType callType) { try { this._logger.Info("Trying to update SFDC on AttachedDataChanged Event, Email Type: " + callType.ToString()); if (callType == SFDCCallType.InboundEmail) { this._sfdcPopupData = this._emailEvents.GetInboundUpdateData(emailData, callType, "datachanged"); } else if (callType == SFDCCallType.OutboundEmailSuccess) { this._sfdcPopupData = this._emailEvents.GetOutboundEmailUpdateData(emailData, callType, "datachanged"); } if (this._sfdcPopupData != null) { this._sfdcPopupData.InteractionId = emailData.InteractionId; this._searchHandler.ProcessUpdateData(emailData.InteractionId, this._sfdcPopupData); } else { this._logger.Info("Search data is empty"); } } catch (Exception exception) { this._logger.Error("EmailInvite: Error Occurred in Updating sfdc data : " + exception.ToString()); } }
public void UpdateRecords(EventInvite eventInvite, SFDCCallType callType, string callDuration, string chatContent) { try { if (Settings.SFDCOptions.SFDCPopupPages != null) { if (callType == SFDCCallType.InboundChat || callType == SFDCCallType.ConsultChatReceived) { this.logger.Info("UpdateRecords : Update SFDC Logs for Inbound "); sfdcPopupData = this.chatEvents.GetInboundUpdateData(eventInvite, callType, callDuration, chatContent, "datachanged"); if (sfdcPopupData != null) { sfdcPopupData.InteractionId = eventInvite.Interaction.InteractionId; this.chatEvents.SendUpdateLogData(eventInvite.Interaction.InteractionId, sfdcPopupData); } else { this.logger.Info("UpdateRecords : Search data is empty"); } } } } catch (Exception generalException) { this.logger.Error("UpdateRecords : Error Occurred in Updating sfdc data : " + generalException.ToString()); } }
/// <summary> /// </summary> /// <param name="eventUserEvent"></param> /// <param name="callType"></param> /// <param name="callDuration"></param> public void UpdateRecords(EventUserEvent eventUserEvent, SFDCCallType callType, string callDuration) { try { this._logger.Info("Trying to update sfdc on EventUserEvent event for the " + callType.ToString() + " call"); if (callType == SFDCCallType.InboundVoice) { _sfdcPopupData = this._voiceEvents.GetInboundUpdateData(eventUserEvent, callType, callDuration, "userevent"); } else if (callType == SFDCCallType.OutboundVoiceSuccess) { _sfdcPopupData = this._voiceEvents.GetOutboundUpdateData(eventUserEvent, callType, callDuration, "userevent"); } else if (callType == SFDCCallType.ConsultVoiceReceived) { _sfdcPopupData = this._voiceEvents.GetConsultUpdateData(eventUserEvent, callType, callDuration, "userevent"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventUserEvent.ConnID.ToString(); this._searchHandler.ProcessUpdateData(eventUserEvent.ConnID.ToString(), _sfdcPopupData); } else { this._logger.Info("Search data is empty"); } } catch (Exception generalException) { _logger.Info("CallUserEvent : Error Occurred : " + generalException.ToString()); } }
public void PopupRecords(IXNCustomData ixnData, SFDCCallType callType) { try { if (callType == SFDCCallType.InboundChat) { _sfdcPopupData = this._chatEvents.GetInboundPopupData(ixnData, callType, "invite"); } else if (callType == SFDCCallType.ConsultChatReceived) { _sfdcPopupData = this._chatEvents.GetConsultReceivedPopupData(ixnData, callType, "invite"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = ixnData.InteractionId; this._searchHandler.ProcessSearchData(ixnData.InteractionId, _sfdcPopupData, callType); } else { this._logger.Info("ChatInvite.PopupRecords : Search data is empty"); } } catch (Exception generalException) { _logger.Error("ChatInvite.PopupRecords : Error Occurred while collecting Log data : " + generalException.ToString()); } }
public void PopupRecords(IXNCustomData emailData, SFDCCallType callType) { try { this._logger.Info("Trying to update SFDC on EmailPulled Event, Email Type: " + callType.ToString()); if (callType == SFDCCallType.InboundEmailPulled) { this._sfdcPopupData = this._emailEvents.GetInboundPopupData(emailData, callType, "pulled"); } else if (callType == SFDCCallType.OutboundEmailPulled) { this._sfdcPopupData = this._emailEvents.GetOutboundEmailPopupData(emailData, callType, "pulled"); } if (this._sfdcPopupData != null) { this._sfdcPopupData.InteractionId = emailData.InteractionId; this._searchHandler.ProcessSearchData(emailData.InteractionId, this._sfdcPopupData, callType); } else { this._logger.Info("Search data is empty"); } } catch (Exception exception) { this._logger.Error("EmailPulled: Error Occurred while collecting Log data : " + exception.ToString()); } }
/// <summary> /// Popup and Update SFDC Records on EventReleased Event /// </summary> /// <param name="eventReleased"></param> /// <param name="callType"></param> /// <param name="callDuration"></param> public void PopupRecords(EventReleased eventReleased, SFDCCallType callType, string callDuration) { try { this._logger.Info("Trying to update activity log on call rejected event for the calltype: " + callType.ToString() + "\t call duration: " + callDuration); if (callType == SFDCCallType.InboundVoice) { _sfdcPopupData = this._voiceEvents.GetInboundUpdateData(eventReleased, callType, callDuration, "rejected"); } else if (callType == SFDCCallType.OutboundVoiceSuccess) { _sfdcPopupData = this._voiceEvents.GetOutboundUpdateData(eventReleased, callType, callDuration, "rejected"); } else if (callType == SFDCCallType.ConsultVoiceReceived) { _sfdcPopupData = this._voiceEvents.GetConsultUpdateData(eventReleased, callType, callDuration, "rejected"); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventReleased.ConnID.ToString(); this._searchHandler.ProcessUpdateData(eventReleased.ConnID.ToString(), _sfdcPopupData); } else { this._logger.Info("Search data is empty"); } } catch (Exception generalException) { _logger.Info("CallRejected: Error Occurred : " + generalException.ToString()); } }
/// <summary> /// Gets the Chat Update data. /// </summary> /// <param name="emailData"></param> /// <param name="callType"></param> /// <param name="duration"></param> /// <param name="emailContent"></param> /// <returns></returns> public CaseData GetCaseEmailUpdateData(IXNCustomData emailData, SFDCCallType callType, string eventName) { CaseData cases = new CaseData(); try { this._logger.Info("GetCaseOutboundEmailUpdateData : Reading Account Update Data....."); if (emailData != null) { #region Collect Case Data cases.ObjectName = _caseEmailOptions.ObjectName; if (callType == SFDCCallType.InboundEmail || callType == SFDCCallType.InboundEmailPulled) { if (_caseEmailOptions.InboundCanUpdateLog) { cases.UpdateActivityLog = true; cases.UpdateActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._caseEmailLogOptions, null, callType, emailData.Duration, emailData: emailData); if (!string.IsNullOrWhiteSpace(_caseEmailOptions.EmailAppendActivityLogEventNames) && _caseEmailOptions.EmailAppendActivityLogEventNames.Contains(eventName)) { cases.AppendActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._caseEmailLogOptions, null, callType, emailData.Duration, emailData: emailData, isAppendLogData: true); } } } else if (callType == SFDCCallType.OutboundEmailFailure || callType == SFDCCallType.OutboundEmailSuccess || callType == SFDCCallType.OutboundEmailPulled) { if (_caseEmailOptions.OutboundCanUpdateLog) { cases.UpdateActivityLog = true; cases.UpdateActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._caseEmailLogOptions, null, callType, emailData.Duration, emailData: emailData); if (!string.IsNullOrWhiteSpace(_caseEmailOptions.EmailAppendActivityLogEventNames) && _caseEmailOptions.EmailAppendActivityLogEventNames.Contains(eventName)) { cases.AppendActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._caseEmailLogOptions, null, callType, emailData.Duration, emailData: emailData, isAppendLogData: true); } } } //update account record fields cases.UpdateRecordFields = _caseEmailOptions.CanUpdateRecordData; cases.NoRecordFound = SFDCObjectHelper.GetNoRecordFoundAction(callType, _caseEmailOptions); if (cases.NoRecordFound.Equals("createnew") && this._caseEmailRecordConfig != null) { if (_caseEmailOptions.CanUpdateRecordData) { cases.UpdateRecordFieldsData = this._sfdcUtility.GetUpdateActivityLogData(this._caseEmailRecordConfig, null, callType, emailData.Duration, emailData: emailData); } } #endregion Collect Case Data return(cases); } } catch (Exception generalException) { this._logger.Error("GetCaseOutboundEmailUpdateData : Error occurred while reading Account Data : " + generalException.ToString()); return(cases); } return(null); }
/// <summary> /// Popup SFDC Records on EventDialing Event /// </summary> /// <param name="eventDialing"></param> /// <param name="callType"></param> public void PopupRecords(EventDialing eventDialing, SFDCCallType callType) { try { this._logger.Info("Trying to Popup sfdc on EventDialing event for the " + callType.ToString() + " call"); if (callType == SFDCCallType.OutboundVoiceSuccess) { if (Settings.ClickToDialData.ContainsKey(eventDialing.ConnID.ToString())) { this._voiceEvents.GetClickToDialLogs(eventDialing, eventDialing.ConnID.ToString(), callType, Settings.ClickToDialData[eventDialing.ConnID.ToString()], "dialing"); } else if (Settings.SFDCOptions.EnablePopupDialedFromDesktop) { _sfdcPopupData = this._voiceEvents.GetOutboundPopupData(eventDialing, callType, "dialing"); if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventDialing.ConnID.ToString(); this._searchHandler.ProcessSearchData(eventDialing.ConnID.ToString(), _sfdcPopupData, callType); } else { this._logger.Info("Search data is empty"); } } } } catch (Exception generalException) { _logger.Info("EventDialing: Error Occurred : " + generalException.ToString()); } }
/// <summary> /// Update SFDC Records on EventReleased Event /// </summary> /// <param name="eventReleased"></param> /// <param name="callType"></param> /// <param name="callDuration"></param> public void UpdateRecords(EventReleased eventReleased, SFDCCallType callType, string callDuration) { try { string ixnNotes = Settings.SFDCListener.GetVoiceComments(eventReleased.ConnID.ToString()); if (callType == SFDCCallType.InboundVoice) { _sfdcPopupData = this._voiceEvents.GetInboundUpdateData(eventReleased, callType, callDuration, "released", ixnNotes); } else if (callType == SFDCCallType.ConsultVoiceReceived) { _sfdcPopupData = this._voiceEvents.GetConsultUpdateData(eventReleased, callType, callDuration, "released", ixnNotes); } else if (callType == SFDCCallType.OutboundVoiceSuccess) { _sfdcPopupData = this._voiceEvents.GetOutboundUpdateData(eventReleased, callType, callDuration, "released", ixnNotes); } if (_sfdcPopupData != null) { _sfdcPopupData.InteractionId = eventReleased.ConnID.ToString(); this._searchHandler.ProcessUpdateData(eventReleased.ConnID.ToString(), _sfdcPopupData); } else { this._logger.Info("Search data is empty"); } } catch (Exception generalException) { _logger.Info("UpdateRecords : Error Occurred : " + generalException.ToString()); } }
public void PopupRecords(IXNCustomData emailData, SFDCCallType callType) { try { this._logger.Info("Trying to Popup SFDC on EmailCreate Event, Email Type: " + callType.ToString()); if (callType == SFDCCallType.OutboundEmailSuccess) { this._sfdcPopupData = this._emailEvents.GetOutboundEmailPopupData(emailData, callType, "create"); if (this._sfdcPopupData != null) { this._sfdcPopupData.InteractionId = emailData.InteractionId; if (emailData.IXN_Attributes.ParentId != null && Settings.InboundEmailSearchResult.ContainsKey(emailData.IXN_Attributes.ParentId)) { this.searchHandler.ProcessSFDCResponseForCommonSearch(Settings.InboundEmailSearchResult[emailData.IXN_Attributes.ParentId], this._sfdcPopupData, emailData.InteractionId, callType); } else { this.searchHandler.ProcessSearchData(emailData.InteractionId, this._sfdcPopupData, callType); } } else { this._logger.Info("Search data is empty"); } } } catch (Exception exception) { this._logger.Error("EmailCreate: Error Occurred : " + exception.ToString()); } }
/// <summary> /// Gets chat Update Data /// </summary> /// <param name="message"></param> /// <param name="callType"></param> /// <param name="duration"></param> /// <param name="chatContent"></param> /// <returns></returns> public ICase GetCaseChatUpdateData(IMessage message, SFDCCallType callType, string duration, string chatContent) { try { this.logger.Info("GetCaseChatUpdateData : Reading Case Update Data....."); this.logger.Info("GetCaseChatUpdateData : Event Name : " + message.Name); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { ICase cases = new CaseData(); #region Collect Lead Data cases.ObjectName = CaseChatOptions.ObjectName; if (callType == SFDCCallType.InboundChat) { if (CaseChatOptions.InboundCanUpdateLog) { cases.UpdateActivityLog = true; cases.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(this.CaseChatLogOptions, popupEvent, callType, duration, chatContent); } } else if (callType == SFDCCallType.ConsultChatReceived) { if (CaseChatOptions.ConsultCanUpdateLog) { cases.UpdateActivityLog = true; cases.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(this.CaseChatLogOptions, popupEvent, callType, duration, chatContent); } } else if (callType == SFDCCallType.ConsultChatSuccess || callType == SFDCCallType.ConsultChatFailure) { if (CaseChatOptions.ConsultCanUpdateLog) { cases.UpdateActivityLog = true; cases.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(this.CaseChatLogOptions, popupEvent, callType, duration, chatContent); } } //update case record fields cases.UpdateRecordFields = CaseChatOptions.CanUpdateRecordData; if (GetNoRecordFoundAction(callType, CaseChatOptions).Equals("createnew") && this.CaseRecordConfig != null) { if (CaseChatOptions.CanUpdateRecordData) { cases.UpdateRecordFieldsData = this.sfdcObject.GetChatUpdateActivityLog(this.CaseRecordConfig, popupEvent, callType, duration, chatContent); } } #endregion Collect Lead Data return(cases); } } catch (Exception generalException) { this.logger.Error("GetCaseChatUpdateData : Error occurred while reading Case Data : " + generalException.ToString()); } return(null); }
public IOpportunity GetOpportunityVoiceUpdateData(IMessage message, SFDCCallType callType, string duration) { try { this.logger.Info("GetOpportunityVoiceUpdateData : Reading Opportunity Update Data....."); this.logger.Info("GetOpportunityVoiceUpdateData : Event Name : " + message.Name); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { IOpportunity opportunity = new OpportunityData(); #region Collect opportunity Data opportunity.ObjectName = opportunityVoiceOptions.ObjectName; if (callType == SFDCCallType.Inbound) { if (opportunityVoiceOptions.InboundCanUpdateLog) { opportunity.UpdateActivityLog = true; opportunity.UpdateActivityLogData = this.sfdcObject.GetVoiceUpdateActivityLog(this.OpportunityLogConfig, popupEvent, callType, duration); } } else if (callType == SFDCCallType.OutboundSuccess || callType == SFDCCallType.OutboundFailure) { if (opportunityVoiceOptions.OutboundCanUpdateLog) { opportunity.UpdateActivityLog = true; opportunity.UpdateActivityLogData = this.sfdcObject.GetVoiceUpdateActivityLog(this.OpportunityLogConfig, popupEvent, callType, duration); } } else if (callType == SFDCCallType.ConsultSuccess || callType == SFDCCallType.ConsultReceived || callType == SFDCCallType.ConsultFailure) { if (opportunityVoiceOptions.ConsultCanUpdateLog) { opportunity.UpdateActivityLog = true; opportunity.UpdateActivityLogData = this.sfdcObject.GetVoiceUpdateActivityLog(this.OpportunityLogConfig, popupEvent, callType, duration); } } if (opportunityVoiceOptions.CanUpdateRecordData) { opportunity.UpdateRecordFields = true; opportunity.UpdateRecordFieldsData = this.sfdcObject.GetVoiceUpdateRecordData(this.OpportunityRecordConfig, popupEvent, callType, duration); } #endregion Collect opportunity Data return(opportunity); } } catch (Exception generalException) { this.logger.Error("GetOpportunityVoiceUpdateData : Error occurred while reading opportunity Data : " + generalException.ToString()); } return(null); }
/// <summary> /// Gets Case Popup Data /// </summary> /// <param name="message"></param> /// <param name="callType"></param> /// <returns></returns> public CaseData GetCaseChatPopupData(IXNCustomData chatData, SFDCCallType callType) { try { IMessage message = chatData.InteractionEvent; this._logger.Info("GetCaseChatPopupData : Reading Case Popup Data....."); this._logger.Info("GetCaseChatPopupData : Event Name : " + message.Name); this._logger.Info("GetCaseChatPopupData : CallType Name : " + callType.ToString()); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { CaseData cases = new CaseData(); cases.SearchData = this._sfdcUtilityHelper.GetChatSearchValue(_caseChatOptions, chatData, callType); cases.ObjectName = _caseChatOptions.ObjectName; cases.NoRecordFound = SFDCObjectHelper.GetNoRecordFoundAction(callType, _caseChatOptions); cases.MultipleMatchRecord = SFDCObjectHelper.GetMultiMatchRecordAction(callType, _caseChatOptions); cases.NewRecordFieldIds = _caseChatOptions.NewrecordFieldIds; cases.SearchCondition = _caseChatOptions.SearchCondition; cases.CreateLogForNewRecord = _caseChatOptions.CanCreateLogForNewRecordCreate; cases.MaxRecordOpenCount = _caseChatOptions.MaxNosRecordOpen; cases.SearchpageMode = _caseChatOptions.SearchPageMode; cases.PhoneNumberSearchFormat = _caseChatOptions.PhoneNumberSearchFormat; cases.CanCreateNoRecordActivityLog = SFDCObjectHelper.GetCanCreateProfileActivity(callType, _caseChatOptions, true); cases.CanPopupNoRecordActivityLog = SFDCObjectHelper.GetCanPopupProfileActivity(callType, _caseChatOptions, true); cases.CanCreateMultiMatchActivityLog = SFDCObjectHelper.GetCanCreateProfileActivity(callType, _caseChatOptions); cases.CanPopupMultiMatchActivityLog = SFDCObjectHelper.GetCanPopupProfileActivity(callType, _caseChatOptions); cases.CanCreateProfileActivityforInbNoRecord = _caseChatOptions.CanCreateProfileActivityforInbNoRecord; if (cases.NoRecordFound.Equals("createnew") && this._caseChatRecordConfig != null) { cases.CreateRecordFieldData = this._sfdcUtility.GetCreateActivityLogData(this._caseChatRecordConfig, message, callType, emailData: chatData); } if (callType == SFDCCallType.InboundChat) { if (_caseChatOptions.InboundCanCreateLog) { cases.CreateActvityLog = true; cases.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._caseChatLogOptions, popupEvent, callType, emailData: chatData); } } else if (callType == SFDCCallType.ConsultChatReceived) { if (_caseChatOptions.ConsultCanCreateLog) { cases.CreateActvityLog = true; cases.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._caseChatLogOptions, popupEvent, callType, emailData: chatData); } } return(cases); } } catch (Exception generalException) { this._logger.Error("GetCaseChatPopupData : Error occurred while reading Case Data : " + generalException.ToString()); } return(null); }
/// <summary> /// Get Account Popup Data for Chat /// </summary> /// <param name="message"></param> /// <param name="callType"></param> /// <returns></returns> public IAccount GetAccountChatPopupData(IMessage message, SFDCCallType callType) { try { this.logger.Info("GetAccountChatPopupData : Reading Account Popup Data....."); this.logger.Info("GetAccountChatPopupData : Event Name : " + message.Name); this.logger.Info("GetAccountChatPopupData : CallType Name : " + callType.ToString()); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { IAccount account = new AccountData(); #region Collect Lead Data account.SearchData = GetAccountChatSearchValue(popupEvent.Interaction.InteractionUserData, message, callType); account.ObjectName = accountChatOptions.ObjectName; account.NoRecordFound = GetNoRecordFoundAction(callType, accountChatOptions); account.MultipleMatchRecord = GetMultiMatchRecordAction(callType, accountChatOptions); account.NewRecordFieldIds = accountChatOptions.NewrecordFieldIds; account.SearchCondition = accountChatOptions.SearchCondition; account.CreateLogForNewRecord = accountChatOptions.CanCreateLogForNewRecordCreate; account.MaxRecordOpenCount = accountChatOptions.MaxNosRecordOpen; account.SearchpageMode = accountChatOptions.SearchPageMode; account.PhoneNumberSearchFormat = accountChatOptions.PhoneNumberSearchFormat; if (account.NoRecordFound.Equals("createnew")) { account.CreateRecordFieldData = this.sfdcObject.GetChatRecordData(this.AccountRecordConfig, message, callType); } if (callType == SFDCCallType.InboundChat) { if (accountChatOptions.InboundCanCreateLog) { account.CreateActvityLog = true; account.ActivityLogData = this.sfdcObject.GetChatActivityLog(this.AccountChatLogConfig, popupEvent, callType); } } else if (callType == SFDCCallType.ConsultChatReceived) { if (accountChatOptions.ConsultCanCreateLog) { account.CreateActvityLog = true; account.ActivityLogData = this.sfdcObject.GetChatActivityLog(this.AccountChatLogConfig, popupEvent, callType); } } #endregion Collect Lead Data return(account); } } catch (Exception generalException) { this.logger.Error("GetAccountChatPopupData : Error occurred while reading Account Data : " + generalException.ToString()); } return(null); }
/// <summary> /// Updates SDFC Records on EventAttachedDataChanged Event /// </summary> /// <param name="datachanged"></param> /// <param name="callType"></param> /// <param name="callDuration"></param> public void UpdateRecords(EventAttachedDataChanged datachanged, SFDCCallType callType, string callDuration) { try { logger.Info("UpdateRecords : CallAttachedDataChanged.UpdateRecords method Invoke"); if (callType == SFDCCallType.Inbound) { //Update Data this.logger.Info("Update SFDC Logs for Inbound Call"); sfdcPopupData = this.voiceEvents.GetInboundUpdateData(datachanged, callType, callDuration, "datachanged"); if (sfdcPopupData != null) { sfdcPopupData.InteractionId = datachanged.ConnID.ToString(); this.voiceEvents.ProcessUpdateData(datachanged.ConnID.ToString(), sfdcPopupData); } else { this.logger.Info("Search data is empty"); } } else if (callType == SFDCCallType.OutboundSuccess) { //Update Data this.logger.Info("Update SFDC Logs for Outbound Call"); sfdcPopupData = this.voiceEvents.GetOutboundUpdateData(datachanged, callType, callDuration, "datachanged"); if (sfdcPopupData != null) { sfdcPopupData.InteractionId = datachanged.ConnID.ToString(); this.voiceEvents.ProcessUpdateData(datachanged.ConnID.ToString(), sfdcPopupData); } else { this.logger.Info("Search data is empty"); } } else if (callType == SFDCCallType.ConsultSuccess || callType == SFDCCallType.ConsultReceived) { //Update Data this.logger.Info("Update SFDC Logs for Consult Call"); sfdcPopupData = this.voiceEvents.GetConsultUpdateData(datachanged, callType, callDuration, "datachanged"); if (sfdcPopupData != null) { sfdcPopupData.InteractionId = datachanged.ConnID.ToString(); this.voiceEvents.ProcessUpdateData(datachanged.ConnID.ToString(), sfdcPopupData); } else { this.logger.Info("Search data is empty"); } } } catch (Exception generalException) { logger.Info("UpdateRecords : Error Occurred : " + generalException.ToString()); } }
/// <summary> /// Get Account Popup Data for Email /// </summary> /// <param name="emailData"></param> /// <param name="callType"></param> /// <returns></returns> public CaseData GetCaseEmailPopupData(IXNCustomData emailData, SFDCCallType callType) { try { this._logger.Info("GetAccountEmailPopupData : Reading Account Popup Data....."); this._logger.Info("GetAccountEmailPopupData : CallType Name : " + callType.ToString()); if (emailData != null) { CaseData cases = new CaseData(); #region Collect Case Data cases.SearchData = this._sfdcUtilityHelper.GetEmailSearchValue(_caseEmailOptions, emailData, callType); cases.ObjectName = _caseEmailOptions.ObjectName; cases.NoRecordFound = SFDCObjectHelper.GetNoRecordFoundAction(callType, _caseEmailOptions); cases.MultipleMatchRecord = SFDCObjectHelper.GetMultiMatchRecordAction(callType, _caseEmailOptions); cases.NewRecordFieldIds = _caseEmailOptions.NewrecordFieldIds; cases.SearchCondition = _caseEmailOptions.SearchCondition; cases.CreateLogForNewRecord = _caseEmailOptions.CanCreateLogForNewRecordCreate; cases.MaxRecordOpenCount = _caseEmailOptions.MaxNosRecordOpen; cases.SearchpageMode = _caseEmailOptions.SearchPageMode; cases.PhoneNumberSearchFormat = _caseEmailOptions.PhoneNumberSearchFormat; if (cases.NoRecordFound.Equals("createnew") && this._caseEmailRecordConfig != null) { cases.CreateRecordFieldData = this._sfdcUtility.GetCreateActivityLogData(this._caseEmailRecordConfig, null, callType, emailData); } if (callType == SFDCCallType.InboundEmail || callType == SFDCCallType.InboundEmailPulled) { if (_caseEmailOptions.InboundCanCreateLog) { cases.CreateActvityLog = true; cases.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._caseChatLogOptions, null, callType, emailData); } } else if (callType == SFDCCallType.OutboundEmailFailure || callType == SFDCCallType.OutboundEmailSuccess || callType == SFDCCallType.OutboundEmailPulled) { if (_caseEmailOptions.OutboundCanCreateLog) { cases.CreateActvityLog = true; cases.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._caseChatLogOptions, null, callType, emailData); } } #endregion Collect Case Data return(cases); } } catch (Exception generalException) { this._logger.Error("GetAccountEmailPopupData : Error occurred while reading Account Data : " + generalException.ToString()); } return(null); }
internal static string GetMultiMatchRecordAction(SFDCCallType calltype, ChatOptions chatOptions) { switch (calltype) { case SFDCCallType.InboundChat: return(chatOptions.InbMultiMatchRecordAction); case SFDCCallType.ConsultVoiceReceived: return(chatOptions.ConMultiMatchRecordAction); } return(null); }
internal static string GetNoRecordFoundAction(SFDCCallType calltype, ChatOptions options) { switch (calltype) { case SFDCCallType.InboundChat: return(options.InbNoMatchRecordAction); case SFDCCallType.ConsultChatReceived: return(options.ConNoMatchRecordAction); } return(null); }
internal static bool GetCanCreateProfileActivity(SFDCCallType callType, ChatOptions chatOptions, bool IsNoRecord = false) { switch (callType) { case SFDCCallType.InboundChat: return(IsNoRecord ? chatOptions.InbCanCreateNorecordActivity : chatOptions.InbCanCreateMultimatchActivity); case SFDCCallType.ConsultChatReceived: return(IsNoRecord ? chatOptions.ConCanCreateNorecordActivity : chatOptions.ConCanCreateMultimatchActivity); } return(false); }
public IUserActivity GetVoiceCreateUserAcitivityData(IMessage message, SFDCCallType callType) { try { this._logger.Info("GetCreateUserAcitivityData : Reading UserActivity Log Data....."); this._logger.Info("GetCreateUserAcitivityData : Event Name : " + message.Name); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { IUserActivity userActivity = new UserActivityData(); #region Collect User Activity Data userActivity.ObjectName = this._voiceUserActivityOptions.ObjectName; if (callType == SFDCCallType.InboundVoice) { userActivity.CreateActvityLog = this._voiceUserActivityOptions.InboundCanCreateLog; if (this._voiceUserActivityOptions.InboundCanCreateLog && this._voiceUserActivityLog != null) { userActivity.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._voiceUserActivityLog, popupEvent, callType); } } else if (callType == SFDCCallType.OutboundVoiceSuccess) { userActivity.CreateActvityLog = this._voiceUserActivityOptions.OutboundCanCreateLog; if (this._voiceUserActivityOptions.OutboundCanCreateLog && this._voiceUserActivityLog != null) { userActivity.CreateActvityLog = true; userActivity.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._voiceUserActivityLog, popupEvent, callType); } } else if (callType == SFDCCallType.OutboundVoiceFailure) { userActivity.CreateActvityLog = this._voiceUserActivityOptions.OutboundFailureCanCreateLog; if (this._voiceUserActivityOptions.OutboundFailureCanCreateLog && this._voiceUserActivityLog != null) { userActivity.CreateActvityLog = true; userActivity.ActivityLogData = this._sfdcUtility.GetCreateActivityLogData(this._voiceUserActivityLog, popupEvent, callType); } } #endregion Collect User Activity Data return(userActivity); } } catch (Exception generalException) { this._logger.Error("GetCreateUserAcitivityData : Error occurred : " + generalException.ToString()); } return(null); }
public IUserActivity GetChatUpdateUserAcitivityData(IMessage message, SFDCCallType callType, string callDuration, string chatContent) { try { this.logger.Info("GetChatUpdateUserAcitivityData : Reading User Activity Update Data....."); this.logger.Info("GetChatUpdateUserAcitivityData : Event Name : " + message.Name); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { IUserActivity userActivity = new UserActivityData(); #region Collect Lead Data userActivity.ObjectName = this.voiceUserActivityOptions.ObjectName; if (callType == SFDCCallType.InboundChat) { if (this.voiceUserActivityOptions.InboundCanUpdateLog) { userActivity.UpdateActivityLog = true; userActivity.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(chatUserActivityLog, popupEvent, callType, callDuration, chatContent); } } if (callType == SFDCCallType.ConsultChatReceived) { if (this.voiceUserActivityOptions.ConsultCanUpdateLog) { userActivity.UpdateActivityLog = true; userActivity.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(chatUserActivityLog, popupEvent, callType, callDuration, chatContent); } } else if (callType == SFDCCallType.ConsultChatSuccess || callType == SFDCCallType.ConsultChatFailure) { if (this.voiceUserActivityOptions.ConsultCanUpdateLog) { userActivity.UpdateActivityLog = true; userActivity.UpdateActivityLogData = this.sfdcObject.GetChatUpdateActivityLog(chatUserActivityLog, popupEvent, callType, callDuration, chatContent); } } #endregion Collect Lead Data return(userActivity); } } catch (Exception generalException) { this.logger.Error("GetChatUpdateUserAcitivityData : Error occurred while reading Lead Data : " + generalException.ToString()); } return(null); }
public IUserActivity GetVoiceUpdateUserAcitivityData(IMessage message, SFDCCallType callType, string callDuration, string notes) { try { this._logger.Info("GetUpdateUserAcitivityData : Reading UserActivity Log Data....."); this._logger.Info("GetUpdateUserAcitivityData : Event Name : " + message.Name); dynamic popupEvent = Convert.ChangeType(message, message.GetType()); if (popupEvent != null) { IUserActivity userActivity = new UserActivityData(); #region Collect Lead Data userActivity.ObjectName = this._voiceUserActivityOptions.ObjectName; if (callType == SFDCCallType.InboundVoice) { userActivity.UpdateActivityLog = this._voiceUserActivityOptions.InboundCanUpdateLog; if (this._voiceUserActivityOptions.InboundCanUpdateLog && this._voiceUserActivityLog != null) { userActivity.UpdateActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._voiceUserActivityLog, popupEvent, callType, callDuration, voiceComments: notes); } } else if (callType == SFDCCallType.OutboundVoiceSuccess || callType == SFDCCallType.OutboundVoiceFailure) { userActivity.UpdateActivityLog = this._voiceUserActivityOptions.OutboundCanUpdateLog; if (this._voiceUserActivityOptions.OutboundCanUpdateLog && this._voiceUserActivityLog != null) { userActivity.UpdateActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._voiceUserActivityLog, popupEvent, callType, callDuration, voiceComments: notes); } } else if (callType == SFDCCallType.ConsultVoiceReceived) { userActivity.UpdateActivityLog = this._voiceUserActivityOptions.ConsultCanUpdateLog; if (this._voiceUserActivityOptions.ConsultCanUpdateLog && this._voiceUserActivityLog != null) { userActivity.UpdateActivityLogData = this._sfdcUtility.GetUpdateActivityLogData(this._voiceUserActivityLog, popupEvent, callType, callDuration, voiceComments: notes); } } #endregion Collect Lead Data return(userActivity); } } catch (Exception generalException) { this._logger.Error("GetInboundLeadPopupData : Error occurred while reading Lead Data on EventRinging Event : " + generalException.ToString()); } return(null); }