HubSpot


Automatically add customers as a Contact in HubSpot and segment them into Lists with SamCart's HubSpot Integration.

SamCart's Integration Engine allows you to automatically add customers as a Contact and segment them into a list within HubSpot, freeing up time for you to focus on driving more traffic to your SamCart pages instead of adding data manually to your CRM!

Below, we'll break down how to connect SamCart with HubSpot, and how to create rules allowing you to automate the process.

Connecting SamCart With HubSpot

Start by clicking over to your Marketplace Settings, then select the Integrations tab up top. 

Here, you'll see a list of all your active integrations that are connected via the Integration Engine. To add a new HubSpot integration, click either of the + Add New buttons in the Email section:

This will prompt a box to appear asking for a Label for the integration as well as the API Key. Once these are added, click Add Integration

Once HubSpot is successfully integrated, it will appear in the Integration Setup tab. 

Now we're ready to create some Integration Rules! Below, we'll go over the two types of Integration Rules in SamCart. 

Creating Integration Rules at the Product Level 

Now that SamCart is "connected" to HubSpot, you'll need to establish simple rules that tell the Integration Engine what to do when certain actions takes place in your SamCart Marketplace. 

Head over to your Product and click into the Integrations tab (1), then click New Rule (2)

First, you'll need to select a trigger. A trigger is the event inside of your SamCart Marketplace that tells the Integration Engine it's time to make something happen in HubSpot. In this example, we'll use the Product Purchased trigger as it's the most common. 

Select Product Purchased from the drop-down menu and click Next Step:

In the following window, we'll establish the specific action we want the rule to perform. First, select the desired Integration (1) in the first drop-down menu. Your integrations will be sorted using the internal label you chose when you connected the application. 

Next, choose an Action (2) you'd like the integration to perform. In this example, we're choosing Add to List, which will add the customer as a Contact and add them to a List that you have previously setup in HubSpot. When you're done, click Next Step (3)

Lastly, we need to choose where the Integration Engine will point your new customers. For this example, we're going to place all of our new customers for this Product in the "SamCart Customers" List, which was created in HubSpot.

Choose the List you would like to add from the drop-down menu and click Submit when you are finished:

And we're done! Now, anyone who purchases this Product will be added to HubSpot as a Contact in the "SamCart Customers" List. 

If you'd like, you can also create Remove From List rules which automatically removes your Contact from the List. 

Here is a list of triggers that you can use with the Add to or Remove from List actions:

  • Product Purchased - fires when a product is purchased as a primary product, upsell, order bump, or payment option.

  • Product Refunded - fires when a refund occurs inside of SamCart for the product.

  • Product Partially Refunded - fires when a partial refund occurs inside of SamCart for the product.

  • Prospect Created (i.e. Cart Abandonment) - fires 2 hours after a prospect is created. See more information on the Cart Abandonment feature here.

  • Subscription Canceled - fires when the Subscription Status turns to "Canceled” or "Delinquent."

  • Subscription Charged - fires each time your customer completes a successful recurring charge.

  • Subscription Charge Failed - fires when your customer experiences their first recurring payment failure.

  • Subscription Delinquent - fires when the Subscription Status turns to "delinquent." Delinquency occurs after 4 failed payments in a row. See more information on the Subscription Saver and Dunning feature here.

  • Subscription Recovered - fires when your customer is within the Dunning Cycle and updates their card on file prompting a successful charge.

  • Subscription Restarted - fires when you manually restart a user's subscription from either the fully delinquent status or canceled status.

  • Subscription Charge Refunded - fires when a refund occurs inside of SamCart for a customer's subscription charge.

  • Subscription Charge Partially Refunded - fires when a partial refund occurs inside of SamCart for a customer's subscription charge.

  • Upsell Purchased - fires when the product is purchased as an upsell.

Creating Global Integration Rules

Global Rules aren't too different from Product-Level Integration Rules, except for the fact that they're triggered by every Product in your Marketplace. For example, if you'd like all new customers, regardless of the Product they purchased, to be added as a Contact all with the same List, you'd create a Global Rule

To create a Global Rule in SamCart, head back to your Marketplace's Integration Settings and navigate to the inegration rules engine page.

Here, click on the Global Rules tab (1) and select New Rule (2):

