Used to initiate a phone call between one phone number and any one number from a predefined list of phone numbers.
Use the Click-to-FindMe API to initiate a phone call with a click of a mouse.
The Click-to-FindMe API is used to initiate a phone call between one phone number and any one number from a predefined list of phone numbers defined in an existing FindMe within a DialogTech account. The order in which the numbers are called -- either the predefined list first, or the 3rd party first -- can be modified.
If the list of numbers/agents is not static and can change call to call, our Click-to-FindMe List API would be a better option.
Base URL for Click-to-FindMe
Parameter List
Parameter | Required | Accepts | Max Length | Notes | Usage |
---|---|---|---|---|---|
access_key | Yes* (See Notes) | String | n/a | Access Key from the Key Manager within a DialogTech account | Credentials used for access to the API for a particular DialogTech account |
secret_access_key | Yes* (See Notes) | String | n/a | Secret Access Key from the Key Manager within a DialogTech account | Credentials used for access to the API for a particular DialogTech account |
action | Yes | String: clickto.findme | n/a | Only accepts clickto.findme for Click-to-FindMe | Defines the API call as a "Click-to-FindMe" type |
findme_id | Yes | String: Existing FindMe ID | n/a | An existing FindMe ID must be utilized. To find IDs for any existing FindMe within your account, enter the menu Developer Tools -> Building Block IDs | Determines which pre-defined list of numbers will be attempted to join any one number from that group, to the phone_to_call third party. |
phone_to_call | Yes | String: Unformatted Phone Number | n/a | Can be any unformatted phone number | Defines the third party being joined to the pre-defined list of numbers in a Click-to-FindMe |
first_callerid | No | String: Unformatted Phone Number | n/a | Must be a registered number or a tracking number within the DialogTech account. | Defines the Caller ID utilized on the first leg of the call |
second_callerid | No | String: Unformatted Phone Number | n/a | Must be a registered number or a tracking number within the DialogTech account. | Defines the Caller ID utilized on the second leg of the call |
type | No | String: 1 or 2 | n/a | 1 - Call phone_to_call first (default) 2 - Call the FindMe first | Determines the order in which the various numbers are dialed |
page | No | String | 255 | Will be stored in the Smart Click-to-Call Report | Defines the "page" the Click-to-FindMe originated from. |
no_answer_email | No | String: Email Address | n/a | Only available when type=2 | Define an email address to send an email to if no one on the phone list accepts the call. This email will include the phone_to_call along with the outcome of each attempt to the phone numbers on the list. |
no_answer_sms | No | String: Unformatted Phone Number | n/a | Only available when type=2 | Define a phone number to receive an SMS message if no one on the phone list accepts the call. The text will say that the call was unsuccessful along with the phone_to_call. You must have at least one phone number registered for SMS to utilize this feature. |
no_answer_url | No | String: URL | n/a | Only available when type=2 | Define a URL to post XML data to if no one on the phone list accepts the call. This data will include the phone_to_call along with the outcome of each attempt of the phone numbers on the list. |
no_answer_phone | No | String: Unformatted Phone Number | n/a | Only available when type=2 | Define a phone number to do a blind transfer of the call to if no one on the phone list accepts the call. |
Using this API
These code examples are meant to show a basic method of accessing DialogTech's click-to-FindMe API.
<?php
/*
Click-to-FindMe:
This example will use access_key and secret_access_key
for a Reverse FindMe -- This means we'll be calling
the predefined list of numbers first, then the third
party.
*/
// create curl resource
$ch = curl_init();
$baseuri = "https://secure.dialogtech.com/ibp_api.php?";
// API Specific Static Parameters
$action = "clickto.findme";
// Required User Parameters
$access_key = "foo";
$secret_access_key = "bar";
$type = "2";
$findme_id = "98765";
$phone_to_call = "5551112222";
$page = "LeadResponse.html";
$first_callerid = "9998887777"; // Will display as the Caller ID for the predefined list recipient as type=2
$second_callerid = "8887776666"; // Will display as the Caller ID for the phone_to_call as type=2
$no_answer_email = "[email protected]";
$no_answer_sms = "5554443333";
$no_answer_url = "https://test.com/no_answer_listener.php";
// Construct the full URL
$full_url = $baseuri . "&action=" . $action .
"&access_key=" . $access_key .
"&secret_access_key=" . $secret_access_key .
"&type=" . $type .
"&findme_id=" . $findme_id .
"&phone_to_call=" . $phone_to_call .
"&page=" . $page .
"&first_callerid=" . $first_callerid .
"&second_callerid=" . $second_callerid .
"&no_answer_email=" . $no_answer_email .
"&no_answer_sms=" . $no_answer_sms .
"&no_answer_url=" . $no_answer_url;
// Set the URL
curl_setopt($ch, CURLOPT_URL, $full_url);
// Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Sets the $output variable to the result of the curl
$output = curl_exec($ch);
// Close curl resource to free up system resources
curl_close($ch);
// Send the API output to the php page
echo "API response is: " . $output;
?>
<?php
/*
Click-to-FindMe:
This example will use access_key and secret_access_key
for a normal Click-to-FindMe -- This means we'll be calling
the a third party first, then the predefined list of
numbers second. Using access_key and secret_access_key means
'key' is not required.
*/
// create curl resource
$ch = curl_init();
$baseuri = "https://secure.dialogtech.com/click_to_xyz.php?";
// API Specific Static Parameters
$action = "clickto.findme";
// Required User Parameters
$access_key = "foo";
$secret_access_key = "bar";
$type = "1";
$findme_id = "98765";
$phone_to_call = "5551112222";
$page = "LeadResponse.html";
$first_callerid = "9998887777"; // Will display as the Caller ID for the 'phone_to_call` as type=1
$second_callerid = "8887776666"; // Will display as the Caller ID for the predefined-list as type=1
// Construct the full URL
$full_url = $baseuri . "&action=" . $action .
"&access_key=" . $access_key .
"&secret_access_key=" . $secret_access_key .
"&type=" . $type .
"&findme_id=" . $findme_id .
"&phone_to_call=" . $phone_to_call .
"&page=" . $page .
"&first_callerid=" . $first_callerid .
"&second_callerid=" . $second_callerid;
// Set the URL
curl_setopt($ch, CURLOPT_URL, $full_url);
// Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Sets the $output variable to the result of the curl
$output = curl_exec($ch);
// Close curl resource to free up system resources
curl_close($ch);
// Send the API output to the php page
echo $output;
?>
Example Response
Call Connected
Requeset Processed
No Answer Email/SMS/URL Examples
These examples were generated by PHP Example 1 above. FindMe 98765 has one agent with phone number (555) 868-8950 who did not answer their phone. (555) 758-5902 is also an SMS-enabled number within the DialogTech account used.
To: [email protected]
From: [email protected]
Subject: LeadResponse unsuccessful for (555) 111-2222
Attempts to connect an agent to (555) 111-2222 were unsuccessful, with the following activity breakdown:
(555) 868-8950 No Answer
To: (555) 444-3333
From: (555) 758-5902
Message: LeadResponse unsuccessful for (555) 111-2222
<?xml version="1.0" encoding="UTF-8"?>
<response>
<phone_to_call>5551112222</phone_to_call>
<attempts>
<attempt>
<called_number>5558688950</called_number>
<call_result>No Answer</call_result>
</attempt>
</attempts>
</response>
*URL was delivered as POST Payload to the no_answer_url defined in the API call.