Documentation

imopenlines.crm.lead.create

Scope: imopenlines Permissions: for all

This method creates a lead for CRM.

Parameters

ParameterExampleRequiredDescription
CHAT_ID1987YesChat ID.

Method call and response

JavaScript

BX.callMethod(
	'imopenlines.crm.lead.create',
	{
		CHAT_ID: 1988
	},
	function(result)
	{
		if(result.error())
		{
			console.error(result.error().ex);
		}
		else
		{
			console.log(result.data());
		}
);

Response example:

true

Possible error codes

CodeDescription
ACCESS_DENIEDCurrent user doesn't have access to the specified chat.
CHAT_TYPESpecified chat isn't an Open Channel.
CHAT_IDChat ID is incorrect.


© «Bitrix24», 2001-2024