Once you've done that, the steps to creating a Global Rule are identical to that of a Product-Level Integration Rule. Reference the "Creating Integration Rules at the Product Level:" section above for a detailed breakdown on how to proceed. 

After your Global Rule is created, it will appear under the Global Rules tab: 

Syncing E-commerce Data with HubSpot

Our HubSpot integration now allows for SamCart to post e-commerce data to your HubSpot e-commerce dashboard. If you have an existing HubSpot integration, the first step will be to reconnect the integration. If you just set up your HubSpot integration, you can skip ahead to Creating Integration Rules

Authenticating HubSpot

Navigate to SamCart’s Integration Engine and locate your HubSpot integration. Click Edit (1), and in the popup that appears select Reconnect with OAuth (2).

You will be redirected to HubSpot to log in and give SamCart the ability to post e-commerce data.

Next, navigate back to your SamCart Integration dashboard to Refresh the integration. This step only needs to be done once, and will ensure that SamCart receives custom field mapping and additional data from HubSpot.


Creating Integration Rules

Now that you have successfully reconnected with HubSpot, you can set up integration rules that will create a new e-commerce pipeline in HubSpot. SamCart order details will show in HubSpot's e-commerce dashboard, deal pipelines, and contact records.

After clicking New Rule, select either Order Completed, Subscription Charged, or Subscription Canceled as the trigger:

  • Order Completed - this will create an order in HubSpot's 'Checkout Completed' stage
  • Subscription Charged - this will create a record in HubSpot's 'Processed' stage
  • Subscription Canceled - this will create deals with a “Canceled” stage when a Subscription gets cancelled in SamCart.


Select HubSpot (1) as the Integration, and Sync Ecommerce Deal (2) as the action. Then click Next Step (3):


That’s it! On every order sent over to HubSpot, SamCart will create/update the following information:

  • Contact: name, email, phone number, billing address
  • Deal (SamCart's "Orders"): shipping & line item price, tax, quantity, discount (coupon amount) if applied
  • Product: name, description, price

Here is a list of triggers that you can use with the Sync Ecommerce Deal action:

Custom Field Mapping

To map custom fields, click on the Settings icon to open the integration mapping screen:


Click + Add Custom Field Mapping to select which SamCart Custom Field and HubSpot Contact Deal you want to map. Please note that, when mapping SamCart Custom Fields into custom properties in HubSpot, you will see a long list of custom properties to map to with prefixes of “Contacts” and “Deals.” Choosing the right mapping is important to ensure your data lands where you expect!


NOTE: You can only map SamCart Custom Fields to HubSpot custom properties that are the data type of “Text.” All non-text HubSpot custom properties with data such as date, multi-select, checkbox, etc. cannot be mapped to SamCart custom fields.

Frequently Asked Questions

Q: I've set up my integration correctly but nothing is showing up in HubSpot after running a Sandbox Mode/test order.

A: Check the email address you used in your Sandbox Mode/test order. If you used the same email address for another Contact already located in HubSpot, it's likely the Contact won't be added again. Try again using a different email address.

Q: My integration seems to be functioning properly, but a customer wasn't added seemingly at random. What happened? 

A: If an integration rule fails to fire, there's always a reason. The Integration Engine keeps a record of the last 1,000 integration events that took place in your Marketplace, and they can be viewed by heading to Marketplace Settings > Integrations > Logs.

Here, you can search for the event in question and check if anything went wrong. 99% of the time the Logs can provide insight into exactly what might've went wrong with that action. 

Q: The Tag I'm looking for isn't showing up when I try to create an integration rule. What should I do? 

A: If you don't see what you're looking for when creating a rule hit the Refresh button before looking again: 

If you created the List after you set up the integration with SamCart for the first time, there's a good chance you'll need to Refresh the list in order for it to fetch your current settings.  

Q: How can I delete, re-name, or refresh my integration if I made some changes in HubSpot? 

A: Head to Marketplace Settings > Integrations and click the Edit, Refresh, or Delete buttons to make these changes to your integration: 

Q: I've already integrated with HubSpot via the old integration system. Can I have both running?

A: There's nothing stopping you from running both at the same time, though we do recommend switching everything over to the new Integration Engine


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles