Knowledgebase

Configuring and Using the MailerLite WHMCS Addon Print

  • whmcs, Mailerlite, Mailerlite Addon, configuration, Software
  • 0

This guide explains how to configure syncing, tagging, group mapping, field mapping, and automation.


How Sync Works

  • Client registration → Subscriber created in MailerLite
  • Client update → Subscriber updated automatically
  • WHMCS marketingoptin respected
  • Unsubscribe webhook disables marketing in WHMCS

Client Group Mapping

Map WHMCS client groups to MailerLite Group IDs.

  1. Go to Client Group Mapping tab.
  2. Select a WHMCS Client Group.
  3. Assign the corresponding MailerLite Group ID.
  4. Save changes.

Clients in those groups will be subscribed to the mapped MailerLite group.


Product Tag Mapping

Assign MailerLite tags based on WHMCS product activation.

  1. Go to Product Tags tab.
  2. Select a WHMCS product.
  3. Assign one or more MailerLite tags.
  4. Save changes.

Tag Behaviour

  • Tags are added when service becomes Active
  • On cancellation, tags are NOT removed
  • A cancellation log entry is recorded

Field Mapping

Map WHMCS custom client fields to MailerLite fields.

  1. Open Field Mapping tab.
  2. Select WHMCS custom field.
  3. Select corresponding MailerLite field.
  4. Save changes.

Only mapped fields will sync.


Bulk Import (Manual)

Import existing WHMCS clients into MailerLite.

  1. Go to Main tab.
  2. Click Bulk Import.
  3. Start the process.

Importing Large Datasets via Cron

If importing 20,000+ clients, use the cron importer:

php -q /path/to/whmcs/modules/addons/mailerlite_rest/cron_bulk_import.php
  • Processes clients in batches
  • Skips already subscribed records
  • Prevents PHP timeout issues

Debug log location:

/modules/addons/mailerlite_rest/import_debug.log

Webhook Setup

  1. In MailerLite go to Integrations → Webhooks.
  2. Create new webhook.
  3. Use URL:
https://yourdomain.com/modules/addons/mailerlite_rest/webhook.php

The webhook must include subscriber email in the JSON payload.


Webhook Testing Tool

Use the Webhook Test tab to simulate an unsubscribe event.

This verifies that WHMCS marketing preference is correctly disabled.


Logging

The Logs tab records:

  • API requests & responses
  • Webhook activity
  • Product tag assignments
  • Cancellation logs

Logs support filtering and pagination.


Was this answer helpful?

« Back