Use the ActiveCampaign VTEX integration to sync contacts, website visits, and purchase data from your VTEX store to ActiveCampaign.
Take note
- You need an ActiveCampaign account and a VTEX account that uses VTEX IO to use this integration
- Ensure the VTEX environment you intend to install the app on is set up with a website host under “Store” on https://{AccountName}.myvtex.com/admin/license-manager/#/account-details NOTE: If you visit this page and see a blank screen, you will need to ask for Owner (Admin Super) access to the VTEX account or access to the “License Manager” screens in VTEX to verify the host is set up
- Ensure that you have access to “Master Data” in the VTEX admin
- Contacts synced to ActiveCampaign from VTEX receive the following tag: VTEX-customer
- To sync opt-in marketing information to ActiveCampaign, you must create a custom contact field in the ActiveCampaign called “Accepts Marketing.” You can use this field to sync the “I want to receive the newsletter” checkbox data from VTEX checkout. Read the “Create a custom contact field from the Manage Fields page” section of the Custom Contact Field Overview help article to learn how to create this field
- ActiveCampaign accounts created on or after January 8, 2024: contacts synced in from the VTEX integration that have checked the “I want to receive the newsletter” checkbox will be added to the Master Contact List by default. If you delete or change the name of the ActiveCampaign-created Master Contact List, contacts will not be added to any lists. To add contacts to a list, you will need to create an automation
- Some of this setup requires the implementation of code. Our Customer Experience Team is not able to help you create or troubleshoot code.
About the ActiveCampaign VTEX integration
The ActiveCampaign VTEX integration configuration steps take place in your VTEX account. Once all steps in each section below are complete, the following will sync to your ActiveCampaign account:
- Website visits (uses ActiveCampaign Site Tracking)
- Purchase data
- Abandoned cart data
- Customer data
- Order data
- Form data (using a floating bar, floating box, OR modal form created within ActiveCampaign)
- Data of “I want to receive the newsletter” checkbox from VTEX checkout to facilitate GDPR compliance (requires configuration of a custom contact field in ActiveCampaign)
All purchase and abandoned cart data will appear in an Ecommerce box on the contact record.
Once you have this data in your account, you can use ActiveCampaign to:
- Create abandoned cart automations using the Abandoned Cart automation trigger and Abandoned Cart email content block. For more information, read the “Abandoned Cart Deep Data Overview” help article
- Personalize direct and automated with contact and order information
- Segment contacts by website visits, purchase data, abandoned cart data, and more
Connect VTEX to ActiveCampaign
This configuration takes place in your VTEX account.
- Install the activecampaignpartnerus.activecampaign app in the desired VTEX environment. To do so, go to Apps > App Store in VTEX admin. Select the ActiveCampaign app and then click Install.
- In the VTEX admin’s account, go to Apps > My Apps and select the ActiveCampaign box.
- Once on the app’s settings page, define the app’s configurations:
- ActiveCampaign Account name. Your account name is on the Settings > Account page in your ActiveCampaign account. For example, If your account is xyz123.activehosted.com, you would only enter xyz123 as the Account Name in VTEX
- ActiveCampaign Key. See the API URL and Key for more information
- Tracking setAccount ID - Leave this field blank for now
- ConnectionID. Leave this field blank
- Click Save.
- Next, find the ActiveCampaign Menu.
- On the “older” VTEX admin, it is In the VTEX admin sidebar under Products
- On the “newer” VTEX admin, it is on the Apps menu slideout under Installed Apps
-
Click ActiveCampaign > Connection ID Configuration
- Click Configure
- Wait for the fields to populate
- Click the External ID dropdown, then select your store ID
- Click the Link URL dropdown, then select the store URL
- Click Continue Configuration. You will see the message “Account has been updated.” The page will refresh and display the App Settings page. Your ConnectionID is now populated
- Click Save.
-
Click on ActiveCampaign > Purchase Data Configuration
- Currency - Enter the 3-letter ISO currency code for your store (such as USD for United States Dollars)
-
Send Purchase Data (optional)- Click the checkbox next to "Send Purchase Data?" if you wish to sync orders to ActiveCampaign
- This option sends customer data, including the “accepts_marketing” field and order data, to ActiveCampaign when the customer reaches the Order Confirmation page and if payment has been captured. If ActiveCampaign does not receive the order data, the order will be sent to ActiveCampaign when it is invoiced in VTEX
- Fulfillment orders do not sync into ActiveCampaign
- Click Save. You will see a confirmation message.
-
Click on ActiveCampaign > Connections.
- This information should match your Connected Integrations in your ActiveCampaign account
- To confirm this, log into your ActiveCampaign account, then navigate to Settings > Integrations. You should see the VTEX logo and the status "Connected" on this page
Turn on Site Tracking and whitelist your domain(s) (optional)
This integration uses ActiveCampaign’s Site Tracking feature. You do not need to add site tracking code to your site.
However, you need to add your tracking ID to the VTEX app’s settings under “Tracking setAccount ID.” The integration adds the Site Tracking code for you automatically. You still need to turn on the Site Tracking feature and whitelist your domain(s) on the Website > Site Tracking page in your ActiveCampaign account. To do so:
- Click Website in your ActiveCampaign account.
- Click Site Tracking.
- Click the Site Tracking toggle to set it to the “On” position.
- Type or paste your web domain into the Website URL field, then click the Add button.
- Copy the setTrackAccount ID number from the tracking code snippet and paste it into the app settings of the VTEX app.
Abandoned Cart Sync Configuration (optional)
Some of the terms listed in this section are in Portuguese. This is because the Portuguese language is used within the VTEX app. This article reflects the app’s terminology. In areas where VTEX sometimes translates to English, we have added the equivalent terms below in brackets [ ] for reference.
This integration syncs customer information with their abandoned cart data to ActiveCampaign. You can use this information to send emails to remind your customers about their abandoned carts. To allow this, you must configure an Abandoned Cart Trigger in VTEX.
- In the VTEX admin, access Master Data. After logging in to Master Data:
- Click Advanced Settings
- Click Data Structure
- Click Trigger
- Click Add New
- Complete the information as follows:
- Name - ActiveCampaign Trigger
- Data Entity - Cliente [Client]
- On the Rules tab:
- Trigger Rule - O valor de um atributo for alterado [An attribute value is changed]
- Field - Última sessão [Last session]
-
Click Add Filter, then select or enter:
- Checkout
- Diferente [Different from]
- Finalizado
-
Click Add Filter, then select or enter:
- Checkout
- Não está nulo [is not null]
-
Click Add Filter, then select or enter:
- Carrinho [Cart]
- Não está nulo [is not null]
-
Click Add Filter, then select or enter:
- Último Carrinho [Last cart]
- Não está nulo [is not null]
-
Click the Schedule tab and choose when VTEX will send abandoned cart data to ActiveCampaign. The options are:
- Run ASAP - this sends the data to ActiveCampaign within about 45 minutes (see note below) after the customer abandons their cart. If you use this setting, depending on your settings in ActiveCampaign, the customer may receive an abandoned cart email even if they have placed an order
- Schedule on specific date - this setting allows you to enter a particular date to send the data to ActiveCampaign. This is not recommended for abandoned cart emails
-
Schedule on dynamic date - this setting allows you to set a time length that will pass before VTEX sends the data to ActiveCampaign (this is based on the customer’s last session (Data de Última sessão). NOTE: Most clients choose this one and set it to 2 hours after the last session
Example:
Per VTEX documentation: “A page’s session expires in 30 minutes. Only after that time, the system schedules the abandoned cart trigger. In other words, the time to be considered is the session's time + the trigger schedule.”
- After making your schedule selection, click the If Positive tab. Then select or enter the following in these fields only:
- Action - Send an HTTP request
- Under Request Data:
- URL - (enter the URL below, replacing www.yourwebsiteurl.com with your website’s URL - DO NOT include spaces in this field) https://www.yourwebsiteurl.com/api/io/activeCampaign/abandonedCart
- Method - POST
- Headers: Name - Content-Type
- Headers: Value - application/json
-
Content as JSON - (replace the content that is there with the below content):
{
"rclastcart": "{!rclastcart}",
"rclastcartvalue": "{!rclastcartvalue}",
"rclastsession": "{!rclastsession}",
"rclastsessiondate": "{!rclastsessiondate}",
"email": "{!email}",
"userId": "{!userId}",
"firstName": "{!firstName}",
"lastName": "{!lastName}",
"localeDefault": "{!localeDefault}",
"id": "{!id}",
"accountId": "{!accountId}",
"accountName": "{!accountName}",
"dataEntityId": "{!dataEntityId}",
"createdBy": "{!createdBy}",
"createdIn": "{!createdIn}",
"updatedBy": "{!updatedBy}",
"updatedIn": "{!updatedIn}",
"lastInteractionBy": "{!lastInteractionBy}",
"lastInteractionIn": "{!lastInteractionIn}"
}
- Under Response Action:
- Data Entity - Cliente [Customer]
- Parameters: Name - Anexo [Attachment]
-
Click the If Negative tab
- No changes are needed here
- Click Save
Customer Sync (optional)
This integration syncs all existing customer data from VTEX to ActiveCampaign, including the “accepts_marketing” field.
Before proceeding with this sync, ensure that your automations, such as Welcome Series emails, are turned off in ActiveCampaign. To learn how to turn off your automations, visit the “How to set automations to “inactive” in ActiveCampaign” help article.
This configuration takes place in your VTEX account.
- Click on ActiveCampaign > Customers Sync.
- After the page loads, click Sync Customers.
- After confirming your automations are disabled in ActiveCampaign, click Continue sync.
A message “Customer Sync has started” will appear on the page.
Order Sync (optional)
This syncs all historical order data from VTEX to ActiveCampaign. Before proceeding with this sync, ensure that your automations turned off in ActiveCampaign.
This configuration takes place in your VTEX account.
- Click on ActiveCampaign > Orders Sync.
- After confirming your automations are disabled in ActiveCampaign, click Sync all orders.
- A dialog box will appear where you can select the date on the calendar you want to use as your sync beginning date. For example, you may wish only to sync the last six months of data instead of all historical orders placed.
- Click Continue sync.
- A message “Order Sync has started” will appear on the page.
- Orders placed starting on your beginning date through the current date will sync
- Order data will sync into ActiveCampaign at about 1000 - 1500 per hour
In addition to syncing all orders, you can choose to sync individual orders manually. To do so:
- Enter the order ID that you want to sync into the search box at the top of the page, then click Enter.
- Click the checkbox next to the order you wish to sync.
- After confirming your automations are disabled in ActiveCampaign, click Sync selected orders.
A message saying “Order Sync has Started” will appear.