Overview
The HubSpot Integration automatically syncs customer, contact, product, and sales document information between HubSpot and SalesPad. Customers and contacts can be created in either HubSpot or SalesPad and then will sync to the other system, and further updates made in SalesPad can be exported to HubSpot. Prospects can be used instead of customers, or in addition to customers if HubSpot companies at different stages should be represented by different entities in SalesPad. SalesPad items can be exported as HubSpot products, and sales documents in SalesPad can be pushed out to HubSpot as deals, with or without their line item information.
All of the configuration for this integration lives in settings, which puts all of the matching and mapping logic directly in users’ hands. Control which fields are set when new entities are created and updated, how entities are matched to each other when initial linking occurs, and filter which entities are synced. Take the reins in automating the data flow between SalesPad and HubSpot!
Table Of Contents
- HubSpot Private App Setup
- AA Job Creation
- Company Link
- Company Customer Import
- Customer Export
- Customer Updates Export
- Company Prospect Import
- Prospect Updates Export
- Product Export
- Deal Export
HubSpot Private App Setup
Once the HubSpot account is created, a private app must be registered within that account. This will provide an access token that must be copied into a specific SalesPad setting, which will allow the communication between these systems.
Log into the HubSpot account and navigate to Settings, then launch Account Setup > Integrations > Private Apps and choose to create a private app.
In the Basic Info tab, give it a meaningful name like SalesPad Connector, provide any desired description, and add a logo if desired.
In the Scopes tab, check every checkbox under the CRM category, as well as the e-commerce scope under the Standard category. SalesPad may need read and write access for any of these CRM scopes. Missing a required scope could result in errors when the connector attempts to sync data.
In the Webhooks tab, no further action is needed. SalesPad does not currently integrate with any of HubSpot’s webhooks.
Click the Create App button at the top right, then review the prompt and choose to continue creating the app. This creates the app and displays another prompt with the generated access token for this app. This is the token value that must be copied into the HubSpot Access Token setting within the HubSpot AA job in SalesPad. This value should be protected so that unauthorized apps cannot use it to view or update the data in HubSpot.
If the access token is needed again, it can be found in the Auth tab on the information page for the private app, and the View Access Token button on the Private Apps page can also be used to copy the token.
If multiple HubSpot hubs must sync data to SalesPad, then this process must be repeated for each Hub ID. Make sure to switch to each hub before creating its private app. An individual access token will then be generated for each hub.
AA Job Creation
The HubSpot connector in SalesPad lives within Automation Agent. One AA job is needed per HubSpot hub, and the access token is what ties each hub to one of the AA jobs.
In SalesPad, in the Automations tab, launch the Automation Lookup. Choose to create a New Automation, and make sure to select the HubSpot platform. Give the job a meaningful name and description, then click OK to create the new AA job.
In the new AA job, in Settings, the HubSpot Access Token setting needs to have the token value that was generated for the private app in HubSpot. Paste in the access token that was copied from HubSpot, then save the AA job changes.
Additional settings must be configured in order for the AA job’s components to sync information properly. Most of the settings for this AA job are tied to specific components and will be covered in their corresponding sections below. Settings that apply to the AA job as a whole include:
Account Details
-
HubSpot Access Token - An access token from a HubSpot private app. This is required to communicate with HubSpot as well as to indicate which HubSpot tenant this integration is for.
API
-
Company Filter Script - A C# script that runs before loading companies from HubSpot.
-
HubSpot Page Size - Specify the page size to use when loading companies, contacts, and other entities from HubSpot. The page size must be between 1 and 100. Defaults to 100.
-
Minimum Date Offset Minutes - Import components only load entities from HubSpot which have been recently created or modified. When an import finishes running, it updates its Minimum Create/Modified Date to the time the import started running minus the number of minutes specified in this setting. The purpose of this setting is to account for the possibility that a HubSpot entity might not be available via the API right away due to load balancing.
The Send Email On Error section includes standard settings that allow configuring whether emails should be automatically sent when errors are encountered in the AA job.
The Serialization section includes standard settings to disable serialization options, which can help speed up the sync processing.
The Automation History sections include standard settings that control how long history logs are retained for reference.
Company Link
The Company Link component automatically links existing HubSpot companies to existing SalesPad customers or prospects. This component will also link the company’s contacts to that customer’s or prospect’s contacts. Settings control which companies should be linked, as well as which rules to follow for matching HubSpot entities to their counterparts in SalesPad.
Settings
Company Link Filter Type - A semicolon separated list of HubSpot company types (PROSPECT, PARTNER, RESELLER, VENDOR, OTHER) to filter by for which companies to link to existing customers and prospects.
Customer Address Matching - Define the criteria used when looking up a matching Customer Address.
Customer Matching - Define the criteria used when looking up a matching Customer.
Enable Company Link Trace - If enabled, customer, customer address, prospect, and prospect contact matching information will be logged during company linking. This setting should be enabled for troubleshooting purposes only.
Log Errors For Unmatched Companies - If set to 'True', the Company Link component will log unmatched companies to the Action Center.
Post Link Script - A C# Script that runs after a Company is linked to a Customer or Prospect.
Prospect Contact Matching - Define the criteria used when looking up a matching Prospect Contact.
Prospect Matching - Define the criteria used when looking up a matching Prospect.
Usage
The Company Link will create links between existing companies in HubSpot and existing customers or prospects in Salespad/GP. These entities are matched to one another based on the Customer Matching and Prospect Matching settings.
Contacts for those HubSpot companies can also be linked using this functionality. Contacts will be matched to customer addresses or prospect contacts, depending on whether the HubSpot company is matched to a customer or a prospect in SalesPad. This matching step uses the Customer Address Matching and Prospect Contact Matching settings.
If the Company Link fails to match a HubSpot company to an existing SalesPad customer or prospect, then contact matching still runs. If a match is found, then those contacts are linked, and the HubSpot company is linked to that contact’s customer or prospect.
No customers, prospects, or contacts are created or updated by this component in either system, other than creating the link in SalesPad so that future updates can be pushed from SalesPad to HubSpot. This link is stored in the spAAIntegratedEntityLink database table. If configuration issues cause incorrect matches to occur, then those links must be manually deleted in that table in order to allow matching to retry for that SalesPad customer/prospect/contact.
There is a Log Errors For Unmatched Companies setting which will log automation errors for each HubSpot company that cannot be linked. This can be helpful if all HubSpot companies are expected to already exist in SalesPad, as it will help identify which are missing.
The Company Link can be run manually from the Company Link tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule. However, the intention for this component is to only run it during initial setup until all companies are linked properly. Once initial linking is set up, and the import/export components are running, then all newly created customers, prospects, and contacts in either system will automatically sync to the other system via those import/export components. It is not recommended to leave the Company Link running automatically long-term as it can be resource-intensive.
Company Customer Import
The Company Customer Import component will create customers and contacts in SalesPad based on their corresponding HubSpot companies and contacts. Filter settings allow designating which companies should be created as SalesPad customers. Matching settings let the component match HubSpot companies and their contacts to existing SalesPad customers and contacts if applicable, in which case it will simply establish the links between them. If no match is found, then they will be created following the field mapping settings.
Settings
Company Filter - Type - A semicolon separated list of company types (PROSPECT, PARTNER, RESELLER, VENDOR, OTHER) to filter by for which companies to import as customers. NOTE: If you change this setting's value and want older companies which match the new filter to import, modify the Minimum Create Date on the Company Customer Import tab.
Customer Address Import Mapping - Define the mappings to be used when creating a new Customer Address.
Customer Import Mapping - Define the mappings to be used when creating a new Customer.
Customer Post Import Script - A C# Script that runs after a Customer is imported.
Customer Pre Import Script - A C# Script that runs before a Customer is imported.
Import New Companies - When enabled, the Company Customer Import will import companies.
Import New Contacts For Linked Customers - When enabled, the Company Customer Import will import contacts belonging to companies which are already imported or otherwise linked to a customer.
Prevent Matching To Prospects - When enabled, the matching attempt will only try to match against existing customers in SalesPad. When disabled, the matching attempt will try to match against existing customers first, and then existing prospects. Requires the Try To Match Before Importing setting to be enabled for any matching to occur. Disabling this setting could add processing time to this import job.
Roll Back Customer Import Transaction On Error - When enabled, the transaction encompassing the Customer Import will be rolled back when an error occurs. This prevents data from a partially completed import from being saved to the database.
Try To Match Before Importing - When enabled, importing will use the Company Link > Customer/Prospect Matching settings to try to find an existing Customer/Prospect in SalesPad before creating a new one. If an existing match is found, linking will occur instead of creation. Contacts will also be matched and linked if possible using the Company Link > Customer Address Matching and Prospect Contact Matching settings, and if not matched then they will be created. Enabling this setting could add processing time to this import job.
Usage
The Company Customer Import will process HubSpot companies and import them into SalesPad as customers. Companies to import can be filtered using the Company Filter - Type setting or the Company Filter Script. If a company that is being imported already exists in SalesPad based on the matching settings, then it is linked to the existing SalesPad customer instead of creating a new one.
Any HubSpot contacts associated with the company are also imported as customer addresses for that customer in SalesPad. All details for the customer and customer addresses are determined by the Customer Import Mapping and Customer Address Import Mapping settings respectively.
This component will also import new contacts that have been created for HubSpot companies that were previously linked to SalesPad customers. Because the company already has a linked customer, the new HubSpot contact will simply be created as a new customer address for that customer in SalesPad, with a link back to its corresponding HubSpot contact.
This import component will only import HubSpot companies and contacts that have been created since the last time this component ran. This can be manually changed for the next import run by going to the Company Customer Import tab and changing the Minimum Create Date.
The Company Customer Import can be run manually from the Company Customer Import tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Customer Export
The Customer Export component will create new HubSpot companies and contacts based on SalesPad customers and contacts, and link them so that future updates in SalesPad can automatically sync to HubSpot. Filter settings control which customers and contacts are sent to HubSpot, and mapping settings control how the HubSpot companies and contacts are created.
Settings
Customer Address Types To Export - Determines which address types should be exported when exporting a customer to HubSpot. Defaults to * for all.
Customer Export Filter - Define the criteria for which GP Customers and their contacts should be exported to HubSpot. If left blank, all customers that are not currently synced with HubSpot will be exported.
Customer Post Export Script - A C# Script that runs after a Company is exported in HubSpot using a Customer.
Customer Pre Export Script - A C# Script that runs before a Company is exported in HubSpot using a Customer.
Export New Contacts For Linked Customers - When enabled, the Customer Export will export contacts belonging to customers which are already exported or otherwise linked to a company.
Customer Address Export Mapping - Define the mappings to be used when creating or updating a Contact in HubSpot using a Customer Address. This setting is shared with Customer Updates Export.
Customer Export Mapping - Define the mappings to be used when creating or updating a Company in HubSpot using a Customer. Note: This setting is shared with Customer Updates Export.
Usage
The Customer Export pushes SalesPad customers to HubSpot as new companies. The Customer Export Filter settings controls which customers are exported. This component only handles creating new companies, as the Customer Updates Export will update existing companies in HubSpot. The new HubSpot company’s details will be populated based on the Customer Export Mapping setting.
Customer addresses for each SalesPad customer will also be created in HubSpot as contacts for the associated company, with fields set based on the Customer Address Export Mapping setting. The Customer Address Types To Export setting allows restricting the export to certain types of addresses.
This component will also export new addresses that have been created for SalesPad customers that were already linked to HubSpot companies. Because the customer already has a linked HubSpot company, the new SalesPad customer address will simply be created as a new contact for that company in HubSpot, and the SalesPad address will be linked to that HubSpot contact.
The Customer Export can be run manually from the Customer Export tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Customer Updates Export
The Customer Updates Export component automatically updates HubSpot companies and contacts based on changes to their linked SalesPad customers and contacts. Updates will only occur for SalesPad customers and contacts that are already linked to HubSpot companies and contacts. Mapping settings control which fields are updated.
Settings
Customer Contact Update Post Export Script - A C# Script that runs before a Contact is updated in HubSpot using a Customer Address
Customer Contact Update Pre Export Script - A C# Script that runs after a Contact is updated in HubSpot using a Customer Address.
Customer Export Range Days - The number of days in the past to look for customers that have changed in SalesPad and need updating in HubSpot.
Customer Update Post Export Script - A C# Script that runs after a Company is updated in HubSpot using a Customer.
Customer Update Pre Export Script - A C# Script that runs before a Company is updated in HubSpot using a Customer.
Number Of Customers Per Export Page - Specify the number of customers in each page of the Customer Updates Export.
Customer Address Export Mapping - Define the mappings to be used when creating or updating a Contact in HubSpot using a Customer Address. This setting is shared with Customer Export.
Customer Export Mapping - Define the mappings to be used when creating or updating a Company in HubSpot using a Customer. Note: This setting is shared with Customer Export.
Usage
The Customer Updates Export is responsible for updating HubSpot companies and contacts with new information from their linked SalesPad customers and contacts. The SalesPad customers and contacts must already be linked to HubSpot entities for the updates to occur, which can be established by the Company Link, Company Customer Import, or Customer Export components. The Customer Export Mapping and Customer Address Export Mapping settings control which information on the HubSpot entities is updated.
The Customer Updates Export can be run manually from the Customer Updates Export tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Company Prospect Import
The Company Prospect Import component will create prospects and contacts in SalesPad based on their corresponding HubSpot companies and contacts. Filter settings allow designating which companies should be created as SalesPad prospects. Matching settings let the component match HubSpot companies and their contacts to existing SalesPad prospects and contacts if applicable, in which case it will simply establish the links between them. If no match is found, then they will be created following the field mapping settings. When prospects are converted into customers, they keep their link to the HubSpot company so that future changes to that customer can still be sent to HubSpot.
Settings
Company Filter - Type - A semicolon separated list of company types (PROSPECT, PARTNER, RESELLER, VENDOR, OTHER) to filter by for which companies to import as prospects. NOTE: If you change this setting's value and want older companies which match the new filter to import, modify the Minimum Create Date on the Company Prospect Import tab.
Import New Companies - When enabled, the Company Prospect Import will import companies.
Import New Contacts For Linked Prospects - When enabled, the Company Prospect Import will import contacts belonging to companies which are already imported or otherwise linked to a prospect.
Prevent Matching To Customers - When enabled, the matching attempt will only try to match against existing prospects in SalesPad. When disabled, the matching attempt will try to match against existing prospects first, and then existing customers. Requires the Try To Match Before Importing setting to be enabled for any matching to occur. Disabling this setting could add processing time to this import job.
Prospect Contact Import Mapping - Define the mappings to be used when creating a new Prospect Contact.
Prospect Import Mapping - Define the mappings to be used when creating a new Prospect.
Prospect Post Import Script - A C# Script that runs after a Prospect is imported.
Prospect Pre Import Script - A C# Script that runs before a Prospect is imported.
Roll Back Prospect Import Transaction On Error - When enabled, the transaction encompassing the Prospect Import will be rolled back when an error occurs. This prevents data from a partially completed import from being saved to the database.
Try To Match Before Importing - When enabled, importing will use the Company Link > Customer/Prospect Matching settings to try to find an existing Customer/Prospect in SalesPad before creating a new one. If an existing match is found, linking will occur instead of creation. Contacts will also be matched and linked if possible using the Company Link > Customer Address Matching and Prospect Contact Matching settings, and if not matched then they will be created. Enabling this setting could add processing time to this import job.
Usage
The Company Prospect Import is very similar to the Company Customer Import, but it creates prospects instead of customers in SalesPad. HubSpot companies to import as prospects can be filtered using the Company Filter - Type setting or the Company Filter Script. If a company that is being imported already exists in SalesPad based on the matching settings, then it is linked to the existing SalesPad prospect instead of creating a new one.
Any contacts associated with the company are also imported as contacts for that prospect in SalesPad. All details for the prospects and the contacts are determined by the Prospect Import Mapping and Prospect Contact Import Mapping settings, respectively.
This component will also import new contacts that have been created for HubSpot companies that were already linked to SalesPad prospects. Because the company already has a linked prospect, the new HubSpot contact will simply be created as a new contact for that prospect in SalesPad, with a link back to its corresponding HubSpot contact.
This import component will only import HubSpot companies that have been created since the last time this component ran. This can be manually changed for the next import run by going to the Company Prospect Import tab and changing the Minimum Create Date.
The Company Prospect Import can be run manually from the Company Prospect Import tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Prospect To Customer Conversion
When a SalesPad prospect is converted into a customer, it retains its link to the HubSpot company, and all of its converted contacts retain their links to their corresponding HubSpot contacts. This allows the integration to continue pushing any updates made to that customer and its contacts in SalesPad.
For that reason, even if all HubSpot companies will be imported as SalesPad prospects instead of customers, it is recommended to configure both the Prospect Updates Export and the Customer Updates Export. The Prospect Updates Export will push updates made to the prospect and its contacts, while the Customer Updates Export will take over pushing updates once that prospect is converted to a customer.
Prospect Updates Export
The Prospect Updates Export component automatically updates HubSpot companies and contacts based on changes to their linked SalesPad prospects and contacts. Updates will only occur for SalesPad prospects and contacts that are already linked to HubSpot companies and contacts. Mapping settings control which fields are updated.
Settings
Number Of Prospects Per Export Page - Specify the number of prospects in each page of the Prospect Updates Export.
Prospect Contact Export Mapping - Define the mappings to be used when updating a Contact in HubSpot using a Prospect Contact.
Prospect Contact Update Post Export Script - A C# Script that runs after a Contact is updated in HubSpot using a Prospect Contact.
Prospect Contact Update Pre Export Script - A C# Script that runs before a Contact is updated in HubSpot using a Prospect Contact.
Prospect Export Mapping - Define the mappings to be used when updating a Company in HubSpot using a Prospect.
Prospect Export Range Days - The number of days in the past to look for prospects that have changed in SalesPad and need updating in HubSpot.
Prospect Update Post Export Script - A C# Script that runs after a Company is updated in HubSpot using a Prospect.
Prospect Update Pre Export Script - A C# Script that runs before a Company is updated in HubSpot using a Prospect.
Usage
The Prospect Updates Export is responsible for updating HubSpot companies and contacts with new information from their linked SalesPad prospects and contacts. The SalesPad prospects and contacts must already be linked to HubSpot entities for the updates to occur, which can be established by the Company Link or Company Prospect Import components. The Prospect Export Mapping and Prospect Contact Export Mapping settings control which information on the HubSpot entities is updated.
The Prospect Updates Export can be run manually from the Prospect Updates Export tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Product Export
The Product Export component will create and update products in HubSpot based on item masters in SalesPad. The initial export of an item creates a new product in HubSpot and establishes the link within SalesPad, and then future exports will use that link to update that HubSpot product based on changes made to the item in SalesPad. Filter settings allow controlling which items are pushed to HubSpot, and mapping settings define which information from the SalesPad items is set on the HubSpot products.
Settings
Number Of Items Per Export Page - Specify the number of items in each page of the Product Export.
Product Export Filter - Define the filter that determines which Item Masters will be used when creating new or updating existing products in HubSpot. NOTE: If no filter is defined, then ALL item masters will be exported to HubSpot.
Product Export Mapping - Define the mappings to be used when creating or updating a Product in HubSpot using an Item Master.
Product Post Export Script - A C# Script that runs after a Product is exported in HubSpot using an Item Master.
Product Pre Export Script - A C# Script that runs before a Product is exported in HubSpot using an Item Master.
Usage
The Product Export will send item master information to HubSpot by creating and updating HubSpot products as needed. Items to export can be filtered using the Product Export Filter setting. Any of these items that do not already exist in HubSpot will be created as new products, and their details will be populated based on the Product Export Mapping setting.
SalesPad items will be automatically matched to existing HubSpot products if the HubSpot product’s SKU matches the SalesPad item’s Item Number, because both of these fields are the primary key identifiers for the item in these systems. When this occurs, SalesPad will consider this a match and establish the link between the SalesPad item and the HubSpot product, and then it will apply any updates on the SalesPad item to the HubSpot product.
If the item already exists as a HubSpot product, and the SalesPad item has changed since the last time the item was exported, then these details will be updated on the product. If the item already exists as a HubSpot product and there have been no changes made to it in SalesPad, then no changes will be made.
The Product Export can be run manually from the Product Export tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.
Deal Export
The Deal Export component will create deals in HubSpot for sales documents in SalesPad that are in a particular workflow queue. HubSpot line items will be created for the sales lines on the sales document, and those lines will be linked to both the parent document and to their HubSpot products if applicable. This is a one-way, one-time export that is intended to provide sales data visibility for HubSpot users, so it is recommended that the target queue is late in workflow after the document has been finalized so it will not undergo further changes.
Settings
Deal Export Queue - Queue that contains sales documents ready to be exported to HubSpot as deals.
Deal Line Item Mapping - Define the mappings to be used when creating a Deal's Line Item in HubSpot.
Deal Mapping - Define the mappings to be used when creating a Deal in HubSpot.
Deal Post Export Script - A C# Script that runs after a Deal is created in HubSpot.
Deal Pre Export Script - A C# Script that runs before a Deal is created in HubSpot.
Number Of Sales Documents Per Export Page - Specify the number of sales documents in each page of the Deal Export.
Should Export Sales Lines - When enabled, sales lines will be exported.
Usage
The Deal Export processes all SalesPad sales documents that are currently in the workflow queue that is specified in the Deal Export Queue setting. Each document will be created as a deal in HubSpot with all details defined by the Deal Mapping setting. Sales documents must be assigned to a customer that is linked to a HubSpot company in order to be exported, and the new HubSpot deal will be linked to that company. If all processing completes successfully, then the sales document will be automatically forwarded to the next queue in workflow.
If the Should Export Sales Lines setting is enabled, then this component will also export any sales lines on the sales documents as line items for that deal. SalesPad will attempt to match each item to a product in HubSpot based on the links made between SalesPad items and HubSpot products during the Product Export. If a matching product is found, then it will automatically copy details from that product to the HubSpot line item before applying any mapped values from the SalesPad sales line. If no matching HubSpot product is found, then the line item will still be created, its details will only be set based on the mapped fields in the Deal Line Item Mapping setting, and an audit will be added to the sales document to note which products could not be found. This is not considered a hard stop or failure for the processing, but it could result in those HubSpot line items needing manual updates if they failed to match properly. This would likely be due to the Product Export not being run to push those new items before the Deal Export ran.
This processing is not restricted to sales orders, so it could be used to send invoices or even quotes to HubSpot. But it is important to keep in mind:
-
Sales documents are only sent to HubSpot once, so they will create a new deal but they will not update that deal in the future. If a sales document that has already been exported to HubSpot is placed back in the processing queue, the Deal Export will see that it is already linked and will simply skip it. A sales document could be forced to re-export by deleting the links for it and its sales lines in the spAAIntegratedEntityLink database table; however, this will result in an entirely new deal being created with new line items in HubSpot, and the previously exported deal and line items will need to be manually deleted. Due to this, it is recommended to only send sales documents to HubSpot once they are finalized in SalesPad.
-
This processing always uses HubSpot deals for the header-level entity. HubSpot has a separate header-level entity for quotes, which is not integrated with SalesPad at this time. Depending on intended processes, it could make sense to send SalesPad quotes to HubSpot as deals, but it is recommended to differentiate these from sales orders/invoices via HubSpot’s pipelines and stages (a similar concept to SalesPad workflow).
The Deal Export can be run manually from the Deal Export tab by clicking Run Now. It can also be run automatically using an Automation Agent Service on a defined schedule.