Exemplo n.º 1
0
        private void MyInteractionsOnInteractionChanged(object sender, InteractionAttributesEventArgs e)
        {
            using (Trace.Main.scope())
            {
                try
                {
                    // Find the interaction VM
                    var interactionVm = GetInteractionViewModel(e.Interaction);
                    if (interactionVm == null)
                    {
                        return;
                    }
                    else
                    {
                        interactionVm.RaiseInteractionPropertyChanged(e.InteractionAttributeNames);
                    }

                    // Try screen pop
                    if (e.InteractionAttributeNames.Contains(VideoIntegrationAttributeNames.VideoRoomUrl) || // Due to attached convo
                        e.InteractionAttributeNames.Contains(InteractionAttributeName.State))                // Due to pickup
                    {
                        TryScreenPop(e.Interaction);
                    }
                }
                catch (Exception ex)
                {
                    Trace.Main.exception(ex, ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        private void MyInteractionsOnInteractionAdded(object sender, InteractionAttributesEventArgs e)
        {
            using (Trace.Main.scope())
            {
                try
                {
                    Context.Send(s =>
                    {
                        using (Trace.Main.scope("MyInteractionsOnInteractionAdded"))
                        {
                            try
                            {
                                var vm = GetInteractionViewModel(e.Interaction);
                                if (vm == null)
                                {
                                    return;
                                }

                                // Screen pop
                                TryScreenPop(e.Interaction);
                            }
                            catch (Exception ex)
                            {
                                Trace.Main.exception(ex);
                            }
                        }
                    }, null);
                }
                catch (Exception ex)
                {
                    Trace.Main.exception(ex);
                }
            }
        }
        private void QueueOnInteractionAdded(object sender, InteractionAttributesEventArgs e)
        {
            var repository  = new Repository();
            var interaction = e.Interaction;

            if (interaction is ChatInteraction)
            {
                var chatId        = interaction.GetWatchedStringAttribute("WebTools_WebChatId");
                var interactionId = interaction.GetWatchedStringAttribute(InteractionAttributeName.InteractionId);
                if (!String.IsNullOrEmpty(chatId) && !String.IsNullOrEmpty(interactionId))
                {
                    var chatIdLong = Convert.ToInt64(chatId);
                    var chat       = repository.Chats.FirstOrDefault(c => c.ChatId == chatIdLong);
                    if (chat != null)
                    {
                        chat.InteractionId = interactionId;
                        repository.SaveChanges();
                    }
                }
            }
        }
Exemplo n.º 4
0
 private void InteractionQueueInteractionAdded(object sender, InteractionAttributesEventArgs e)
 {
     WatchingQueueCompleted();
     UpdateQueueList();
 }