Genesys CTI User Forum > Genesys-related Development
Genesys IWS C# extension: Show new outbound mail interaction window
Zoner:
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
Kubig:
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.
Zoner:
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?
Kubig:
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.
Zoner:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version