Skip to main content

Automatic Webhooks Module

Overview

Webhooks are a mechanism by which ActiveCampaign can automatically send updated contact data to your WordPress site running ActiveMember360.

The use of webhooks ensures the current contact data is always available to ActiveMember360, so logged in users can have access to the correct content etc.

Within ActiveCampaign there are two types of webhooks; those defined in automations, and those defined/listed in your ActiveCampaign application ActiveCampaign, Settings, Developer, Manage Webhooks.

Those defined/listed in your ActiveCampaign application ActiveCampaign, Settings, Developer, Manage Webhooks are those referred to as Automatic Webhooks or REST Hooks in this documentation.

Automatic Webhooks/REST Hooks are essentially webhooks with predefined triggers and/or conditions to automatically process the webhook (sometimes referred to as webhooks with subscriptions). This makes Automatic Webhooks/REST Hooks easier to configure for a user than webhooks. Automatic Webhooks/REST Hooks in most cases can be configured directly by an application without any user involvement.

For a fuller understanding of webhooks please refer to ActiveCampaign Webhooks.

Activation

Steps to activate Automatic Webhooks module
Steps to activate Automatic Webhooks module
  1. In WordPress administrator main navigation click ActiveMember360, Modules.
  2. In ActiveMember360 Modules tabs click Automatic Webhook.
  3. Set Enable Automatic Webhook module to Yes/On.
  4. Click Save Settings.
Important

Enabling the ActiveMember Automatic Webhooks module automatically configures a webhook within ActiveCampaign, Settings, Developer, Manage Webhooks for use with your ActiveMember360 powered WordPress site.

No further manual configuration is required.

Configuration

Enabling the ActiveMember Automatic Webhooks module automatically configures a webhook within ActiveCampaign, Settings, Developer, Manage Webhooks.

No changes should be made manually to the webhook created.

ActiveMember360 regularly checks for the presence of the webhook if ActiveMember360, Modules, Automatic Webhooks is enabled. If the webhook is deleted or any of the settings changed it will be reinstated with the required settings.

Steps to configure Automatic Webhooks module
Steps to configure Automatic Webhooks module
  1. The Webhook Type should not be changed and should always be set to Default.

    DEPRECATED

    The Webhook Type is now deprecated.

    This setting remains solely to provide legacy support.

Automatic Webhook Actions

Once Automatic Webhooks have been enabled within ActiveCampaign, Settings, Developer, Manage Webhooks they will be listed as one of two types:

Master webhook listing in ActiveCampaign
Master webhook listing in ActiveCampaign
  1. The master webhook identified by the parameter master in the URL string serves two purposes. It sends the full contact record to ActiveMember360 but also instructs ActiveMember360 to automatically generate and store a password for the contact within ActiveCampaign if one does not exist.
Standard webhook listing in ActiveCampaign
Standard webhook listing in ActiveCampaign
  1. The standard webhook identified by no parameter master in the URL string sends the full contact record to ActiveMember360.

Both types of webhook are set to send an HTTP POST to the WordPress site when in ActiveCampaign the contact record is added or update i.e. the triggers Contact Added and Contact Updated.

Deactivation

Steps to deactivate Automatic Webhooks module
Steps to deactivate Automatic Webhooks module
  1. In WordPress administrator main navigation click ActiveMember360, Modules.
  2. In ActiveMember360 Modules tabs click Automatic Webhook.
  3. Set Enable Automatic Webhook module to No/Off.
  4. Click Save Settings.

ActiveMember360 will then automatically delete the webhook from ActiveCampaign, Settings, Developer, Manage Webhooks.

Important

If you no longer wish to use ActiveMember360 on a particular site you should also go through this deactivation process.

This will ensure that no unnecessary HTTP POSTs posted by the Automatic Webhooks are sent to your site. This will minimise the load on your server and prevent HTTP POST failures caused by ActiveMember360 no longer being active to service them.

Testing The Automatic Webhook

The primary purpose of testing the webhook is to determine that any HTTP POST sent by the webhook from ActiveCampaign is successfully received by WordPress/ActiveMember360.

The process for testing is as follows:

  1. Within WordPress enable the ActiveMember360 API/Webhook logging as detailed at ActiveMember360, Settings, Logging.
  2. Within ActiveCampaign Settings, Developer, Manage Webhooks select edit for the webhook that has the URL of your WordPress site.
