In this article, we’ll guide you through the advanced steps needed to get ActiveCampaign and NetSuite to exchange information, including any custom fields within ActiveCampaign.
This integration demonstrates two (bidirectional) flows:
- ActiveCampaign contacts to NetSuite contacts (add/update)
- NetSuite contacts to ActiveCampaign contacts (add/update)
Before continuing, you will need working accounts for both NetSuite and ActiveCampaign and be familiar enough with both platforms to make basic changes.
Create connections to ActiveCampaign and NetSuite
Create custom fields in ActiveCampaign
You must define the custom fields you intend to use for ActiveCampaign. Personalization tags will be needed later during the mapping stage of building the flows.
Create custom fields in NetSuite
Define a custom field in the NetSuite contact record to hold the ActiveCampaign ID for a contact. In this example, the custom field name is custentity_ww_activecampaign_id.
If you’re using custom fields in ActiveCampaign, create those fields in NetSuite, too, unless you you will be mapping them later to fields that already exist.
The steps below walk you through setting up the listeners, exports, and imports in Flow Builder.
ActiveCampaign contacts to NetSuite contacts (add/update)
This flow retrieves contacts from ActiveCampaign and syncs them with NetSuite.
This flow uses an ActiveCampaign webhook to retrieve new and updated contact information in real time. You must define the webhook in ActiveCampaign and the listener in integrator.io, as follows:
Step 1: Define the listener in integrator.io
Use the following settings when defining a new listener in Flow Builder:
- Name: ActiveCampaign : Webhook : Contacts (Add / Update)
- Verification type: Token
- Custom URL token: Use the API access key from your ActiveCampaign dashboard (under Settings > Developer)
After filling in the details above, click Copy URL to copy the public URL.
Step 2 : Define the webhook in ActiveCampaign
Sign into ActiveCampaign, go to Settings > Developer > Manage webhooks, and select Add.
Enter the following information:
- Name: Contact added / updated
- URL: Public URL copied previously
- Type: Contact added, contact updated
- Initialize from:
- By a contact
- By an admin user
- By the API
- By system processes
Remember the location of the Send sample data button on this page for use when you perform tests troubleshoot this flow.
Step 3 : Define the NetSuite imports
The flow has two destinations: Add and Update. This example separates these two operations for illustration purposes. You can also combine the imports by defining the operation as add/update in a single NetSuite step.
Create an import with the following settings:
- Name: NetSuite : Update Contact
- Record Type: Contact
- Operation: Update
- How to find existing records:
Define the data mapping to fit your needs. Here’s an example:
|ActiveCampaign field||NetSuite field|
|contact.comment||Comments from marketing|
|contact.lead_source||Lead Source (last touch) (Name)|
|contact.job_function||Job Function (Generalized) (Name)|
|contact.company||Company (free text)|
|"General"||Campaign Category (Name)|
Attach response mapping to this update import, such that the NetSuite ID of the updated record can be used as in the input to the add import:
|Import response field||Source record field (new/existing)|
Now, let’s create the add import with the following settings:
- Name: NetSuite : Add Contact
- Record type: Contact
- Operation: Add
Within the new add import, define the data mapping again, similar to before but focused on adding rather than updating.
Finally, add an input filter to this import, as shown below:
And there you have it. You can now test this flow before moving onto the next flow, which handles the opposite direction.
NetSuite contacts (add/update) to ActiveCampaign contacts
You are all ready to build the flow that takes contacts from NetSuite and syncs them with ActiveCampaign:
The approach chosen for this flow is to use a schedule that exports all contacts from NetSuite and adds/updates them in Active Campaign. However, the source could equally be configured as a real-time listener from NetSuite.
Step 1 (optional) : Define the Saved Search in NetSuite
If you plan to use a scheduling mechanism, first create a NetSuite Saved Search to expose the required fields of the Contact record, in particular the ID of the ActiveCampaign field defined in Get started, above.
Step 2 : Define the export in Integrator.io
In Flow Builder, define the export of this flow as outlined below:
- Name: NetSuite : Get all Contacts
- Output mode: Records
- API type: RESTlet
- Record type: Contact
- Saved search type: Public or Private (depending on the visibility of the saved search you defined above)
- Saved search/search ID: Name (if public) or ID (if private) of the saved search
Continue with the ActiveCampaign imports, and test your new integration.