APIs & Integrations

CStefan
Member

Integrating Hubspot in Single Page App

I'm not sure I'm writing in the right place, so feel free to redirect me elsewhere. I have a question re. the best way to use Hubspot and integrate it within our platform.
 
We are using Hubspot for Contact management + tracking on the frontpage (classic HTML). Our product also has a separate App section (single-page app). Things are working great so far on the frontpage, with contacts being created and converted automatically, via embedded forms and chat widget.

Now, we'd like to move further and integrate Hubspot on the web app as well. For example, as customer progress through the app (e.g. create an account, finishe onboarding, purchase products, etc.), we'd like some of these properties to show up on the Contact, for the sales team. Of course, we have custom UI and we're not aiming for embedding Hubspot forms/UI components. And here come our questions:
  1. What's the best way to keep track of a Contact like this: Contacts API or Form Submissions at various steps?
  2. Are there any best practices on how this should be done?
  3. Is there a way to make all this work, but also handle the entire user flow, ever since they started from the frontpage (in case they accepted cookies)?
PS: One important aspect is that I'd prefer we don't use the Hubspot JS library, since that gets blocked by many ad blockers. As such, we can't practically use it as a real solution. So probably best approach is to use REST API, right?
0 Upvotes
dennisedson
Community Manager
Community Manager

Integrating Hubspot in Single Page App

Hey @CStefan 

Glad to see you are looking to up the game!

Want to introduce you to some Wizards of the Community.  @piersg , @Kevin-C and @tjoyce  know how to do just about everything 😀.  Prepare for magic 🎩

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
CStefan
Member

Integrating Hubspot in Single Page App

Thanks for the intro, @dennisedson . @piersg , @Kevin-C , @tjoyce , do you have any advice or best practices when it comes to Contacts API vs Forms API? Especially for situations such as mine, where I want to follow an user through a flow?

Kevin-C
Recognized Expert | Partner
Recognized Expert | Partner

Integrating Hubspot in Single Page App

Hey @CStefan Sorry about the delay.

 

I think the Key to these questions are the use cases.

The Forms API is designed to get and post form data and forms created in the CRM.

While the Contacts API is designed to get and updated contact data.

 

With what you've listed "…create an account, finished onboarding, purchase products,…"  would imagine you could use both. It really depends on your implementation.

 

I would familiar with the uses cases and methods for both APIs, architect out at least one solution per API using whimsical, lucid chart, or paper. This should help you establish your critical path andthe best route for your implementation.

 

Personally I'd use the Contacts API. This will allow you more flexibility in terms of account deletion, contact look up,  API limits, etc. And in the end your business case would be to sync markting data from your DB to the HS CRM. Which is a use case of the Contacts API.