Steps to send sample webhook data from ActiveCampaign
Steps to send sample webhook data from ActiveCampaign
  1. Click on Send Sample Data

  2. Within WordPress navigate to ActiveMember360, Utilities, API/Webhook Log.

  3. Interrogate the log for a recent entry with the method incoming_webhook [primary] or incoming_webhook. If either entry is present the HTTP POST for the webhook was received successfully by ActiveMember360 and all is working correctly.

    Standard webhook listing in ActiveCampaign
    API log listing for incoming_webhook

    For a fuller understanding of the log please refer to ActiveMember360, Utilities, API/Webhook Log

  4. Then from within ActiveCampaign manually add a new contact and repeat Step 5 above.

Important

It is important that you perform the outlined tests for every site running ActiveMember360 and using automatic webhooks. This is because any one of those sites could be used to automatically generate a password. The actual site used will depend upon several factors however you have no control over the one used.

You can determine those sites from the listing shown within ActiveMember360, Utilities, API/Webhook Log or alternatively within ActiveCampaign, Settings, Developer, Manage Webhooks listed as those with URLs containing MBR.

Troubleshooting The Automatic Webhook

If testing of the automatic webhook is not successful it is most likely that your server/website security is such that a plugin, service or firewall on the server is blocking the HTTP POSTs.

  1. Firstly check your server logs to determine where the issue possibly lies.

    You should see entries of the form shown below:

    Steps to send sample webhook data from ActiveCampaign
    Steps to send sample webhook data from ActiveCampaign

    Where the identifier:

    A. Is the ActiveCampaign IP address from which it was sent. These should be on your whitelist.

    B. Is the date/time sent.

    C. Is an identifier string.

    D. Is the name of your ActiveCampaign application.

    E. Should be 200 and indicates the HTTP POST was successfully received.

    If these entries are missing or a different number from 200 is shown there is an issue.

  2. Set any security service/plugin or firewall to allow HTTP POSTs from the following wildcard:

    https://yoursite.com/?mbr*

    i.e with any URL parameters whose first three characters are mbr followed by any other characters.

    Obviously replace https://yoursite.com with your WordPress site URL as shown in WordPress, Settings, General, Site URL.

  3. Set any security service/plugin or firewall to allow HTTP POSTs with blank user agents.

  4. Set any security service/plugin or firewall to whitelist the ActiveCampaign IP addresses:

    173.193.9.0/24
    173.193.9.198
    23.20.225.34
    34.192.144.26
    34.199.37.208
    34.230.175.182
    34.233.54.78
    34.233.145.248
    34.233.239.23
    35.169.241.145
    44.209.1.85
    44.206.115.225
    52.7.228.32
    52.45.6.233
    52.45.183.46
    52.55.227.5
    52.72.254.82
    52.86.138.218

    This is not a definitive list as ActiveCampaign do not publish the IPs they use. So there may well be others to whitelist but if they are being blocked they can be determined from your security service/plugin or firewall.

  5. Having done the above test again. If you are still having issues please submit a support ticket for us to assist here.

Considerations When Using Automatic Webhooks

Important

For the vast majority of ActiveMember360 users the following will not be relevant however it is best to be aware of such considerations.

The number of webhooks processed and HTTP POST requests made when using automatic webhooks within ActiveCampaign can be siginicant and will depend upon:

  1. The number of sites running WordPress/ActiveMember360 and connecting to the same ActiveCampaign application.
  2. The number of contacts within the ActiveCampaign application.
  3. The number of updates made to the ActiveCampaign contacts.

ActiveCampaign provides no way of limiting the number of webhooks triggered when using Contact Added and Contact Updated. They cannot be limited to only the contacts who are remote users of your sites.

Depending upon the server resources available the sheer volume of HTTP POSTs requests made in certain circumstances could result in performance/availability issues for your servers and hence websites.

So you will need to mitigate against such issues by ensuring that either/and/or:

  • Your hosting plan provides an automatic scaleable way of increasing resources to meet requirements.
  • Your hosting company or WAF (Web Application Firewall) understands that such HTTP POSTs to any URL containing the string MBR. or mbr_ in the URL string are not DDoS attacks and therefore do not block such requests.
  • You deactivate automatic webhooks for all redundant, inactive, development and staging sites specifically when making bulk changes to contacts. See Deactivation.
  • You make bulk changes to ActiveCampaign contacts in manageable numbers.
  • You consider disabling automatic webhooks and switching to using automation webhooks within ActiveCampaign. These provide much more control regarding for which contacts the webhook is triggered. See: Using Automation Webhooks