Webhooks enable one application to provide another application with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately.
Within ActiveCampaign webhooks can be used in two ways as an Automatic Webhook and as an Automation Webhook.
See Integrating With ActiveCampaign for a detailed explanation.
For specific details regarding Automatic Webhooks see Automatic Webhooks.
Configuring An Automation Webhook
The configuration of Automation Webhooks for ActiveCampaign can be found in the following article:
The webhook URL used would be as detailed in Webhook Modules
Testing An Automation 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:
Within WordPress enable the ActiveMember360 API/Webhook logging as detailed at ActiveMember360, Settings, Logging.
Within ActiveCampaign create a test automation with no start trigger and a single action set using Conditions and Workflow, Webhook with the URL to post to set as described here Contact Push.
Within ActiveCamapign add your test contact to that automation from within the specific contact listing using Automations, Add
Within WordPress navigate to ActiveMember360, Utilities, API/Webhook Log.
Interrogate the log for a recent entry with the method
mbr/contact/push. If an entry is present the HTTP POST for the webhook was received successfully by ActiveMember360 and all is working correctly.
For a fuller understanding of the log please refer to ActiveMember360, Utilities, API/Webhook Log
Please note the HTTP POST may take a short time to arrive within WordPress, but is typically almost instantaneous.
Troubleshooting An Automation Webhook
If testing of the automation 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.
Firstly check your server logs to determine where the issue possibly lies.
You should see entries of the form shown below:
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. Indicates the entry is for an HTTP POST.
D. Is the URL segment and parameters for the webhook without the root URL.
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.
Set any security service/plugin or firewall to allow HTTP POSTs from the following wildcards:
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.
Set any security service/plugin or firewall to allow HTTP POSTs with blank user agents.
Set any security service/plugin or firewall to whitelist the ActiveCampaign IP addresses:
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.
Having done the above test again. If you are still having issues please submit a support ticket for us to assist here.
Using Automation Webhooks in preference to Automatic Webhooks
If you wish to use Automation Webhooks in preference to Automatic Webhooks because of the considerations when using Automatic Webhooks firstly you should deactivate Automatic Webhooks.
Then if either of the following are required use a Webhook URL set within an automation:
- Generate a password
- Ensure contact data is current for a logged in user where it may have been manually changed within ActiveCampaign, or changed by a third party application, or changed by actions in an automation
To generate a password you would use the webhook module mbr_genpass and to push the most current contact data to ActiveMember360 you would use Contact Push (mbr_genpass can also perform the function of Contact Push but it is now a legacy method that will at some point be deprecated).
These options give total control over when webhooks are used to send HTTP POSTs. Obviously, significant numbers of contacts should not be sent through the automation at the same time, as this could result in the same issues as using Automatic Webhooks.
Please note where ActiveMember360 changes the contact data these changes are always current within WordPress and there is no need to use any webhook.
So, regarding the use of webhooks the choice is with the user of ActiveMember360.
Either use Automatic Webhooks which may result in high volumes of HTTP POSTs being sent to your server, or manually configure Automation Webhooks for more control.
ActiveMember360 provides several webhook modules that can be used with ActiveCampaign webhook URLs. Full details and examples of how to use each module are detailed within:
We recommend the webhook modules detailed here are only used with ActiveCampaign automation webhooks.
Custom Webhook Modules
ActiveMember360 includes a capability known as Custom Webhook Modules.
This essentially allows a user to program their own webhook module for use with ActiveCampaign automation webhooks to manipulate/reformat/reconfigure ActiveCampaign contact records using ActiveMember360.
To be able to use Custom Webhook Modules it requires a knowledge of PHP as they must be programmed using that development language.
If you wish to use Custom Webhook Modules and require further details please submit a support ticket here.