This service provides you with the ability to schedule your campaigns and also download the campaign statistics.

WSDL

https://www.callfire.com/service/SchedulerService?wsdl

Methods

deleteCampaignSchedule

Use this function to to unschedule a previously scheduled campaign.

Parameters

Parameter name Required Description
key Y This is the key that you were provided when you registered with callfire.com. You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings".
scheduleId Y This is the id of the campaign which you want to unschedule.

Example Request

<?xml version="1.0" encoding="utf-8"?>

  
    
      string
      -3612
    
  

Sample PHP Code

public function deleteCampaignSchedule($api_key,$scid,$debug)
{
	$createOtboundcampaignWsdl = 'http://www.callfire.com/service/SchedulerService?wsdl';
	$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
	$delcampaign = array(
  		'key' => $api_key,
  		'scheduleId' => $scid
	);
	try
	{
		$deleteCampaignScheduleResponse = $campaignOutboundClient->deleteCampaignSchedule($delcampaign);
		if($debug)
		{
			echo "Campaign Unscheduled.";
		}
	}
	catch(SoapFault $error)
	{
		if($debug)
		{
			echo $error."
";
		}
	}
}

Sample C# Code

public void deleteCampaignSchedule(string key,long scheduleId)
{
    //LOG.Info("Entered deleteCampaignSchedule(string key,long scheduleId)");
    try
    {
        this.schedulerService.deleteCampaignSchedule(key, scheduleId);
    }
    catch (Exception e)
    {
        string msg = "Unable to deleteCampaignSchedule";
        LOG.Error(msg);
        throw new SchedulerServiceException(msg, e);
    }
    finally
    {
        //LOG.Info("Exited deleteCampaignSchedule(string key,long scheduleId)");
    }
}

getNewCampaignSchedule

Use this function to get the details/(campaign schedule details) of a newly created campaign.

Parameter name Required Description
key Y This is the key that you were provided when you registered with callfire.com. You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings".
campaignid Y This is the campaign id for which you want to get the schedule.

Example Request

<?xml version="1.0" encoding="utf-8"?>

  
    
      string
      -1673
    
  

Sample PHP Code

public function getNewCampaignSchedule($api_key,$campaignId,$debug)
{
	$createOtboundcampaignWsdl = 'http://www.callfire.com/service/SchedulerService?wsdl';
	$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
	$createcampaign = array(
  		'key' => $api_key,
  		'campaignid' => $campaignId
	);
	try
	{
		$getNewCampaignScheduleResponse = $campaignOutboundClient->getNewCampaignSchedule($createcampaign);
		$schedule = $getNewCampaignScheduleResponse->out;
		if($debug)
		{
			echo "<table border=1><tr><td>campaign</td><td>id</td><td>job</td><td>often</td><td>startDayOfWeekGMT</td><td>startDayOfYear</td><td>startHourGMT</td><td>startMinuteGMT</td><td>startYear</td><td>startYet</td><td>stopDayOfYear</td><td>stopYear</td><td>stopYet</td><td>timezone</td><td>userEnteredStartDay</td><td>userEnteredStartTime</td><td>userEnteredStopTime</td><td>userId</td></tr>";
			foreach($schedule->NewCampaignScheduleType as $line)
			{
				echo "<tr>";
				echo "<td>" . $line->campaign . "</td>";
				echo "<td>" . $line->id . "</td>";
				echo "<td>" . $line->job . "</td>";
				echo "<td>" . $line->often . "</td>";
				echo "<td>" . $line->startDayOfWeekGMT . "</td>";
				echo "<td>" . $line->startDayOfYear . "</td>";
				echo "<td>" . $line->startHourGMT . "</td>";
				echo "<td>" . $line->startMinuteGMT . "</td>";
				echo "<td>" . $line->startYear . "</td>";
				echo "<td>" . $line->startYet . "</td>";
				echo "<td>" . $line->stopDayOfYear . "</td>";
				echo "<td>" . $line->stopYear . "</td>";
				echo "<td>" . $line->stopYet . "</td>";
				echo "<td>" . $line->timezone . "</td>";
				echo "<td>" . $line->userEnteredStartDay . "</td>";
				echo "<td>" . $line->userEnteredStartTime . "</td>";
				echo "<td>" . $line->userEnteredStopTime . "</td>";
				echo "<td>" . $line->userId . "</td>";
				echo "</tr>";
			}
			echo "</table>";
			//print_r($schedule);
		}
	}
	catch(SoapFault $error)
	{
		if($debug)
		{
			echo $error."
";
		}
	}
}

Sample C# Code

public NewCampaignScheduleType[] getNewCampaignSchedule(string key, long campaignid)
{
    //LOG.Info("Entered NewCampaignScheduleType getNewCampaignSchedule(string key, long campaignid)");
    try
    {
        NewCampaignScheduleType[] campaignSchedule = this.schedulerService.getNewCampaignSchedule(key,campaignid);
        return campaignSchedule;
    }
    catch (Exception e)
    {
        string msg = "Unable to getNewCampaignSchedule";
        LOG.Error(msg);
        throw new SchedulerServiceException(msg, e);
    }
    finally
    {
        //LOG.Info("Exited NewCampaignScheduleType getNewCampaignSchedule(string key, long campaignid)");
    }
}

scheduleCampaignWithDateStrings

Use this function to schedule a campaign on a particular date & time.

Parameter name Required Description
key Y This is the key that you were provided when you registered with callfire.com. You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings".
campid Y This is id of the campaign which you want to schedule
startDateTimeString Y This is date & time when you want to start the campaign. (eg. 2010-06-03 15:37:18)
stopDateTimeString Y This is the date & time when you want to stop the campaign. (eg. 2010-06-03 15:39:18)
timezone Y Enter the timezone (eg. PST)

Time zone strings can be "HST", "AKST", "PST", "MST", "CST", "EST", "AST"

The date strings should be in the format: yyyy-MM-dd HH:mm:ss

HH is military hours, timezone is seperate, and if you wish to not have a stopTime then leave it an empty string or null.

Example Request

<?xml version="1.0" encoding="utf-8"?>

  
    
      string
      6919
      2009-04-15 18:00:00
      
      2009-04-15 21:00:00
      
      PST
    
  

Sample PHP Code

public function scheduleCampaignWithDateStrings($api_key, $campid, $startDateTimestring, $stopDateTimestring, $timezone, $debug)
{
	$createOtboundcampaignWsdl = 'http://www.callfire.com/service/SchedulerService?wsdl';
	$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
	$schedulecampaignParams = array(
  		'key' => $api_key,
  		'campid' => $campid,
	'startDateTimeString' => $startDateTimestring,
	'stopDateTimeString' => $stopDateTimestring,
	'timezone' => $timezone
	);
	try
	{
		$schedulecampaignResponse = $campaignOutboundClient->scheduleCampaignWithDateStrings($schedulecampaignParams);
		$scheduleid = $schedulecampaignResponse->out;
		if($debug)
		{
			echo "Schedule ID :: ".$scheduleid;
		}
	}
	catch(SoapFault $error)
	{
		if($debug)
		{
			echo $error."
";
		}
	}
}

Sample C# Code

public long scheduleCampaignWithDateStrings(string key,long campid,string startDateTimeString,string stopDateTimeString,string timezone)
{
    //LOG.Info("Entered scheduleCampaignWithDateStrings(string key,long campid,string startDateTimeString,string stopDateTimeString,string timezone)");
    try
    {
        long campaignId = this.schedulerService.scheduleCampaignWithDateStrings(key, campid, startDateTimeString, stopDateTimeString, timezone);
        return campaignId;
    }
    catch (Exception e)
    {
        string msg = "Unable to scheduleCampaignWithDateStrings";
        LOG.Error(msg);
        throw new SchedulerServiceException(msg, e);
    }
    finally
    {
        //LOG.Info("Exited scheduleCampaignWithDateStrings(string key,long campid,string startDateTimeString,string stopDateTimeString,string timezone)");
    }
}