public ResponseModel GetAgentChatHistory() { ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; List <AgentCustomerChatHistory> ChatsList = new List <AgentCustomerChatHistory>(); try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); CustomerChatCaller customerChatCaller = new CustomerChatCaller(); ChatsList = customerChatCaller.GetAgentChatHistory(new CustomerChatService(_connectionString), authenticate.TenantId, authenticate.UserMasterID, authenticate.ProgramCode); statusCode = ChatsList.Count > 0 ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = ChatsList; } catch (Exception) { throw; } return(objResponseModel); }