WT Amo CRM library

WT Amo CRM library

Downloads 6148 Hits 5340 CTR 115% Pack Free

A small PHP library for Joomla 4 / Joomla 5 / Joomla 6 and Amo CRM. For developers. AmoCRM as known as Kommo CRM (https://www.kommo.com/)

WT Amo CRM library

Description

The package is a set of extensions for convenient use with the amoCRM REST API in Joomla. The library does not require the installation of any additional software packages (dependencies), and uses only the Joomla API. The library code is documented and IDEs (professional development environments) will show hints on the codebase.

This library in its pure form will most likely be of interest only to professional developers and integrators.

The package includes:

  • Joomla and amoCRM integration Library: WT Amo CRM Library
  • plugin for storing settings for connecting to amoCRM: System - WT Amo CRM Library
  • plugin for syncing data between amoCRM contacts and Joomla users: User - WT AmoCRM user synс.
  • plugin for the Joomla CLI (server console commands) for adding commands to the Joomla CLI: Console - WT import amoCRM contacts.

Library authorization in the amoCRM REST API

The plugin is used to store authorization data in amoCRMThe system is the WT Amo CRM Library. In it, you specify the domain, secret key, token, integration ID, etc. The library receives data from the plugin parameters. Both regular and long-lived (long-term) tokens are supported. 

Deleting the old refresh token

If you use regular tokens rather than long-term ones, then Amo CRM issues an access token for one day. A refresh token is used to receive a new token. The Refresh token is valid for only 3 months. If the integration has not been used for 3 months and there has not been a single request to update the key, the integration will lose access to the data and we will need to recreate and configure the integration.

To simplify this process, a button has been added to the plugin parameters to delete the old refresh token from the database. If the refresh token is in the database, the date of its receipt is displayed.

You should use this button only if your refresh token has expired and you need to delete it from the library settings.

Connecting the library to your Joomla extension

use Webtolk\Amocrm\Amocrm;

$amocrm = new Amocrm();
$accountData = $amocrm->account()->getAccountInfo();
// Joomla uses a Symfony vardumper
dump($accountData);

List of amoCRM entities to work with from Joomla

The PHP classes of supported entities are located in the src/Entities folder.

  1. \Webtolk\Amocrm\Entities\Account $amocrm->account() - getting account information
  2. \Webtolk\Amocrm\Entities\Contacts $amocrm->contacts() - working with the amoCRM contact entity
  3. \Webtolk\Amocrm\Entities\Customfields $amocrm->customfields() - working with custom fields of amoCRM entities
  4. \Webtolk\Amocrm\Entities\Leads $amocrm->leads() - working with the essence of amoCRM transactions
  5. \Webtolk\Amocrm\Entities\Notes $amocrm-notes() - working with notes on amoCRM entities
  6. \Webtolk\Amocrm\Entities\Tags $amocrm-tags() - working with the essence of amoCRM tags
  7. \Webtolk\Amocrm\Entities\Users $amocrm->users() - working with the essence of amoCRM users
  8. \Webtolk\Amocrm\Entities\Webhooks $amocrm->webhooks() - working with amoCRM webhooks

Synchronization of Joomla and amoCRM users. Two-way integration.

Plugin User - WT amoCRM user sync in the library package allows both creating new contacts in amoCRM when creating/registering users in Joomla, and creating Joomla users when creating amoCRM contacts. It is possible to update information in one system when data changes in another. Settings for matching Joomla and amoCRM fields. Data can also be stored in the params property of the user object ($user->params). The field mapping is configured in the plugin parameters.

CLI plugin for importing Joomla users from amoCRM contacts.

amoCRM has data export in CSV format. However, perhaps due to the large number of different integrations, the data is not always exported correctly. In order to avoid problems with data structure violations, it was decided to import data more slowly directly via the REST API. The commands to execute in the server console can be found in the plugin parameters of the console group.

Processing incoming amoCRM webhooks in Joomla.

The system plugin adds a single entry point for webhooks from amoCRM. In the future, information from the webhook is transmitted to the plug-ins of the system, user and amocrm groups, which are triggered by the onAmocrmIncomingWebhook event. You can create your own plugin that will listen to this event and process data or perform certain actions on the Joomla side during events in amoCRM.

A collection of Joomla Form fields with data from amoCRM for developers.

A collection of Joomla Form fields has been created for use in Joomla extensions. These fields are used in the plugins of the library itself, but developers can use ready-made fields in third-party extensions. The field classes are located in the src/Fields folder of the library. For the field to work correctly, you must specify the addfieldprefix attribute with the library namespace in the XML manifest of your extension (plugin, module, component).

<field addfieldprefix="Webtolk\Amocrm\Fields"
                       type="accountinfo"
                       name="accountinfo"/>

The list of fields at the moment:

  • Accountinfo - field with information about the amoCRM account
  • Companiestagslist - drop-down list of amoCRM company tags
  • Companycustomfieldslist - drop-down list of custom fields of amoCRM companies
  • Contactcustomfieldslist - drop-down list of custom amoCRM contact fields
  • Contactinfo - contact information and link to it in amoCRM
  • Contactstagslist- drop-down list of amoCRM contact tags
  • Entitymodalselect is a modal (pop-up) window for selecting the entity id: transaction or contact.
  • Leadcustomfieldslist - drop-down list of custom amoCRM transaction fields
  • Leadspipelineslist- drop-down list of amoCRM funnels
  • Leadstagslist - drop-down list of amoCRM transaction tags
  • Webhookslist - information about amoCRM account webhooks and their limitations.

 

Joomla

Extension type:
Package
Package composition:
Library, Plugin
Joomla version:
4.1, 4.2, 4.3.4, 5.0.0, 6.0.0

What's new

Fixed

Bug fixes

Fixed an error updating amoCRM contact fields when saving a user through a frontend form.

Related extensions

WebTolk Joomla Extensions

96 Extensions
12 Categories
484 Versions released
542474 Downloads
Cart
Cart is empty