Lead Source API is a tool that we have developed to help integration between SalesCandy with many sources, such as; Website, Google Form, etc.
Our Lead Source API allows SalesCandy to receive pushed leads on demand from any custom source like a CRM, website server, etc. A CRM can push potential upsells into SalesCandy to increase lifetime revenue per customer.
How to create the Lead Source API?
1. Login to SalesCandy Manager Portal
2. Go to Management and click on Lead Source
3. Click on the '+' on the top right
4. Select Lead Source API
5. Fill up the mandatory fields,
- Lead Source Name - Fill in with the respective Webpage/Landing Page/Microsite name. (E.g: SalesCandy Microsite API)
- Lead Score - Set the lead score from 0-100 (0 = lowest priorities; 100 = highest priorities)
- Delay Routing (seconds) - The delay routing should be always 0 in order to make sure the lead coming in realtime to your available salesperson unless you would like to delay the lead to be routed to the salesperson.
- Default country for phone number - Set the country code for the leads based on campaign listing.
- Choose projects
❏ Single project;
The leads will be accumulated and only routed to the selected project.
❏ Single form multiple projects;
The leads will be accumulated and routed to multiple projects.
▷ Fill in Field Name - the field that the project name is mentioned
▷ Fill In Delimiter.
▷ Fill In Project Mapping - to what project in SalesCandy the lead will route
- Field mapping method -
- Automatic method: You can choose an automatic mapping method if you want to set up the mapping at the end of the integration or you don't have a fixed field.
- Manual method: You can choose manual mapping if you have a fixed field to be mapped in the beginning
- Pause routing - Only tick this checkbox if you wish to accumulate the leads and do not want to route the leads.
6. Click Next
7. Send your data to API details to SalesCandy POST URL provided here
This is a sample of code on implementing Lead Source API with PHP, JavaScript, and Curl.
PHP:
$url = "https://api.dev.salescandy.com/LeadSource/api/v2/catcher";
$data = ["name" => "SalesCandy","projectSuccess" => "apple","phone" => "0123456789","email" => "test@salescandy.com"];
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Content-Type:application/json','x-api-key:936b4763-29bc9732-1610673694476'));
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
//execute post
$result = curl_exec($ch);
echo $result;
Javascript:
var urlpost = "https://api.dev.salescandy.com/LeadSource/api/v2/catcher";
var postdata = {"name" : "SalesCandy","projectSuccess" : "apple","phone" : "0123456789","email" : "test@salescandy.com"};
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (this.status == 200) {
// get response data
console.log(this.responseText);
}
};
xhr.open("POST", urlpost, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('x-api-key', '936b4763-29bc9732-1610673694476');
xhr.send(JSON.stringify(postdata));
CURL:
curl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: 936b4763-29bc9732-1610673694476" \
-d '{"name" : "SalesCandy","projectSuccess" : "apple","phone" : "0123456789","email" : "test@salescandy.com"}' \
https://api.dev.salescandy.com/LeadSource/api/v2/catcher
8. Once you are able to view the data, click next
9. The mapped fields will appear for you to assign the input fields accordingly and click 'Save'.
10. Your website or landing page is now mapped and integrated with SalesCandy to capture the leads accordingly.
Comments
0 comments
Please sign in to leave a comment.