G
G
godfathernn2019-12-16 18:30:24
API
godfathernn, 2019-12-16 18:30:24

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 question

Ask a Question

731 491 924 answers to any question