L
L
lexstile2022-03-18 00:09:15
Bitrix24
lexstile, 2022-03-18 00:09:15

How to map parameters in CRM when integrating via inbound webhook?

There is a link behind calling the hook:

bitrix.site.ru/rest/107/dklsaubnbfsdfsfanh3a/crm.lead.add.json?NAME=111111&PHONE=1111111111111

An empty lead is being added, how can I make sure that the data is added to the corresponding fields?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2022-03-20
@lexstile

An empty lead is being added, how can I make sure that the data is added to the corresponding fields?

The documentation ( https://dev.1c-bitrix.ru/rest_help/crm/leads/crm_l... ) says that the crm.lead.add method takes 2 parameters: fields and params.
You are NOT passing these parameters, but you are passing NAME and PHONE parameters.
From here we can say that your query should look like this:
bitrix.site.ru/rest/107/dklsaubnbfsdfsfanh3a/crm.lead.add.json?fields[NAME]=111111&fields[PHONE]=1111111111111
However, I do not recommend passing parameters directly to the query string and use the payload part of your request instead.
How to use it?
1. Do not GET, but POST requests
2. Pass application/json in the Content-type header
3. Pass json in the payload part.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question