예제 #1
0
        private void feedRTA_SendRTASnapShot(object sender, EventArgs e)
        {
            var rta             = new RTA.TeleoptiRtaServiceClient();
            var snapshotBatchId = DateTime.UtcNow;

            //Create the array that will hold all posts in the batch
            var externalUserStateBatchSnapShot = new RTA.ExternalUserState[2];

            //Create one ExternalUserState and add it to the array
            externalUserStateBatchSnapShot[0] = new RTA.ExternalUserState()
            {
                BatchId          = snapshotBatchId,
                IsLoggedOn       = true,
                IsSnapshot       = true,
                SecondsInState   = 60,
                StateCode        = "WEB",
                StateDescription = "Working the web chat",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "0085"
            };
            //Create a second ExternalUserState and add it to the array
            externalUserStateBatchSnapShot[1] = new RTA.ExternalUserState()
            {
                BatchId          = snapshotBatchId,
                IsLoggedOn       = true,
                IsSnapshot       = true,
                SecondsInState   = 60,
                StateCode        = "InCall",
                StateDescription = "Talking",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "2003"
            };

            //Save the batch
            returnCode = rta.SaveBatchExternalUserState(
                _RTAKey,
                _platformTypeId,
                _sourceId,
                externalUserStateBatchSnapShot);

            //Close the snapshot batch, this will logout everybody _not_ part of the Array externalUserStateBatchSnapShot[]
            returnCode = rta.SaveExternalUserState(
                _RTAKey,
                "",
                "",
                "",
                true,
                0,
                snapshotBatchId,
                _platformTypeId,
                _sourceId,
                snapshotBatchId,
                true
                );
        }
예제 #2
0
        private void feedRTA_SendRTASingleuser(object sender, EventArgs e)
        {
            var rta = new RTA.TeleoptiRtaServiceClient();

            returnCode = rta.SaveExternalUserState(
                _RTAKey,                //authenticationKey
                "0238",                 //userCode, e.i the ACD Login ID
                "WEB",                  //stateCode, the RTA state using the identifier for the state
                "Working the web chat", //stateDescription, the RTA state using the friendly name/description
                true,                   //isLoggedOn
                0,                      //secondsInState, not used
                DateTime.UtcNow,        //timestamp
                _platformTypeId,        //platformTypeId
                _sourceId,              //sourceId
                DateTime.UtcNow,        //batchId
                false                   //isSnapshot
                );
        }
예제 #3
0
        private void feedRTA_SendOneAgentCustomStateCode(object sender, EventArgs e)
        {
            string _agentAcd = AcdLogonId.GetItemText(AcdLogonId.SelectedItem);

            string[] agent       = _agentAcd.Split('\t');
            string   _acdLogonId = agent[0];
            string   _stateCode  = StateCode.GetItemText(StateCode.SelectedItem);

            var rta = new RTA.TeleoptiRtaServiceClient();

            returnCode = rta.SaveExternalUserState(
                _RTAKey,                       //authenticationKey
                _acdLogonId,                   //userCode, e.i the ACD Login ID
                _stateCode,                    //stateCode, the RTA state using the identifier for the state
                "is not used for know states", //stateDescription, the RTA state using the friendly name/description
                true,                          //isLoggedOn
                0,                             //secondsInState, not used
                DateTime.UtcNow,               //timestamp
                _platformTypeId,               //platformTypeId
                _sourceId,                     //sourceId
                DateTime.UtcNow,               //batchId
                false                          //isSnapshot
                );
        }
예제 #4
0
        private void feedRTA_SendRTABatch(object sender, EventArgs e)
        {
            //Service reference to          //http://localhost/TeleoptiWFM/RTA/TeleoptiRtaService.svc
            var rta     = new RTA.TeleoptiRtaServiceClient();
            var batchId = DateTime.UtcNow;
            var externalUserStateBatch = new RTA.ExternalUserState[5];

            //Create one ExternalUserState and add a few agents to it
            externalUserStateBatch[0] = new RTA.ExternalUserState()
            {
                BatchId          = batchId,
                IsLoggedOn       = true,
                IsSnapshot       = false,
                SecondsInState   = 60,
                StateCode        = "ADMIN",
                StateDescription = "Doing Admin stuff",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "2001"
            };

            externalUserStateBatch[1] = new RTA.ExternalUserState()
            {
                BatchId          = batchId,
                IsLoggedOn       = true,
                IsSnapshot       = false,
                SecondsInState   = 60,
                StateCode        = "EMAIL",
                StateDescription = "Working the email queue",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "2002"
            };

            externalUserStateBatch[2] = new RTA.ExternalUserState()
            {
                BatchId          = batchId,
                IsLoggedOn       = true,
                IsSnapshot       = false,
                SecondsInState   = 60,
                StateCode        = "IDLE",
                StateDescription = "Ready to take calls",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "0063"
            };

            externalUserStateBatch[3] = new RTA.ExternalUserState()
            {
                BatchId          = batchId,
                IsLoggedOn       = true,
                IsSnapshot       = false,
                SecondsInState   = 60,
                StateCode        = "InCall",
                StateDescription = "Currenty on a call",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "2000"
            };

            externalUserStateBatch[4] = new RTA.ExternalUserState()
            {
                BatchId          = batchId,
                IsLoggedOn       = true,
                IsSnapshot       = false,
                SecondsInState   = 60,
                StateCode        = "WEB",
                StateDescription = "Working the web chat",
                Timestamp        = DateTime.UtcNow,
                UserCode         = "0019"
            };

            //Save the batch the the Teleopti RTA service
            returnCode = rta.SaveBatchExternalUserState(
                _RTAKey,
                _platformTypeId,
                _sourceId,
                externalUserStateBatch);
        }