WP Manifestindependent plugin directory
manifest / integrations / integration-cf7-to-perfectum-crm

Integration CF7 to Perfectum CRM

WordPress plugin that synchronizes Contact Form 7 submissions with the Perfectum CRM REST API.

by Eugene Mazuryk <mazuryk.e@weblorem.com> · github.com/eugenemazuryk/integration-cf7-to-perfectum-crm

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/eugenemazuryk/integration-cf7-to-perfectum-crm/archive/refs/heads/main.zip

Readme

Integration CF7 to Perfectum CRM

WordPress plugin that synchronizes Contact Form 7 submissions with the Perfectum CRM REST API.

Version: 4.1.3
Requires: WordPress 5.0+, PHP 7.4+, Contact Form 7
License: GPL-2.0-or-later


🇬🇧 English

Description

On every successful CF7 mail send (wpcf7_mail_sent), the plugin builds a JSON payload from the configured field map and posts it to the Perfectum CRM API (default endpoint: /leads).

Key features

Feature Description
Admin panel Contact → Sync with Perfectum CRM — map forms without code
Field mapping CF7 name attributes → CRM field keys
Custom fields Values go to custom_fields[entity][id] (entity: leads or clients)
Static fields Lead Source ID and Status ID per form (required by CRM)
display_name prefix Prefix + automatic page_title from the form
Credentials Admin settings or PERFECTUM_API_URL / PERFECTUM_API_KEY in wp-config.php
Legacy mappers Filter wl_perfectum_cf7_form_mappers for code-based mapping
Logging Request/response logging when WP_DEBUG is on
Translations English UI + Ukrainian (languages/)

Installation

  1. Upload the integration-cf7-to-perfectum-crm folder to /wp-content/plugins/
  2. Activate the plugin
  3. Make sure Contact Form 7 is active
  4. Open Contact → Sync with Perfectum CRM
  5. Set API URL and API Key (or use constants below)
  6. Click + Add form, choose a CF7 form, map fields, set Source/Status IDs, save

Configuration via wp-config.php (recommended for production)

define( 'PERFECTUM_API_URL', 'https://crm.yourdomain.com/api' );
define( 'PERFECTUM_API_KEY', 'your_actual_api_token_here' );

When defined, these constants override the corresponding admin fields (fields become disabled in the UI).

Admin field mapping

  1. Select a Contact Form 7 form
  2. Optional Label for your own reference
  3. display_name prefix — text prepended to the page title
  4. Lead Source (Source ID) and Lead Status (Status ID) — numeric IDs from Perfectum
  5. Custom field entityleads or clients
  6. Field mapping table:
    • CF7 field — input name (e.g. your-name) or special page_title
    • CRM field — API key (e.g. name, phonenumber, email)
    • Custom? — if checked, value is sent under custom_fields[...]

Legacy code-based mappers (optional)

If a form is not configured or not enabled in the admin UI, you can still register a PHP mapper:

add_filter( 'wl_perfectum_cf7_form_mappers', function ( $mappers ) {
    $mappers[15000] = 'my_theme_perfectum_mapper';
    return $mappers;
} );

function my_theme_perfectum_mapper( array $posted_data ): array {
    return array(
        'endpoint' => '/leads',
        'data'     => array(
            'name'        => $posted_data['your-name']  ?? '',
            'phonenumber' => $posted_data['your-phone'] ?? '',
            'email'       => $posted_data['your-email'] ?? '',
            'source'      => 19,
            'status'      => 1,
        ),
    );
}

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • Contact Form 7
  • Perfectum CRM account with API access

Changelog

See readme.txt for the full changelog.


🇺🇦 Українська

Опис

Плагін перехоплює успішне надсилання форм Contact Form 7 (хук wpcf7_mail_sent) і відправляє JSON-дані в REST API Perfectum CRM (за замовчуванням /leads).

Ключові можливості

Можливість Опис
Адмін-панель Contact → Sync with Perfectum CRM — мапінг форм без коду
Мапінг полів Атрибути name полів CF7 → ключі полів CRM
Кастомні поля Значення в custom_fields[entity][id] (leads або clients)
Статичні поля Source ID та Status ID ліда для кожної форми
Префікс display_name Префікс + автоматична назва сторінки (page_title)
Облікові дані У налаштуваннях або константи PERFECTUM_API_URL / PERFECTUM_API_KEY
Legacy-маппери Фільтр wl_perfectum_cf7_form_mappers для PHP-маппінгу
Логування Запити/відповіді в debug.log при увімкненому WP_DEBUG
Переклади Англійський інтерфейс + український переклад

Встановлення

  1. Завантажте папку integration-cf7-to-perfectum-crm у /wp-content/plugins/
  2. Активуйте плагін
  3. Переконайтеся, що Contact Form 7 активний
  4. Відкрийте Contact → Sync with Perfectum CRM
  5. Вкажіть API URL і API Key (або константи нижче)
  6. Натисніть + Додати форму, оберіть форму CF7, налаштуйте мапінг і Source/Status ID, збережіть

Налаштування через wp-config.php (рекомендовано для продакшену)

define( 'PERFECTUM_API_URL', 'https://crm.yourdomain.com/api' );
define( 'PERFECTUM_API_KEY', 'your_actual_api_token_here' );

Константи мають пріоритет над полями в адмінці (поля стають неактивними).

Мапінг у адмінці

  1. Оберіть контактну форму CF7
  2. За бажанням вкажіть мітку для себе
  3. display_name prefix — текст перед назвою сторінки
  4. Source ID та Status ID — числові ID з Perfectum (обов’язкові)
  5. Custom field entityleads або clients
  6. Таблиця мапінгу:
    • CF7 полеname інпута (наприклад your-name) або page_title
    • CRM поле — ключ API (наприклад name, phonenumber)
    • Custom? — якщо позначено, значення йде в custom_fields[...]

Legacy PHP-маппери (опційно)

Якщо форма не налаштована або вимкнена в адмінці, можна зареєструвати маппер у темі:

add_filter( 'wl_perfectum_cf7_form_mappers', function ( $mappers ) {
    $mappers[15000] = 'my_theme_perfectum_mapper';
    return $mappers;
} );

function my_theme_perfectum_mapper( array $posted_data ): array {
    return array(
        'endpoint' => '/leads',
        'data'     => array(
            'name'        => $posted_data['your-name']  ?? '',
            'phonenumber' => $posted_data['your-phone'] ?? '',
            'email'       => $posted_data['your-email'] ?? '',
            'source'      => 19,
            'status'      => 1,
        ),
    );
}

Вимоги

  • WordPress 5.0+
  • PHP 7.4+
  • Плагін Contact Form 7
  • Акаунт Perfectum CRM з доступом до API

Автор

Eugene Mazuryk — mazuryk-e.weblorem.com

Read the full README on GitHub →