I will eventually be writing a custom application to load campaigns onto the Outbound Contact Server. I'm just playing around with the SDK to do something very simple. Unfortunately, the Documentation for the for the Outbound SDK is very basic (opens and closes a protocol) (http://docs.genesys.com/Documentation/PSDK/latest/Developer/OutboundContactServer) and doesn't show how to do something more elaborate.
So far, I'm just trying to build off this basic example by trying to get a campaign's status. Currently, I just receive "EvenError" when I request the campaign status. Can someone explain to me how to get back a real status or show me some more complex examples using Outbound?
Here is my running code (c#):
---------------------------------------------------------------------------------
string ocsHost = "ocs";
int ocsPort = 7000;
Endpoint ocsEndpoint = new Endpoint("outboundCallServer", ocsHost, ocsPort);
OutboundServerProtocol ocsProtocol = new OutboundServerProtocol(ocsEndpoint);
ocsProtocol.UserName = "*****"; // Contains real user name, just *** out here for security reasons
ocsProtocol.UserPassword = "****"; // Contains real password, just *** here for security reasons
ocsProtocol.Open();
RequestGetCampaignStatus getCampaignStatusRequest = RequestGetCampaignStatus.Create();
// Set the campaign ID
getCampaignStatusRequest.CampaignId = 109; //pcsc_CABQWelcome
try
{
// Send the request syncronously
IMessage response = ocsProtocol.Request(getCampaignStatusRequest);
// Code always returns EventError
if (response.Id == EventError.MessageId)
{
Debug.Print("There was an error getting this event response: " + response.Name);
}
else
{
Debug.Print("Campaign Status: " + response.Name);
}
}
catch (Exception ex)
{
Debug.Print("Exception: " + ex.Message.ToString());
}
ocsProtocol.Close();