I
I
Ivan Dobroslavin2015-03-17 10:59:51
API
Ivan Dobroslavin, 2015-03-17 10:59:51

How to link a contact and a deal in amoCRM?

I use the documentation
https://developers.amocrm.ru/rest_api/leads_set.php
https://developers.amocrm.ru/rest_api/contacts_lin...
(I don’t understand how to implement it)
Now I have: when sending from the site, a Contact is automatically created , Task and Deal. The Task is associated with a Contact, but the Deal is not associated with a Contact. How to link the latter?
**** 'element_id' => $contact_id - associates a task with a contact; for the transaction, this option does not work.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pkr95, 2015-07-26
@pkr95

We first create a deal and then we create a contact.
It turns out that we link transactions to a contact, and not vice versa.
linked_leads_id - list with IDs of the contact's deals
https://developers.amocrm.ru/rest_api/contacts_set.php

D
Daniel, 2017-03-08
@DeveloperKZ

If you do everything as in the manual, but the linking does not work, try adding (int) to the 'linked_leads_id' parameter before the value, in the file contact_add.php
fde63c5d6c2143669eb346b3a1e495c7.png

P
Pavel Bondarev, 2016-10-30
@JoUki

I needed to create deals and link to an existing company, I took a request from the admin panel:

POST /ajax/leads/multiple/add/
ACTION: ADD_DEAL_FROM_CONTACTS
new_deal[0][name]: Название сделки
new_deal[0][status]: ID статуса сделки
new_deal[0][pipeline_id]: ID воронки
new_deal[0][main_contact]: ID компании
new_deal[0][element_type]: 3
new_deal[0][price]: Сумма сделки

The main thing is to add a title
X-Requested-With: XMLHttpRequest

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question