T
T
thisuser2019-04-26 14:00:45
Bitrix24
thisuser, 2019-04-26 14:00:45

How to add products to a lead during creation?

Based on the structure specified here: https://dev.1c-bitrix.ru/community/blogs/chaos/crm... I create a lead in Bitrix24 from a third-party site. The code is something like this to add in the end and it perfectly creates a lead:

$lead->add(array(
  'TITLE' => 'Лид с сайта', 
  'NAME' => 'Иван', 
  'LAST_NAME' => 'Иванов',
  'PHONE_WORK' => '+7 (999) 999-99-99',
  'EMAIL_WORK' => '[email protected]',
  'ASSIGNED_BY_ID' => 999,
  'STATUS_ID' => 'NEW',
));

The question is how to add products to this lead? Products in Bitrix24 and on the site are linked by a foreign key. But I don’t find at all in the documentation what kind of array to eventually form and transfer along with what I have above?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dies Irae, 2019-04-26
@thisuser

Adding products to a lead: https://dev.1c-bitrix.ru/rest_help/crm/leads/crm_l...
Creating products: https://dev.1c-bitrix.ru/rest_help/crm/products/cr. ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question