Author Topic: How to send request to Outbound  (Read 8033 times)

Offline Madarasi

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
How to send request to Outbound
« on: February 23, 2010, 10:15:15 AM »
Hi,

I've a doubt on sending request to OCS from desktop application.

Normally we can Load/Unload, Start/Stop the campaigns, the same way i need to Re-Schedule a record.

I verified the "Outbound Reference Manual for 7.5", all they explained request can be send to OCS as UserEvent.

i found some classes under the name space "Genesyslab.Platform.Outbound.Protocols.OutboundDesktop", i tried "RecordReschedule" class.

Now i need to know how to send request(RecordReschedule) to OCS.  I tried by sending the Outbound protocol

"Protocol.Request(RecordReschedule)", I' mgetting Error.

Can anyone help me to solve this.

S. Ramkumar

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: How to send request to Outbound
« Reply #1 on: February 23, 2010, 11:51:51 AM »
Hi,

What kind error do you receive?

R.

Offline Madarasi

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: How to send request to Outbound
« Reply #2 on: February 23, 2010, 12:06:38 PM »
Hi,

I received error while building the application itself.

Error 1 : "The best overloaded method match for 'Genesyslab.Platform.Commons.Protocols.ClientChannel.Request(Genesyslab.Platform.Commons.Protocols.IMessage)' has some invalid arguments D:\Projects\SoftPhone - Organised\Code\MemMin\SoftPhoneBar\OutboundService\OutboundAction\UpdateOutboundCall.cs 66 42 OutboundService"


Error 2  : "Argument '1': cannot convert from 'Genesyslab.Platform.Outbound.Protocols.OutboundDesktop.OutboundDesktopFactory' to 'Genesyslab.Platform.Commons.Protocols.IMessage' D:\Projects\SoftPhone - Organised\Code\MemMin\SoftPhoneBar\OutboundService\OutboundAction\UpdateOutboundCall.cs 66 59 OutboundService"


I've given the code below

#region RescheduleOutboundCall
       public bool RescheduleOutboundCall(Dictionary<string,string> data)
       {
           bool isCallIpdated = false;
           IMessage serverResponse = null;
           RecordReschedule serverRequest = null;
           DateTime reScheduleTime = new DateTime();
           DateTime reScheduleDate = new DateTime();
           string finalDateTime = string.Empty;
           OutboundServerProtocol protocol = null;
           OutboundDesktopFactory factory=null;
           try
           {
               if (data != null)
               {
                   serverRequest = new RecordReschedule();                    

                   serverRequest.ApplicationId = Convert.ToInt32(data["id"]);
                   serverRequest.CallbackType = CallbackType.Campaign;
                   serverRequest.CampaignName = data["cname"];

                   reScheduleTime = Convert.ToDateTime(data["time"]);
                   reScheduleDate = Convert.ToDateTime(data["date"]);

                   finalDateTime = reScheduleDate.Date.ToShortDateString() + " " +
                       reScheduleTime.ToString(Settings.OutboundProperties["date"], CultureInfo.InstalledUICulture);
                   logger.Info("Re-Schedule time " + finalDateTime + " for the campaign " + data["cname"]);

                   serverRequest.DateTime = finalDateTime;
                   serverRequest.RecordHandle = Convert.ToInt32(data["record"]);                    

                   protocol = (OutboundServerProtocol)Settings.protocol["protocol"];

                   if (protocol.State == ChannelState.Opened)
                   {
                       serverResponse = protocol.Request(factory);

                       if (serverResponse != null)
                       {
                           switch (serverResponse.Id)
                           {
                               case EventError.MessageId:
                                   logger.Error("Error response from Outbound server for re-scheduling the call " +
                                       serverResponse.ToString());
                                   break;

                               default:
                                   logger.Info("Default response from Outbound server for re-scheduling the call " +
                                       serverResponse.ToString());
                                   break;
                           }
                       }
                   }
                   else
                   {
                       logger.Info("Outbound protocol status is " +protocol.State.ToString());
                   }
               }
               else
               {
                   logger.Info("Input data for re-scheduling the call is empty ");
               }
           }
           catch (Exception generalException)
           {
               logger.Error("Error occured while updating the outbound call with rescheduling time " +
                   generalException.ToString());
           }
           finally
           {
               serverResponse = null;
               serverRequest = null;
               protocol = null;
               data = null;
               factory=null;
           }
           return isCallIpdated;
       }
       #endregion
