我在Marketo中有匿名潛在客戶,我需要通過REST API將其與已知潛在客戶合併。使用Marketo REST API合併匿名潛在客戶與已知潛在客戶
我想下面的代碼
public function postData() {
$url = $this->host . "/rest/v1/leads/" . $this->id ."/merge.json?access_token=" . $this->getToken() . "&leadIds=" . $this::csvString($this->leadIds);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
}
它與{"requestId":"1af7#fgfdhgfdgfgdfg","success":false,"errors":[{"code":"1004","message":"Lead '231325' not found"}]}
迴應,但我可以看到領先的ID中的Marketo 。
您能否請建議我如何合併匿名潛在客戶與已知潛在客戶?
感謝
@RohitGoel您是否設法合併您的潛在客戶? – dferenc