2017 © Pedro Peláez
 

library bitrix24

VolumNet Bitrix24 Webhooks implementation

image

volumnet/bitrix24

VolumNet Bitrix24 Webhooks implementation

  • Monday, January 29, 2018
  • by volumnet
  • Repository
  • 2 Watchers
  • 1 Stars
  • 41 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

VolumNet implementation of Bitrix24 webhooks and quick leads

Installation

composer require volumnet/bitrix24

Usage — for QuickLeads

/**
 * @param string $domain Domain name, including protocol (i.e. https://domain.bitrix24.ru)
 * @param string $login Login name
 * @param string $password Password
 */
$ql = new QuickLead('https://domain.bitrix24.ru', 'login', 'password');

/**
 * Send data to quick lead creation
 * @param array $data Data in the following format: https://dev.1c-bitrix.ru/community/blogs/chaos/crm-sozdanie-lidov-iz-drugikh-servisov.php
 * @return mixed Response
 * @throws Exception exception with error code and message from remote url
 */
$ql->send(array(
    'TITLE' => 'Test lead',
    'COMPANY_TITLE' => 'Test company',
    'NAME' => 'User',
    'LAST_NAME' => 'Test',
    'SECOND_NAME' => date('Hi'),
    'ADDRESS' => 'Test address',
    'PHONE_WORK' => '+7 999 000-00-00',
    'EMAIL_WORK' => 'test@test.org',
));

More docs here: https://dev.1c-bitrix.ru/community/blogs/chaos/crm-sozdanie-lidov-iz-drugikh-servisov.php, (*1)

Usage — for Webhooks

/**
 * @param string $domain Domain name, including protocol (i.e. https://domain.bitrix24.ru)
 * @param string $webhook Webhook ID
 */
$wh = new Webhook('http://domain.bitrix24.ru', '0123456789abcdef'); 

/**
 * Calls certain method
 * @param string $methodName Method name, without transport extension (i.e. .xml or .json)
 * @param array $data Method data
 * @return mixed Parsed data from method
 * @throws Exception Exception with error response from the method
 */ 
$wh->method('crm.lead.add', array(
    'fields' => array(
        'TITLE' => 'Test lead',
        'COMPANY_TITLE' => 'Test company',
        'NAME' => 'User',
        'LAST_NAME' => 'Test',
        'SECOND_NAME' => date('Hi'),
        'ADDRESS' => 'Test address',
        'SOURCE_ID' => 'WEB',
        'PHONE' => array(
            array(
                'VALUE' => '+7 999 000-00-00',
                'VALUE_TYPE' => 'WORK'
            )
        ),
        'EMAIL' => array(
            array(
                'VALUE' => 'test@test.org',
                'VALUE_TYPE' => 'WORK'
            )
        )
    )
)); 

More docs here: https://dev.1c-bitrix.ru/rest_help/index.php, (*2)

The Versions

29/01 2018

dev-master

9999999-dev

VolumNet Bitrix24 Webhooks implementation

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Alex V. Surnin

29/01 2018

1.0.3

1.0.3.0

VolumNet Bitrix24 Webhooks implementation

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Alex V. Surnin

29/01 2018

1.0.1

1.0.1.0

VolumNet Bitrix24 Webhooks implementation

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Alex V. Surnin

08/01 2018

1.0.0

1.0.0.0

VolumNet Bitrix24 Webhooks implementation

  Sources   Download

GPL v3

The Requires

 

The Development Requires

by Alex V. Surnin