Answer the question
In order to leave comments, you need to log in
How to check for duplicates in amocrm?
Hello!
Can you please tell me how to check for duplicates in amocrm by phone number before creating a new deal? I'm using the dotzero client: https://github.com/dotzero/amocrm-php
Trying this but it doesn't work:
$searchContactPhone = $_POST['phoneInput'];
$existsContact = $amo->contact->apiList([
'query' => $searchContactPhone,
'limit_rows' => 1
]);
if ($existsContact == $searchContactPhone) {
$contact = $amo->contact;
$contact['phone'] = $searchContactPhone;
$contact->apiUpdate((int)$id, 'now');
$contact->addCustomField(245689, $searchContactPhone, 'WORK');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question