L
L
lucsieus2021-03-04 11:35:33
Bitrix24
lucsieus, 2021-03-04 11:35:33

How to form a new deal through an incoming webhook into a specific funnel?

There is a working incoming webhook and forms a deal in the zero funnel. How to determine the funnel ID?

Here is the function.

function addDeal($contact) {
        $dealData = $this-> sendDataToBitrix('crm.deal.add', [
            'fields' => [
                'TITLE' => 'Заказы с телеграмм бота Наша пицца. Заказ №'.$contact['ID'],
                'OPPORTUNITY' => $contact['OPPORTUNITY'],
                'UF_CRM_1611636092550' => $contact['UF_CRM_1611636092550'],
                'UF_CRM_1611636752001' => $contact['UF_CRM_1611636752001'],
                'STAGE_ID' => 'C12',
                'CONTACT_ID' => $contact['CONTACT_ID'],
            ], 'params' => [
                'REGISTER_SONET_EVENT' => 'Y'
            ]
        ]);

        return $dealData['result'];
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lucsieus, 2021-03-04
@lucsieus

I found the solution to all that instead of 'STAGE_ID' you need to write 'CATEGORY_ID' => '12' (this ID can be found in the transaction URL).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question