CMS Development

jk_br
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Styled RSS content

Résolue

Good morning

 

I have a request to pull product data from a RSS feed or from HS products and display those in the classic format in mail campaigns.

So far it looks like we dont have styles or a layout when it comes to RSS feeds, is that correct? Does somebody have additional input on that topic?

 

Thanks, Jay

 

Bildschirmfoto 2021-02-18 um 08.37.30.pngBildschirmfoto 2021-02-18 um 08.37.15.png

0 Votes
1 Solution acceptée
alyssamwilie
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

Styled RSS content

Résolue

@jk_br I meant you can use HS Products and then use the CRM Objects code to pull the products in. You don't need to create custom objects to use the CRM Objects code as it also allows you to pull info from Hubspot standard objects (aka Products). And, yea, for images you can just do a text field and put in the image URL.

 

@dennisedson If they don't need to connect the products to deals or anything like that than, yeah, HubDB would probably be the better option here. And it has an image field.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

Voir la solution dans l'envoi d'origine

8 Réponses
StephanieStix
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Styled RSS content

Résolue

Thanks for the info on if statements and the example filter!

 

As for the custom properties not being shown, we've found that specifying a list of properties to be returned was the solution to having our custom properties displayed as well.

{% set products = crm_objects("product", "limit=10", "name, customimage, ip__ecomm_bridge__image_url, price, description") %}

 

0 Votes
StephanieStix
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Styled RSS content

Résolue

@alyssamwilie thanks for the suggestion to use Products instead, that's great!

I've been testing this and played around with it a litte, however, I can't seem to make the image work. We also have the Ecommerce Bridge connected to sync products with webshops in the next step. I've created products manually so far but i didn't have any output for the image field (ip__ecomm_bridge__image_url). I've also tried a custom property of the same kind (single line text) but the same issue, so i might have my syntax turned around a little.

 

{% set products = crm_objects("product", "limit=10") %}
{% for product in products.results %}
    <img src="{{ product.customimage }}">
    <img src="{{ product.ip__ecomm_bridge__image_url }}">
    {{ product.name }}
    {{ product.price }}
    {{product.description}}
{% endfor %}

 

The output for name, price and description works fine; Ecommerce bridge and custom Product properties are staying blank though. Is there another part required in the variable? (for instance like module.image.src for image fields)

 

Would it also be possibly to restrict displayed Products by category?

In theory, it should work if there was a property "category" and an if-statement within the for-loop. That way different product categories could be send to segmented lists of contacts.

 

alyssamwilie
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

Styled RSS content

Résolue

@StephanieStix .

I don't see any issue with your code. Are you sure there's working image urls added to the fields in the products? Are you sure there's not a typo in the field name? 

 

As for your other question - if statements on properties are unfortunately not available in email (though I hear there's something in the works to change that) so you would need to create separate emails for the different categories and set a filter on the crm_objects to get the category you want.

 

{% set products = crm_objects("product", "limit=10&category=Category Name") %}

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
jk_br
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Styled RSS content

Résolue

Good morning

 

Thanks. As you mentioned, we need it a bit layouted and styled like you see in the initial post, so let me recap: we would not pull data directly from the feed into the mails, and we would not use the HS products. We would instead use custom objects cause those can do the job and can be layouted and I would create a loop and maybe select the ones I want by using a property. Correct so far?

 

Since there is no image field type in hubspot would you rather recommend creating files in hubspot and store the link with the custom objects or can we link them externally and the images get cached by HS while sending?

 

Thanks again

Jay

0 Votes
alyssamwilie
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

Styled RSS content

Résolue

@jk_br I meant you can use HS Products and then use the CRM Objects code to pull the products in. You don't need to create custom objects to use the CRM Objects code as it also allows you to pull info from Hubspot standard objects (aka Products). And, yea, for images you can just do a text field and put in the image URL.

 

@dennisedson If they don't need to connect the products to deals or anything like that than, yeah, HubDB would probably be the better option here. And it has an image field.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Styled RSS content

Résolue

@jk_br , @alyssamwilie 

I am wondering if HubDB would be more appropriate here.

0 Votes
alyssamwilie
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

Styled RSS content

Résolue

@jk_br Yea, if you want to go the RSS route the link @dennisedson gave is a good place to start. If you want it more customized you can clone the RSS Listing module in the Design Manager to update it to your needs. However I think this only shows recently posted items?

 

For this use case products may be the better option. You can create a custom email module and use CRM Objects to pull in product information.

 

{% set products = crm_objects("product", "limit=10") %}
{% for product in products.results %}
  {{ product.name }}
{% endfor %}

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Styled RSS content

Résolue

Hello @jk_br 

There should be some info about rss email template here

@alyssamwilie is an expert all things email and might have additional thoughts.

0 Votes