crmIntegration
The crmIntegration reply type is used with the Bitrix24 CRM.
Properties
channelType— for the Bitrix24 CRM, specify"BITRIX".task— specify the event type for the CRM, possible values:LEAD_CREATION— create a lead;DEAL_CREATION— create a deal;DEAL_UPDATE— update a deal.
parameters— additional parameters for processing. A parameter is specified in the"fields[parameter_name]": "value"format.
If the event is a success, event: CRM_SUCCESS_EVENT is returned to the script, otherwise event: CRM_FAILED_EVENT
Channel restrictions
crmIntegration is not supported in the chat widget and edna.chatCenter.
How to use
Deal update script:
state: Update deal
q!: update deal
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Updated deal name"
};
$response.replies = $response.replies || [];
$response.replies.push(reply);
state: CRM_SUCCESS_EVENT
event: CRM_SUCCESS_EVENT
script:
$reactions.transition("/next_step");
state: CRM_FAILED_EVENT
event: CRM_FAILED_EVENT
script:
$reactions.transition("/problem_resolution");