The Virtual Call Center API allows you to connect to agents, prompting them with their AgentID, log them into the system, and then connect them with numbers from a campaign.
When used in conjunction with the Voice Broadcast API, it allows you to create a fully-functional virtual call center for any number of remote users.
This api will allow you to run a Call Center Connect campaign using an API. The benefit is that you can control the type of popup screen you want and the way to collect data and get to the next call.
Quick Links
* WSDL = https://www.callfire.com/service/PredictiveService?wsdl * getConnectionForAgent * sendAgentCallBack * loginAgent * storeAgentResponse * kickAgent
How Call Center Connect Works from the Agent Perspective
As an agent the Call Center system works as follows:
How Call Center Connect API Works Setup your campaigns first
Using the API to Login your Agents The agent login process is 2 steps. First the you must initiate a callback to the agent. Then the agent must login with the agent id they hear on the phone.
After the Login
Once the login agent call is made, the agent will be put in a queue to get the next connected call.
You cannot specify which call they will get, the CallFire system will determine this from the list of available calls.
To find out which call the Agent connected to, you must make call the function getConnectionForAgent.
This is a blocking call, so when you initiate the function, it won't return until a connection has taken place.
The system will return a CallType upon connection - this will have all the information about the connection you need to generate a popup on the Agents Screen.
After the agent is done with the call, you must submit a storeAgentResponse call.
This function will collect information about the call that was connected and immediately put the Agent on a queue for the next available call.
This is when the Agent hears the hold music as mentioned in step 6 of the "Agent Perspective" above.
If the connected call was the last call for an agent, you can set the lastcall attribute to true so the system doesn't put the agent back on the queue for the next available call.
The system automatically puts the Agent in a queue to receive a call, so its important that after login, you call getConnectionForAgent right away and follow the steps outlined above.
Additional Functionality
kickAgent - use this to forcibly hangup an agent.
This function kicks an agent from a campaign. It will hangup their phone.
Parameters
* key - (String) your api key from the account page * campaignId - (long) the campaign id to start * agentId - (long) the agent id for which you need the connection information
Response
* No return. Throws Exception if any error occurs
Distributed Call Center Connect API
This feature will allow you to create your own front end to our call center connect system. Now you can have your own interface that your call center and distributed agents can log onto.
Features
The WSDL is called PredictiveService.
When called, the answering machine message used during campaign creation will be automatically left on the current call. The agent moves on to the next call once this function is called.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:answeringMachineTransferStoreAgentResponse
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>-4141</tnsa:campaignId>
<tnsa:agentId>string</tnsa:agentId>
<tnsa:callId>string</tnsa:callId>
<tnsa:agentResponse>string</tnsa:agentResponse>
<tnsa:agentNotes>string</tnsa:agentNotes>
<tnsa:lastcall>0</tnsa:lastcall>
</tnsa:answeringMachineTransferStoreAgentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function answeringMachineTransferStoreAgent_Response($key,$campaignId,$agentId,$callId,$agentResponse,$agentNotes,$lastcall,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'agentId' => $agentId,
'callId' => $callId,
'agentResponse' => $agentResponse,
'agentNotes' => $agentNotes,
'lastcall' => $lastcall
);
try
{
$createUserRespopnse = $campaignOutboundClient->answeringMachineTransferStoreAgentResponse($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void answeringMachineTransferStoreAgentResponse(string key,long campaignid,string agentid,string callid,string agentresponse,string agentnotes,Boolean lastcall)
{
//LOG.Info("Entered answeringMachineTransferStoreAgentResponse(string key,long campaignid,string agentid,string callid,string agentresponse,string agentnotes,Boolean lastcall)");
try
{
this.predictiveService.answeringMachineTransferStoreAgentResponse(key, campaignid, agentid, callid, agentresponse, agentnotes, lastcall);
}
catch (Exception e)
{
string msg = "unable to store the agent response";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited answeringMachineTransferStoreAgentResponse(string key,long campaignid,string agentid,string callid,string agentresponse,string agentnotes,Boolean lastcall)");
}
}
Use this function to create a new Call Center Campaign
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:createCallCenterConnectCampaign
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:callerid>string</tnsa:callerid>
<tnsa:name>string</tnsa:name>
<tnsa:passcode>string</tnsa:passcode>
<tnsa:dispositionLists>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
</tnsa:dispositionLists>
<tnsa:numbers>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:numbers>
</tnsa:createCallCenterConnectCampaign>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function createCallCenterConnect_Campaign($key,$callerid,$name,$passcode,$phoneNumbers,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$disp = new Disposition("dev","2134000543");
$createcampaign = array(
'key' => $key,
'callerid' => $callerid,
'name' => $name,
'passcode' => $passcode,
'dispositionLists' => $disp,
'numbers' => $pnumber
);
try
{
$createUserRespopnse = $campaignOutboundClient->createCallCenterConnectCampaign($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public long createCallCenterConnectCampaign(string key, string callerid, string name, string passcode, List<Disposition> dispositionArray, List<string> numbers)
{
//LOG.Info("Entered createCallCenterConnectCampaign(string key, string callerid, string name, string passcode, Disposition[] dispositionArray, string[] numbers)");
try
{
long campaignId = this.predictiveService.createCallCenterConnectCampaign(key, callerid, name,passcode, dispositionArray.ToArray(), numbers.ToArray());
return campaignId;
}
catch (Exception e)
{
string msg = "uanable to create call center connect campaign";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited createCallCenterConnectCampaign(string key, string callerid, string name, string passcode, Disposition[] dispositionArray, string[] numbers)");
}
}
Use this function to create a new Call Center Campaign. This is same as createCallCenterConnectCampaign. You can also select the answering machine sound file.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:createCallCenterConnectCampaignWithAM
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:callerid>string</tnsa:callerid>
<tnsa:name>string</tnsa:name>
<tnsa:passcode>string</tnsa:passcode>
<tnsa:dispositionLists>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
<tnsa:Disposition>
<tnsa:dispositions>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:dispositions>
<tnsa:name>string</tnsa:name>
</tnsa:Disposition>
</tnsa:dispositionLists>
<tnsa:numbers>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:numbers>
<tnsa:answeringMachineSound>5362</tnsa:answeringMachineSound>
</tnsa:createCallCenterConnectCampaignWithAM>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function createCallCenterConnectCampaignWithAM($key,$callerid,$name,$passcode,$phoneNumbers,$ansmacSound,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$disp = new Disposition("test","2134000543");
$createcampaign = array(
'key' => $key,
'callerid' => $callerid,
'name' => $name,
'passcode' => $passcode,
'dispositionLists' => $disp,
'numbers' => $pnumber,
'answeringMachineSound' => $ansmacSound
);
try
{
$createUserRespopnse = $campaignOutboundClient->createCallCenterConnectCampaignWithAM($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public long createCallCenterConnectCampaignWithAM(string key, string callerid, string name, string passcode, List<Disposition> dispositionArray, List<string> numbers,long answeringMachineSound)
{
//LOG.Info("Entered createCallCenterConnectCampaignWithAM(string key, string callerid, string name, string passcode, List<Disposition> dispositionArray, List<string> numbers,long answeringMachineSound)");
try
{
long campaignId = this.predictiveService.createCallCenterConnectCampaignWithAM(key, callerid, name, passcode, dispositionArray.ToArray(), numbers.ToArray(), answeringMachineSound);
return campaignId;
}
catch (Exception e)
{
string msg = "uanable to createCallCenterConnectCampaignWithAM";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited createCallCenterConnectCampaignWithAM(string key, string callerid, string name, string passcode, List<Disposition> dispositionArray, List<string> numbers,long answeringMachineSound)");
}
}
Use this function to get the Statistics for the agent.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:getAgentStats xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignid>6026</tnsa:campaignid>
</tnsa:getAgentStats>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function getAgent_Stats($key,$campaignId,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignid' => $campaignId
);
try
{
$createUserRespopnse = $campaignOutboundClient->getAgentStats($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public AgentType[] getAgentStats(string key, long campaignid)
{
//LOG.Info("Entered AgentType[] getAgentStats(string key, long campaignid)");
try
{
AgentType[] agentResponse = this.predictiveService.getAgentStats(key, campaignid);
return agentResponse;
}
catch (Exception e)
{
string msg = "unable to getAgentStats";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited getAgentStats(string key, long campaignid)");
}
}
To find out which call the Agent connected to, you must call this function . This is a blocking call, so when you initiate the function, it won't return until a connection has taken place. The system will return a CallType upon connection - this will have all the information about the connection you need to generate a popup on the Agents Screen.
Parameters
Response
Error
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:getConnectionForAgent xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>8741</tnsa:campaignId>
<tnsa:agentId>string</tnsa:agentId>
</tnsa:getConnectionForAgent>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function getConnectionFor_Agent($key,$campaignId,$agentId,$debug)
{
$createOtboundcampaignWsdl = 'https://ctest.skyynoc.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'agentId' => $agentId
);
try
{
$createUserRespopnse = $campaignOutboundClient->getConnectionForAgent($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public CallType getConnectionForAgent(string key, long campaignId, string agentid)
{
//LOG.Info("Entered getConnectionForAgent(string key, long campaignId, string agentid)");
try
{
CallType calltypeResponse = this.predictiveService.getConnectionForAgent(key, campaignId, agentid);
return calltypeResponse;
}
catch (Exception e)
{
string msg = "unable to getConnectionForAgent";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited getConnectionForAgent(string key, long campaignId, string agentid)");
}
}
This function is used to login an agent into a campaign. Once the login is finished the Agent is immediately put into a queue to get the next available call.
Parameters
Response
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:loginAgent xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>5614</tnsa:campaignId>
<tnsa:agentId>string</tnsa:agentId>
<tnsa:userId>string</tnsa:userId>
</tnsa:loginAgent>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function login_Agent($key,$campaignId,$agentId,$userId,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'agentId' => $agentId,
'userId' => $userId
);
try
{
$createUserRespopnse = $campaignOutboundClient->loginAgent($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void loginAgent(string key, long campaignId, string agentId, string userId)
{
//LOG.Info("Entered loginAgent(string key, long campaignId, string agentId, string userId)");
try
{
this.predictiveService.loginAgent(key, campaignId, agentId, userId);
}
catch (Exception e)
{
string msg = "unable to login agent";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited loginAgent(string key, long campaignId, string agentId, string userId)");
}
}
This is the first step in an Agent login process. This function will initiate a phone call to the Agent and recite an agent id to them over the phone.
Parameters
Response
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:sendAgentCallBack
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>101</tnsa:campaignId>
<tnsa:userId>string</tnsa:userId>
<tnsa:phoneNumber>string</tnsa:phoneNumber>
</tnsa:sendAgentCallBack>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function sendAgentCall_Back($key,$campaignId,$userId,$phoneNumber,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'userId' => $userId,
'phoneNumber' => $phoneNumber
);
try
{
$createUserRespopnse = $campaignOutboundClient->sendAgentCallBack($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void sendAgentCallBack(string key, long campaignid, string userid, string phonenumber)
{
//LOG.Info("Entered sendAgentCallBack(string key, long campaignid, string userid, string phonenumber)");
try
{
this.predictiveService.sendAgentCallBack(key, campaignid, userid, phonenumber);
}
catch (Exception e)
{
string msg = "unable to send the agent call back";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited sendAgentCallBack(string key, long campaignid, string userid, string phonenumber)");
}
}
This is the first step in an Agent login process. This function will initiate a phone call to the Agent and recite an agent id to them over the phone.
Parameters
Response
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:sendAgentCallBackWithMusicSetting
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>-4600</tnsa:campaignId>
<tnsa:userId>string</tnsa:userId>
<tnsa:phoneNumber>string</tnsa:phoneNumber>
<tnsa:musiconhold>string</tnsa:musiconhold>
</tnsa:sendAgentCallBackWithMusicSetting>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function sendAgentCallBackWithMusic_Setting($key,$campaignId,$userId,$phoneNumber,$musiconhold,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'userId' => $userId,
'phoneNumber' => $phoneNumber,
'musiconhold' => $musiconhold
);
try
{
$createUserRespopnse = $campaignOutboundClient->sendAgentCallBackWithMusicSetting($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void sendAgentCallBackWithMusicSetting(string key, long campaignid, string userid, string phonenumber, string musiconhold)
{
//LOG.Info("Entered sendAgentCallBackWithMusicSetting(string key, long campaignid, string userid, string phonenumber, string musiconhold)");
try
{
this.predictiveService.sendAgentCallBackWithMusicSetting(key, campaignid, userid, phonenumber, musiconhold);
}
catch (Exception e)
{
string msg = "unable to sendAgentCallBackWithMusicSetting";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited sendAgentCallBackWithMusicSetting(string key, long campaignid, string userid, string phonenumber, string musiconhold)");
}
}
Use this function when an agent is done with their call. This function will store the response and notes for the call and also puts the agent back into a queue to receive the next call. Once this function is called, use the getConnectionForAgent immediately after to get connection information of the call.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:storeAgentResponse xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignId>3957</tnsa:campaignId>
<tnsa:agentId>string</tnsa:agentId>
<tnsa:callId>string</tnsa:callId>
<tnsa:agentResponse>string</tnsa:agentResponse>
<tnsa:agentNotes>string</tnsa:agentNotes>
<tnsa:lastcall>true</tnsa:lastcall>
</tnsa:storeAgentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function storeAgentResponse($key,$campaignId,$agentId,$callId,$agentResponse,$agentNotes,$lastcall,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'agentId' => $agentId,
'callId' => $callId,
'agentResponse' => $agentResponse,
'agentNotes' => $agentNotes,
'lastcall' => $lastcall
);
try
{
$createUserRespopnse = $campaignOutboundClient->storeAgentResponse($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void storeAgentResponse(string key, long camapaignid, string agentid, string callid, string agentresponse, string agentnotes, Boolean lastcall)
{
//LOG.Info("Entered storeAgentResponse(string key, long camapaignid, string agentid, string callid, string agentresponse, string agentnotes, Boolean lastcall)");
try
{
this.predictiveService.storeAgentResponse(key, camapaignid, agentid, callid, agentresponse, agentnotes, lastcall);
}
catch (Exception e)
{
string msg = "unable to store the agent response";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("Exited storeAgentResponse(string key, long camapaignid, string agentid, string callid, string agentresponse, string agentnotes, Boolean lastcall)");
}
}
Use this function to update the call to agent ratio.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:updateRatio xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:campaignid>555135</tnsa:campaignid>
<tnsa:ratio>2</tnsa:ratio>
</tnsa:updateRatio>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function update_Ratio($key,$campaignId,$ratio,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/PredictiveService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createcampaign = array(
'key' => $key,
'campaignId' => $campaignId,
'ratio' => $ratio
);
try
{
$createUserRespopnse = $campaignOutboundClient->updateRatio($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void updateRatio(string key, long campaignid, double ratio)
{
//LOG.Info("Entered updateRatio(string key, long campaignid, double ratio)");
try
{
this.predictiveService.updateRatio(key, campaignid, ratio);
}
catch (Exception e)
{
string msg = "unable to update ratio";
LOG.Error(msg);
throw new PredictiveServiceException(msg, e);
}
finally
{
//LOG.Info("exited updateRatio(string key, long campaignid, double ratio)");
}
}
Here is a description of each of the column headers in the Individual Agent Session Statistics report in the Campaign Details page. You can get to this report in your CallFire account in My Campaigns by clicking on the campaign name and scrolling down to the bottom of the page.
| Category | Description |
|---|---|
| ID | Unique Agent ID code given at time of the Agent's login |
| Campaign ID | Unique six-digit number assigned to the Campaign |
| Phone Number | Agent's phone number used for login |
| User ID | Name or email of Agent that logged in |
| Logged In | Time Agent logged into the campaign |
| Logged Out | Time Agent logged out of the campaign |
| Calls | Number of calls Agent dialed |
| Duration | Total time in seconds Agent Logged in |
| Calls (Sec) | Total time Agent was on a connected call in seconds |
| Avg Call (Sec) | Avg duration of each call in seconds |
| Resp. Time | Total time Agent spent on Response entry |
| %Response | percentage of time Agent spent on Response entry |
