Tuesday, March 9, 2021

#836 - OIC --> HubSpot to Netsuite - Product Sync

Another typical use case between CRM and ERP. The Products listed in CRM must be available in ERP for payments processing, inventory etc. So who should be the master here? I assume ERP.

So Product seeding should be part of the initial HubSpot setup for your company. The basic pattern is as follows - 

Further relevant (e.g. pricing info etc.) Item/Product changes in Netsuite can then be pushed to HubSpot in real-time.

The Logic is simple - read the products from Netsuite, write to HubSpot. Add a custom field/property to the HubSpot Product object to hold the Netsuite Product Id.

If only the real world was so simple - mirroring reality, Netsuite has different types of items - 

Inventory Items - think of physical goods e.g. a bicycle.

Assembly Items - goods made from assembled parts.

Non-Inventory Items - non-physical goods/services - no need for inventory management e.g. a subscription to a cloud service.

I will only consider Inventory Items in this example. Now let's look at the basic Product properties in HubSpot - 



Relatively simple. Now let's look at the HubSpot Product api -

Now, I need to get the internal HubSpot filed names, before trying this out in Postman -

For example the sku field is actually called hs_sku. These internal values can be found here -



Here is the Postman Test and the result in HubSpot -

Ok, so that's HubSpot sorted, now to retrieving the Inventory Items from Netsuite - 

I create a Saved Search in Netsuite to retrieve the salient product information.

This saved Search is then invoked by an OIC integration - again this is a scheduled job which leverages the OIC Netsuite adapter to execute the Saved Search -


Naturally, I will augment this integration, adding a scheduled parameter - dateLastRun. This value will then be used in the Map to GetInventoryItems above - but that's for later. Let's get the basic flow completed.

I create a REST Connection for HubSpot and configure CreateHubSpotProduct as follows - 

Now to the mapping - 

Note the array of name value pairs. I have 6 of these in my Postman request, so I will create 6 pairs.

Now to create the first pair - product name and it's value.

I complete the mappings for the other Product properties.

Then a test - 

I check in HubSpot - 

I check out the iBike - 

All I need to do is add the Netsuite item id to the HubSpot UI - 

Naturally, I can do the same on the Netsuite side - updating a custom field e.g. HubSpotProductId, on the Item object, with the following value -

Now I turn to real-time pricing updates between Netsuite and our CRM app, be that SFDC or HubSpot. The basic pattern is as follows - 

This will be covered in the next post.

No comments: