Author Topic: How to attach data in Email and Chat interactions Workspace Desktop Edition  (Read 625 times)

Offline marckoguzman

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Hello, Im tried to attach data to Email and Chat interactions when interaction doesnt come with attached data en Case part with simple code:

                    object caseObject;
                    if (contextDictionary.TryGetValue("Case", out caseObject))
                    {
                     
                        ICase caseInx = caseObject as ICase;
                       caseInx.MainInteraction.SetAttachedData("LastName", LN);

But doesnt work. There is any way to send this information like part of data interaction. In interaction voice is working  different:

 voiceService.SetAttachedData(caseInx.MainInteraction.EntrepriseInteractionCurrent, "NumPerson", nump);

This code work fine to voice interactions


Thanks for your help!!!

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2643
  • Karma: 41
In which command do you try to get the interaction object?
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)

Offline marckoguzman

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Im not using this sentence inside command, Im trying execute inside Extended View button click event, when I get data from external web service.

public partial class MySampleView : UserControl, IMySampleView
    {
      //here container definition
        readonly IObjectContainer container;
      string ape="S/N";
    ...


 private void GetData_Click(object sender, RoutedEventArgs e)
        {
        IAgent myAgent = container.Resolve<IAgent>();
        IEnterpriseServiceProvider enterpriseService = myAgent.EntrepriseService;
        IDictionary<string, object> contextDictionary = (Context as IDictionary<string, object>);
                    //IMediaVoice
                    IVoiceService voiceService = enterpriseService.Resolve<IVoiceService>("voiceService");
                    IChatService chatService = enterpriseService.Resolve<IChatService>("chatService");
                    IEmailService emailService = enterpriseService.Resolve<IEmailService>("emailService");
                    object caseObject;
                    if (contextDictionary.TryGetValue("Case", out caseObject))
                    {

                        ICase caseInx = caseObject as ICase;

                        var tipo = caseInx.MainInteraction.Type;

                    if (Dat.ape.ToString() != null)
                    {
                     
                        ape = Dat.ape.ToString();
                    }

                         if (tipo.ToString() == "InteractionEmail" || tipo.ToString() == "InteractionInboundEmail")
                        {

                            caseInx.MainInteraction.SetAttachedData("LastName", ape);
                          }
        }

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2643
  • Karma: 41
Use InteractionManager interface to get an interaction object on which you can set the attached data
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)