Author Topic: Genesys IWS C# extension: Show new outbound mail interaction window  (Read 9459 times)

Offline Zoner

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Hi

I'm pretty new to genesys development and we need to integrate our customers CRM to Genesys IWS. I currently have achieved to get my module loaded and put in place where needed. Now I have a WCF interface to create and reply e-mails triggered from the CRM. This is where I'm stuck now.

I want to show the interaction window to create/reply a new e-mail now. I tried it with:

[code]IInteractionsWindow interactionsView = Container.Resolve<IInteractionsWindow>();
interactionsView.Create();
interactionsView.ShowView();[/code]

This creates a new window but it's totally empty and now really what I need. Do I have to insert every single region on my own? Is there a better way to do with the C# SDK?

Thanks for any hints

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #1 on: December 03, 2014, 10:08:48 AM »
From my point of view the better way is through PSDK on IxN or UCS server level, where you can create new interaction much easier.

Offline Zoner

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #2 on: December 03, 2014, 10:31:22 AM »
Thanks for your answer. Does this open the interaction dialog in IWS automatically?

What I already tried based on the article here: http://docs.genesys.com/Documentation/PSDK/8.1.4/Developer/CreatinganE-Mail#t-1

[code]interactionServerProtocol = new InteractionServerProtocol(new Endpoint(new Uri("tcp://ixnServer:7319")));
interactionServerProtocol.ClientName = "CRMIntegrationModule";
interactionServerProtocol.ClientType = InteractionClient.AgentApplication;

contactServerProtocol = new UniversalContactServerProtocol(new Endpoint(new Uri("tcp://ucsServer:5130")));
contactServerProtocol.ClientName = "CRMIntegrationModule";

interactionServerProtocol.Open();
contactServerProtocol.Open();

RequestSubmit request = RequestSubmit.Create();
request.InteractionType = "Outbound";
request.InteractionSubtype = "OutboundNew";
request.MediaType = "email";
request.Queue = "default";

EventAck response = interactionServerProtocol.Request(request) as EventAck;
if (response != null)
{
    string id = Convert.ToString(response.Extension["InteractionId"]);

    RequestInsertInteraction insertRequest = RequestInsertInteraction.Create();
    insertRequest.InteractionAttributes = new InteractionAttributes
    {
        Id = id,
        MediaTypeId = "email",
        TypeId = "Outbound",
        SubtypeId = "OutboundNew",
        TenantId = 101,
        Status = new NullableStatuses(Statuses.Pending),
        Subject = "Testmail",
        EntityTypeId = new NullableEntityTypes(EntityTypes.EmailOut)
    };
    insertRequest.EntityAttributes = new EmailOutEntityAttributes()
    {
        FromAddress = "test@gmx.ch",
        ToAddresses = "test@gmx.ch",
    };
    insertRequest.InteractionContent = new InteractionContent()
    {
        Text = "This is the e-mail body."
    };
    contactServerProtocol.Send(insertRequest);

    RequestPlaceInQueue queueRequest = RequestPlaceInQueue.Create();
    queueRequest.InteractionId = id;
    queueRequest.Queue = "default";
    interactionServerProtocol.Send(queueRequest);
}

interactionServerProtocol.Close();
contactServerProtocol.Close();[/code]

The bad thing about this is that the response given from the interaction server is:

[code]attr_ref_id [int] = 2
attr_error_code [int] = 34
attr_error_desc [str] = "Client is not logged in"[/code]

Is this the way to go and what goes wrong?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #3 on: December 03, 2014, 12:19:12 PM »
Yes, you are calling request for "agent" who is not logged in to the multimedia (email) channel. If you have not got an experience with Genesys and nobody from your colleagues could not help you, I would strongly recommend to you visit some Genesys training.

Offline Zoner

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #4 on: December 03, 2014, 01:51:53 PM »
I know that some training would be helpful but it does not solve my immediate problem here :(

Maybe you can shed some light and tell me how I can log in to this multimedia channel? Documentation is hard to find and not very helpful. So I hoped for some developer input.

Offline Zoner

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #5 on: December 03, 2014, 03:30:34 PM »
I came here for help and pushes in the right direction, not complete code and especially not for arguments. I don't have the time and mood for this. Thanks for your time anyway.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #6 on: December 03, 2014, 03:47:32 PM »
I have provided you with some hints. As I wrote, be more specific what is not clear for you and which what part of developing makes you a problem, we can help you. But nobody can help if the question is so general.

In case when you need general integration, it is not good way to do it just through IWS API. YOu have to think more general and develop some "server type" application, not only the agent app. In other hand, you can invite and involve Genesys PS:-)

Offline Zoner

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #7 on: December 04, 2014, 07:16:28 AM »
Ok, I now managed to send an e-mail through the platform SDK, but that's not exactly what I wanted. I really just want to invoke the new outbound mail dialog in the WPF IWS application so the user can do with it whatever he wants to. I'm not sure whether this is possible with the IWS API or not. I think I need to go back to the InteractionWindow stuff from my initial post.

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #8 on: December 18, 2014, 08:49:24 PM »
Hi Zoner,

You are trying to invoke some action in IWS that creates an IWS outbound email window, am I understanding correctly?

Check out Command Chains on the documentation site, specifically "MediaEmailCreateNewOutboundEmail".  I have never used this specific command before, but I imagine if you invoke it manually and pass appropriate parameters, it will create an email interaction window within IWS.

http://docs.genesys.com/Documentation/IW/8.1.4/Developer/ReferenceforCommands

Regards,
Andrew

Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #9 on: January 09, 2015, 04:54:42 PM »
Hi Zoner

I'm not sure whether is not too late for you.

Just some little hints to proceed.
If you want to create new outbound email in you desktop, you have to create outbound email interaction as well. Otherwise you can destroy Contact server Genesys records.

Best way to do it is use one of exiting Command chains and execute it.

Start on Workspace Desktop API and use high level functions.
Otherwise you can cause lot damage without positive effect.

Drill down to platform only in case you miss some function on Workspace or Enterprise SDK.

To create new email I would recommend you to execute " "


Regards
Robert


Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Genesys IWS C# extension: Show new outbound mail interaction window
« Reply #10 on: January 09, 2015, 04:57:48 PM »
Hi Zoner

Update:
To create new email I would recommend you to execute "MediaEmailCreateNewOutboundEmail", command chain with proper parameters.
This should ensure all Workspace windows popup and Genesys backed functionality be properly executed.

Regards
Robert