Skip to main content
Version: 4.2

Mautic Configuration

This documentation will guide you to configure Mautic according the needed for integration with WHMCS.

Enable Mautic API

The WHMAUTIC module uses the Mautic API to synchronize clients between WHMCS and Mautic. To do so, it is necessary that the API and Basic Authentication of Mautic be active and working properly so that the module can access the endpoint of its Mautic installation.

To enable the Mautic API, login into your Mautic and select the settings option by clicking on the wheel in the upper right corner.

In the left menu options, select API Settings, change API enabled? and Enable HTTP basic auth? to Yes. Apply the changes.

Clear Mautic Cache

To ensure that the Mautic API is operating correctly, you need to perform a cache cleanup after API activation. To do this run the following command through SSH in the installation directory of your Mautic:

Mautic v2.x

To clear Mautic v2.x cache run the follow command:

php app/console cache:clear

If this command throws a PHP error, you can try to nuke the cache folder like this:

danger

Warning: Improper misuse of the 'rm -rf' command can delete entire folders and files from your project. Don't try it if you don't know what you're doing.

rm -rf app/cache

Mautic v3.x

To clear Mautic v3.x cache run the follow command:

php bin/console cache:clear

If this command throws a PHP error, you can try to nuke the cache folder like this:

danger

Warning: Improper misuse of the 'rm -rf' command can delete entire folders and files from your project. Don't try it if you don't know what you're doing.

rm -rf app/cache
caution

If you forgot to clear your Mautic cache your API will return a 404 error. This will cause the module to malfunction.

Create a user for WHMCS Integration

We recommend creating a unique Mautic user for access through WHMCS, In this way, it will be possible to audit the changes made through the integration module.

To create a new user on Mautic, open the right menu and click on Users option.

Click in New button on right top, fill the necessary fields. Below our recommendation:

  • First Name: WHMCS
  • Last Name: API
  • Username: whmcs
  • Password: a strong password
  • Email: a valid email address

Click on Save & Close to save the new user.

info

Save the username and password securely. You will need these credentials in the next steps to configure the module.

caution

Always use a strong password.

Enable fields to Publicly Updatable

To ensure that the WHMautic module can update the WHMCS client information you must enable this fields to be publicly editable on Mautic:

  • email
  • first name
  • last name

To turn the fields publicly updatable, open the right menu and click on Custom Fields option.

Search for the respective field and click on them to open the configuration options.

When you turn to yes the Email field publicly updatable, you permit that this field can be updatable from the tracking gif of mautic Tracking Code inserted on your WHMCS pages from the module WHMautic. These are necessary to module track when a client log in into your WHMCS.

Change the Publicly updatable to on and save the change.

info

Repeat this step for each required field.