Megaplan CRM Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Megaplan CRM Integration with Website

Megaplan is a Russian CRM and task management system, popular in small and medium business. Integration allows automatic deal and lead creation from website requests, contact synchronization, and receiving notifications about CRM changes.

Megaplan API

Megaplan provides REST API. Authentication via Bearer token obtained by exchanging login/password or via API key in account settings.

GET https://your-domain.megaplan.ru/api/v3/deal/list
Authorization: Bearer {access_token}

Creating Deal from Request

$response = Http::withToken($this->getToken())
    ->post("https://{$this->domain}.megaplan.ru/api/v3/deal/create", [
        'data' => [
            'contentType' => 'Deal',
            'name'        => "Request from website: {$request->subject}",
            'programId'   => ['contentType' => 'DealProgram', 'id' => $this->pipelineId],
            'responsible' => ['contentType' => 'Employee', 'id' => $this->defaultManagerId],
            'contractor'  => ['contentType' => 'Client', 'id' => $contactId],
            'extraFields' => [
                'Cf12345' => $request->message,  // custom field
            ]
        ]
    ]);

Finding or Creating Contact

Before creating deal, need to find contact by email or phone:

// Search for existing contact
$search = Http::withToken($this->getToken())
    ->post("https://{$this->domain}.megaplan.ru/api/v3/contractor/list", [
        'data' => [
            'contentType' => 'ContractorFilter',
            'email' => $request->email
        ]
    ]);

if ($search['data']['meta']['totalCount'] > 0) {
    $contactId = $search['data']['list'][0]['id'];
} else {
    // Create new
    $contact = Http::withToken($this->getToken())
        ->post("https://{$this->domain}.megaplan.ru/api/v3/client/create", [...]);
    $contactId = $contact['data']['id'];
}

Token Obtaining and Refresh

$response = Http::post("https://{$this->domain}.megaplan.ru/api/v3/auth/access_token", [
    'username' => env('MEGAPLAN_LOGIN'),
    'password' => env('MEGAPLAN_PASSWORD'),
    'grant_type' => 'password'
]);

$token = $response['access_token'];
$refreshToken = $response['refresh_token'];
// Store token in cache, refresh via refresh_token

Webhooks from Megaplan

Megaplan supports outgoing webhook notifications when deal status changes. Allows updating request status on site when manager moves deal to another pipeline stage.

Practical Tips

  • API Megaplan can be slow (200–500ms) — all requests via queue
  • Use token cache (Redis) — don't request token per request
  • Log all requests/responses to crm_logs table for debugging

Integration time: 3–4 days for basic integration (leads + contacts + deals).