我需要使用Zoho CRM API来插入潜在客户,而不是手动填写潜在客户表单。当我尝试插入潜在客户时,它会返回"Record(s) added successfully"
。我在CRM下搜索 - >为我的记录提供标签。但是,我无法找到我在所有公开信息下插入的记录。但CRM API使用我的电子邮件ID显示API调用次数。
$xmlData='<Lead><FirstName>'.$name.'</FirstName>'
.'<LeadOwner>muthukumari.bsolu@gmail.com</LeadOwner>'
.'<Phone>'.$phone.'</Phone>'
.'<Email>'.$useremail.'</Email>'
.'<Country>'.$country.'</Country>'
.'<LeadSource>'.$mode.'</LeadSource>'
. '<Description>'.$msg.'</Description></Lead>';
$ch = curl_init('https://crm.zoho.com/crm/private/xml/Leads/insertRecords?');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$query = "newFormat=1&authtoken={$authtoken}&scope=crmapi&xmlData={$xmlData}";
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
$response = curl_exec($ch);
curl_close($ch);
print_r($response);