« Last Edit: February 23, 2010, 12:10:45 PM by Madarasi »

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: How to send request to Outbound
« Reply #3 on: February 23, 2010, 12:26:57 PM »
Hi,

Requests related to outbound desktop must be sent via TServer protocol and not Outbound. You can find more details and sample application on official Genesys forum - [url=https://forums.genesyslab.com/showthread.php?t=690]https://forums.genesyslab.com/showthread.php?t=690[/url].

R.

Offline Madarasi

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: How to send request to Outbound
« Reply #4 on: February 23, 2010, 07:16:01 PM »
Thank You Rene,

I've completed my task.  The link you given helps me to solve this issue.

Thanks & Regards,
S. Ramkumar

Offline badduck

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: How to send request to Outbound
« Reply #5 on: August 25, 2014, 08:40:18 AM »
Hi Rene,

I am a newbie to Genesys PSDK. I suspect recently Genesys changed their forum to SalesForce and lots of the sample codes are missing.
The URL which you shared [url=https://forums.genesyslab.com/showthread.php?t=690]https://forums.genesyslab.com/showthread.php?t=690[/url] is dead.

I trying to build a custom application which interacts with Genesys' Auto Dialer. I manage to find some sample code which interacts with TServer (soft dialing features) but almost nothing on Outbound Desktop. I am writing this app using VB.Net.

I am trying to do the following:
1. Retrieving custom data from the EventRinging class.
2. Trigger personal call backs using RecordReschedule.
3. Inject new personal call backs using AddRecord class.
4. Update a call status using UpdateCallCompletionStats.
5. Remove a calling list from Auto Dialer using DoNoCall class.

Can you please point to me where can I find such sample codes?
Thank you in advance and Regards.

Regards,
Badduck!

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to send request to Outbound
« Reply #6 on: August 25, 2014, 08:58:25 AM »
You can find sample codes on docs.genesyslab.com or if you are Genesys partnerm, you can find topics from moved forum "forum.genesyslab.com" to internally saleforce or contact support with your questions. There is no other officialy place where you can find some examples such as "hello world!", except personally pages of some Genesys experts.

Offline badduck

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: How to send request to Outbound
« Reply #7 on: August 25, 2014, 09:39:43 AM »
Hi Kubig,

Thanks for reply so quickly.
I have tried scouring the docs.genesyslab.com and Salesforce. Only managed to find [url=http://docs.genesys.com/Documentation/PSDK/latest/Developer/PlatformSDKResources#Code_Samples]http://docs.genesys.com/Documentation/PSDK/latest/Developer/PlatformSDKResources#Code_Samples[/url].
I can't find anything on OutboundDesktop or how to send OutboundDesktop request via TServer, as mentioned by René.

I have posted a question on the Community section of Salesforce a few days back. Hopefully someone can shine some light on my question.

Thanks & Regards,
Badduck

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to send request to Outbound
« Reply #8 on: August 25, 2014, 09:42:56 AM »
From my point of view is much better and quick to create request to Genesys support as question , not problem/incident. If you have some specific problems or question about it, try to ask here.

Offline blakshmikanth

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
Re: How to send request to Outbound
« Reply #9 on: August 27, 2014, 08:26:13 AM »
Hi,

Please refer to Communication Protocol and Communication DN API  from Outbound Reference Manual Guide for desktop communication requests & events to OCS via T-Server.

Regards,
Lucky
[url=http://www.lakshmikanth.com]www.lakshmikanth.com[/url]