Skip to content
  • There are no suggestions because the search field is empty.

How can I sync Acctivate database changes with HubSpot custom fields using SQL Server Service Broker?

Learn how to use SQL Server Service Broker and triggers to automatically update HubSpot custom fields when data changes in Acctivate.

Acctivate stores company and customer data in a Microsoft SQL Server database.  While there isn't a direct integration with Hubspot offered at this time, Organizations can use some programming to update Hubspot records when a change has been made to a related record in Acctivate. 

If you want to automatically update related HubSpot custom fields when Acctivate data changes — such as a customer’s address or a contract date — you can use SQL Server Service Broker for real-time data messaging and integration.

The steps below outline a recommended approach and key setup details for developers.


Overview

SQL Server Service Broker allows developers to build asynchronous, message-based workflows. By setting up database triggers and a message queue, Acctivate data changes can be automatically sent to HubSpot through a custom integration service.

For more information about Service Broker, see Microsoft’s documentation:
🔗 What Does Service Broker Do? (Microsoft Docs)


Steps to Set Up Acctivate-to-HubSpot Sync

1. Identify the Acctivate tables and fields to monitor

Common examples include:

  • tbCustomer table – customer address or phone number changes

  • tbIssue table (Business Activities)– Hubspot Deal or Ticket updates

  • tbOrders table – order status changes

Define which fields in HubSpot correspond to these Acctivate fields.


2. Enable Service Broker for your Acctivate database

If not already enabled, run the following SQL command (replace ACCTIVATE with your database name):

 
ALTER DATABASE [ACCTIVATE] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;

3. Create message types and queues

Define a message type for each kind of change you want to track. For example:

 
CREATE MESSAGE TYPE [ContractDateChanged] VALIDATION = WELL_FORMED_XML;
CREATE MESSAGE TYPE [CustomerAddressChanged] VALIDATION = WELL_FORMED_XML;

CREATE QUEUE AcctivateChangeQueue;
CREATE SERVICE AcctivateChangeService ON QUEUE AcctivateChangeQueue;

Each message type will correspond to a different update process in HubSpot.


4. Add triggers on monitored tables

Use SQL triggers to detect when a record changes and send a message to the Service Broker queue. Example:

 
CREATE TRIGGER trg_ContractDateChanged
ON dbo.Customer
AFTER UPDATE
AS
BEGIN
IF UPDATE(_ContractDate)
BEGIN
DECLARE @MessageBody XML;
SET @MessageBody = (SELECT CustomerID, _ContractDate, _HubspotID FROM inserted FOR XML AUTO);

DECLARE @DialogHandle UNIQUEIDENTIFIER;
BEGIN DIALOG CONVERSATION @DialogHandle
FROM SERVICE AcctivateChangeService
TO SERVICE 'AcctivateChangeService'
ON CONTRACT [AcctivateChangeContract]
WITH ENCRYPTION = OFF;

SEND ON CONVERSATION @DialogHandle MESSAGE TYPE [ContractDateChanged] (@MessageBody);
END CONVERSATION @DialogHandle;
END
END;

This trigger sends an XML message with the updated data to the Service Broker queue whenever the Contract date changes.


5. Create a custom service to process messages

Develop a lightweight background service or script (e.g., in C#, Python, or PowerShell) that:

  • Listens to the AcctivateChangeQueue

  • Reads new messages from the queue

  • Identifies the message type (e.g., ContractDateChanged, CustomerAddressChanged)

  • Uses the HubSpot API to update the corresponding custom field in HubSpot

Refer to HubSpot’s developer documentation for API details:
🔗 HubSpot CRM API Overview


6. Test and monitor

  • Use SQL Server Management Studio (SSMS) to verify that messages are appearing in the queue.

  • Confirm that the custom service correctly processes and removes messages.

  • Check HubSpot to confirm that the appropriate fields are being updated automatically.


Example Use Case

When the Contract date changes in Acctivate:

  1. A trigger adds a ContractDateChanged message to the Service Broker queue.

  2. The custom service reads the message, identifies the change type, and extracts the customer record ID.

  3. Using the HubSpot API, it updates the related custom field for that customer in HubSpot.

  4. The queue is cleared, and the data stays in sync automatically.

* Note - In this example use case, you may also need to create a Customer custom field in Acctivate where you can store the Hubspot ID, which is assigned to each customer in Hubspot.  You can export your list of customers from Hubspot to excel. Then, you can import in the list of customers and Hubspot IDs into the custom field.


Expected Result

Acctivate and HubSpot remain synchronized. When data changes in Acctivate, related custom fields in HubSpot update automatically with no manual data entry.

Actual Result (if not configured)

Without Service Broker and a listener service, HubSpot data does not update when Acctivate records change. Manual updates would be required.


Link Acctivate-sent emails to Hubspot

Emails sent from Acctivate can also be copied and logged to Hubspot as well.  Follow this kb article for setting a blind carbon copy email address in Acctivate

Additional Resources