Automatically add customers as a Contact in HubSpot and segment them into Lists with SamCart's HubSpot connection.
SamCart's App Marketplace 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 the Apps section of your marketplace to access the App Marketplace.
Once you are in the App Marketplace, you can search for the specific app you want to connect with! Search for HubSpot and click the Install button:
This will bring up a popup where you can click the Connect button to get started with connecting HubSpot and SamCart.
This will take you to a new secure page where you can select your HubSpot account and validate the SamCart and HubSpot connection. Choose the HubSpot account you'd like to connect with SamCart and click Choose Account:
After choosing your account, you will be taken to another secure page where you can see everything SamCart will be able to do with the HubSpot connection. On this page make sure to check the box allowing the connection, and then click Connect app.
You will be redirected back to the App Marketplace within SamCart once HubSpot has successfully connected! Here you can start creating rules for your connection.
Creating Connection Rules
Now that SamCart is connected to HubSpot, you'll need to establish simple rules that tell this connection what to do when certain actions take place in your SamCart Marketplace.
From within the HubSpot connection in the App Marketplace, click on the + Add New Rule button.
This will bring up a side window where you can create rules for this connection! Here you can select the action and trigger to tell this rule what to do.
First, you'll need to select what kind of rule you want to create, a Global Rule or a Product Specific Rule (1). Global Rules will apply to all products in your marketplace, while Product Specific Rules will only apply to the specific products you select.
The next step is to choose the Action (2) for this connection. The action is what will occur within HubSpot when this rule fires! The actions available for this connection are Add To List, Remove From List, Sync Ecommerce Deal and Update Custom Date Property.
Once you've chosen the Action, you will need to select the List Name (3) in HubSpot that you want customers to be added to or removed from as part of this rule. If you do not see the list you are looking for, click the Refresh Connection button in the top right corner of the window! NOTE: This section will change based on the Action you've selected. If you choose "Sync Ecommerce Deal" this section becomes an optional Deal Stage field, and if you choose "Update Custom Date Property" this section becomes a required Internal Property Name field.
The last thing you need to choose is a Trigger (4) for the rule. This is the event that will occur within SamCart to trigger the Action within HubSpot! NOTE: Each application has different Triggers available, and each action within HubSpot will allow different triggers. The following triggers are available in the HubSpot connection:
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 has 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.
- Subscription Completed - (for Limited Subscriptions only) fires when a limited subscription has it’s final successful charge.
The final step in creating this rule is clicking the Add Rule (5) button. And we're done! Now you can see your newly created rule in the HubSpot connection within the App Marketplace.
Creating Connection Rules at the Product Level
You can also create rules for a connection from directly within a product! If you are working within a product and wish to create a rule with the HubSpot connection, simply visit the product's Apps tab:
From here, click on the blue + Add New Rule button to start creating a rule with HubSpot for this product.
First, you'll need to Select the App or App Instance (1) you are wanting to create a rule for - in this case, you should select your HubSpot connection! The next step is to select any other products you want to add the rule to in the Select Additional Products (2) section. This step is optional and can be left blank if you do not wish to add the rule to any other products.
From here, the rest of the rule setup is exactly the same as when you create a rule from within the App Marketplace! Select the Action (3) for this connection - the action is what will occur within HubSpot when this rule fires! The actions available for this connection are Add To List, Remove From List, Sync Ecommerce Deal and Update Custom Date Property.
Once you've chosen the Action, you will need to select the List Name (4) in HubSpot that you want customers to be added to or removed from as part of this rule. If you do not see the list you are looking for, click the Refresh Connection button in the top right corner of the window! NOTE: This section will change based on the Action you've selected. If you choose "Sync Ecommerce Deal" this section becomes an optional Deal Stage field, and if you choose "Update Custom Date Property" this section becomes a required Internal Property Name field.
The last thing you need to choose is a Trigger (5) for the rule. This is the event that will occur within SamCart to trigger the Action within HubSpot! NOTE: Each application has different Triggers available. Check out the Creating Connection Rules section above for a full list of Triggers available with the HubSpot connection!
The final step in creating this rule is clicking the Add Rule (6) button. And we're done! Now you can see the rule you have created on the Apps tab of your product.
Syncing E-commerce Data with HubSpot
Our HubSpot connection now allows for SamCart to post e-commerce data to your HubSpot e-commerce dashboard! SamCart order details will show in HubSpot's e-commerce dashboard, deal pipelines, and contact records.
Navigate to SamCart’s App Marketplace and locate your HubSpot connection. Click the + Add New Rule button and select Sync Ecommerce Deal as the Action:
Click Add Rule to finish creating the rule, and 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 (in the example above, we used Order Completed):
- Order Completed
- Product Added to Order (More information about Add to Order here)
- Subscription Canceled
- Subscription Charged
Custom Field Mapping
To map custom fields, navigate to the HubSpot connection within the App Marketplace. Scroll down to the bottom of the page to the Mappings section.
Click + Add New Mapping to select which SamCart Custom Field (1) and HubSpot Contact Deals (2) 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! Click Add Mapping (3) to complete the mapping!
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 connection 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 connection seems to be functioning properly, but a customer wasn't added seemingly at random. What happened?
A: If a rule fails to fire, there's always a reason. Our system keeps a record of the last 1,000 events that took place in your Marketplace, and they can be viewed by heading to the HubSpot connection within the App Marketplace and scrolling down to the Logs section at the bottom of the page.
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! The Configuration logs will show you logs related to the configuration of the App Instance (connecting the app, refreshing the app, etc.), and the Action logs will show logs related to actions associated with the rules you have set up for the HubSpot connection.
Q: The List I'm looking for isn't showing up when I try to create a rule. What should I do?
A: If you don't see what you're looking for when creating a rule hit the Refresh Connection button before looking again:
If you created the List after you set up the connection 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 uninstall, update, or connect a new instance of my HubSpot connection?
A: Head to the Apps tab to access the App Marketplace and select the HubSpot connection. Click on the three dots to the right of the connection - this will bring up a few options! The Connect New App Instance button will allow you to connect a new instance of HubSpot (this is great if you have more than one HubSpot account you want to connect to SamCart!). The Change App Credentials button will allow you to update the credentials you are using to connect this instance of HubSpot within SamCart. The Uninstall App button will uninstall all instances of the app from SamCart, and any rules for that instance of HubSpot will no longer work.
Q: When creating a rule, I do not see my list. What do I do?
A: This is due to connections only showing some of your tags to help it load faster! If you start typing in the name of the tag/list then it'll appear. If you are still not seeing your tags/lists, you might need to “Refresh” the connection.