Basic Usage

1. Download

1. Download the Trackdrive PHP software development kit.

Download PHP SDK

2. Setup

Upload the library to your website.

1. Unzip trackdrive.zip

2. Upload trackdrive.php to your website using an FTP client.

3. Configure

1. Open lead-scheduler/example.php with your text editor.

2. On line 5 edit $schedule_lead_token and replace xyz with your token obtained from: https://trackdrive.net/schedules/

$schedule_lead_token = 'xyz';

3. Upload lead-scheduler/example.php to your website.

4. Usage

1. Browse to http://your-website.com/example.php

2. Fill in the forms:

3. Click Submit.

Advanced Usage

Functions

submit_scheduler_lead($schedule_lead_token, $caller_id, $options);

Submits a lead to a schedule.

Parameter Description
$schedule_lead_token

String Required

The token for the Schedule where you want leads sent. Get it from: https://trackdrive.net/schedules
$caller_id

String Required

The callerID for the lead. This is the number Trackdrive will dial when making outbound calls to the lead. This is also the number where Trackdrive will send SMS.
$options

Hash Optional

Optional additional settings.

Parameter Example
email

String

The email address for the lead. The lead's email is required for sending emails from schedules to leads.

expires_in

Integer

For how many seconds should the lead stay in our database before it is automatically deleted?

Leave this blank to set an infinite expiry. The default is to never delete leads.

data

Array

Trackdrive will convert this hash of JSON data into tokens.

Inbound and Outbound calls made and received from this Lead will automatically inherit these tokens.

For Example:

array('afid' => '90523', 'first_name' => 'John')

Example


	  <?php 

	require 'trackdrive-scheduler.php'

	// The token for the Schedule where you want leads submitted. 
	// Get it from: https://trackdrive.net/schedules/
	$schedule_lead_token = 'xyz';

	// The callerID for the lead.  
	// This is the number Trackdrive will dial when making outbound calls to the lead. 
	// This is also the number where Trackdrive will send SMS.
	$caller_id = '15004003000';

	// Optional additional settings.
	$options = array(
		// The email address for the lead.
		// The lead's email is required for sending emails from schedules to leads.
		'email' => 'example@domain.com',

		// For how many seconds should the lead stay in our database before it is automatically deleted? 
		// Leave this blank to set an infinite expiry. 
		// The default is to never delete leads.
		'expires_in' => 3600,

		// Trackdrive will convert this hash of data into tokens.
		// Inbound and Outbound calls made and received from this Lead will automatically inherit these tokens.
		'data' => array('afid' => '90523', 'first_name' => 'John')
	);

	submit_scheduler_lead($schedule_lead_token, $caller_id, $options);

			

submit_offer_lead($offer_lead_token, $caller_id, $options);

Submits a lead to an offer.