CMS Development

Snuglas
Member | Platinum Partner
Member | Platinum Partner

Shopify Integration - CRM Objects and Templating

Hello,

We have a client's Shopify store linked to their HubSpot portal. All of the products are present in the HubSpot Product Library -- no problem there.

What we're having trouble with is that using the hubl function here: 

crm_objects('product', 'limit=100')

Gives us a list of objects containing Price, Name, CreatedAt, and ID properties, but nothing in the way of the product description or anything else. How can I get some of the other fields that represent a Shopify product like the description or product tags? I know they're in HubSpot somewhere since those fields show up in the Product Library.

Can anyone help with this? Is this documented anywhere?

 
4 Replies 4
BSupport
Member

Shopify Integration - CRM Objects and Templating

because both shopify and hubspot both support rest api so you can use an alternative solution for connecting to both Shopify and Hubspot via a MiddleWare.
You can check more detail in this page to see how it works: Shopify Integration 

0 Upvotes
Elocus
Member

Shopify Integration - CRM Objects and Templating

I additionally desired to percentage an Industry meet up we hosted some time lower back on the Fitness Industry as you talked about, there are direct parallels between your practices.

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Shopify Integration - CRM Objects and Templating

Hi @Snuglas,

 

Happy to provide some context on this for you. The product description is stored in a product property named "ip__shopify__body_html". You can indeed use additional data in your request. For instance the below:

 

{% set shopify_products = crm_objects("product", "limit=100", "name,ip__shopify__body_html") %} 
{{ shopify_products }}

 Would output the following in my instance:

 

{has_more=false, offset=30, total=30, results=[{name=Gordon Ramsay Ultimate Fit Food, ip__shopify__body_html=
These are my go-to recipes when I want to eat well at home. My great hope is that they will inspire you to get cooking to improve your own health whatever your personal goal.' GORDON RAMSAY The dream combination - a Michelin-starred superchef who is also a committed athlete. Gordon knows how important it is to eat well, whether you're training for a triathlon or just leading a busy active life. And just because it's healthy food you don't have to compromise on taste and flavour. The book is divided into three sections, each one offering breakfasts, lunches, suppers, sides and snacks with different health-boosting benefits. The Healthy section consists of nourishing recipes for general wellbeing; the Lean recipes encourage healthy weight loss; and the Fit section features pre- and post-workout dishes to build strength and energise. This is the ultimate collection of recipes that you'll enjoy cooking and eating, and will leave you in great shape whatever your fitness goals.
'These are my go-to recipes when I want to eat well at home. My great hope is that they will inspire you to get cooking to improve your own health whatever your personal goal.' GORDON RAMSAY The dream combination - a Michelin-starred superchef who is also a committed athlete. Gordon knows how important it is to eat well, whether you're training for a triathlon or just leading a busy active life. And just because it's healthy food you don't have to compromise on taste and flavour. The book is divided into three sections, each one offering breakfasts, lunches, suppers, sides and snacks with different health-boosting benefits. The Healthy section consists of nourishing recipes for general wellbeing; the Lean recipes encourage healthy weight loss; and the Fit section features pre- and post-workout dishes to build strength and energise. This is the ultimate collection of recipes that you'll enjoy cooking and eating, and will leave you in great shape whatever your fitness goals.

In full transparency you can use all of the following product properties with this hubl function:

 

{% set shopify_products = crm_objects("product", "limit=100", "name,ip__shopify__body_html,ip__shopify__tags, ip__shopify__images, createdate, price, ip__shopify__vendor, ip__shopify__published_at, ip__shopify__handle, ip__shopify__product_type") %} 
<ul>
{% for product in shopify_products.results %}
<li><strong>Product Name/Title:</strong> {{ product.name }}</li>
<li><strong>Product Description:</strong> {{ product.ip__shopify__body_html }}</li>
<li><strong>Product Tags:</strong> {{ product.ip__shopify__tags }}</li>
<li><strong>Product Image:</strong> {{ product.ip__shopify__images }}</li>
<li><strong>Product Created Date:</strong> {{ product.createdate }}</li>
<li><strong>Product Price:</strong> {{ product.price }}</li>
<li><strong>Product Vendor:</strong> {{ product.ip__shopify__vendor }}</li>
<li><strong>Product Published:</strong> {{ product.ip__shopify__published_at }}</li>
<li><strong>Product Handle:</strong> {{ product.ip__shopify__handle }}</li>
<li><strong>Product Type:</strong> {{ product.ip__shopify__product_type }}</li>
<br>
{% endfor %}
</ul>
Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
ahmedjamaltariq
Member | Platinum Partner
Member | Platinum Partner

Shopify Integration - CRM Objects and Templating

@jackcoldrick  How can we fetch Shopify product URL?

0 Upvotes