Marketing dept at my company wants our system to send out an "order confirmation" email listing the products that were purchased as well as transaction details (coupon values applied, taxes, subtotals, totals, etc). Some transaction details will only be displayed in some emails where applicable.
Currently the system generates the content (HTML) of the email and it is just sent via SendGrid's SMTP (without using their templating system). Marketing wants to take control of the content via Hubspot and just have the system supply the data for the products and have Hubspot generate the content for the email so that Marketing can manipulate the look of the email without needing IT. This means that the template/email that Marketing creates need to support "looping" (to be able to get information about each product and generate the content for the product) as well as being able to hide content based on certain conditions.
How can this be accomplished in Hubspot email templates?
We are using the Single Send API to send values to the email. The "Purchase Receipt" use case example under the Single Send API section of the Transactional Email API link you sent is what we are trying to accomplish. However I also saw the note under the Custom Properties section of the Single Send API link that states
Note: Custom properties do not currently support arrays. To provide a listing in an email, one workaround is to build an HTML list (either with tables or ul) and specify it as a custom property.
It seems to me that any company sending a receipt email would want to include at least some product details in the email which is really not currently possible since custom properties don't support arrays. We are already implementing a feature to send HTML via the API but this is not the best solution from Marketing's perspective because anytime they need to change the layout of the product information, they need to wait on IT to make the change to the HTML that is being sent via the API rather than being able to edit the email in Hubspot themselves without having to wait on IT.
Since this is something Hubspot has identified as a common use case, when will the ability to loop through arrays of custom properties and conditionally hide and display sections of an email be available?
Sincere apologies for the delayed response. @cbarley is no longer with HubSpot and now has a new Community user, @cbarley10.
Yes, adding conditional and looping HubL support to Hubspot emails is a priority for the team. That said, they are not yet at a stage where we can offer definitive dates.
If you haven't already, I recommend subscribing to the Developer Changelog so that you are notified once this functionality becomes publicly available.
We now support looping in marketing email for Pro+ users with our new programmable email feature. You can take a look at the knowledge base article HERE.
Yes, adding conditional and looping HubL support to Hubspot emails is a priority for the team. That said, they are not yet at a stage where we can offer definitive dates.
Jan 21, 2021
B: It is getting close. I cannot provide an exact timeline, but it is definitely being worked on.
The timeline doesn't match up with the supposed priority of this fairly core feature. This doesn't feel like a multi-year lift when there's already a templating language that supports arrays.
Checking in on this as well. We've recently moved from Mandrill and it's a bit of a make-or-break feature. We can certainly build HTML before we send it over but it is not at all ideal.
Hi @Connor_Barley, I stumbled upon this thread when searching for a solution for a similar problem. In my case we want to have invoice-related data in our transactional emails, but without support for arrays in the Custom properties and conditional statements we have to generate chunks of the emails on our side before passing them on to Hubspot, which is terribly inefficient, and in a way it's making us reconsider the use of the transactional email altogether. It would be a great improvement to have this fixed in the near future.
So this is over a year old and I'm checking in on any progress here.
We just bought into the transactional email platform and moved away from Sendgrid. Not having this is, at the risk of sounding hyperbolic, almost inexcusable.
This would be like one of the very first things you’d want for any type of templating system.
It makes our work with your transactional emails very messy and cumbersome.
Is there anything that's actually being done in this area? Not "it's in future plans" kind of scenario. Rather something we can expect in order to make our move to use the transactional platform effective.
Sincere apologies for the delayed response. @cbarley is no longer with HubSpot and now has a new Community user, @cbarley10.
Yes, adding conditional and looping HubL support to Hubspot emails is a priority for the team. That said, they are not yet at a stage where we can offer definitive dates.
If you haven't already, I recommend subscribing to the Developer Changelog so that you are notified once this functionality becomes publicly available.
We are using the Single Send API to send values to the email. The "Purchase Receipt" use case example under the Single Send API section of the Transactional Email API link you sent is what we are trying to accomplish. However I also saw the note under the Custom Properties section of the Single Send API link that states
Note: Custom properties do not currently support arrays. To provide a listing in an email, one workaround is to build an HTML list (either with tables or ul) and specify it as a custom property.
It seems to me that any company sending a receipt email would want to include at least some product details in the email which is really not currently possible since custom properties don't support arrays. We are already implementing a feature to send HTML via the API but this is not the best solution from Marketing's perspective because anytime they need to change the layout of the product information, they need to wait on IT to make the change to the HTML that is being sent via the API rather than being able to edit the email in Hubspot themselves without having to wait on IT.
Since this is something Hubspot has identified as a common use case, when will the ability to loop through arrays of custom properties and conditionally hide and display sections of an email be available?
Hi @idimensionz, this can't be accomplished out of the box with HubSpot, but the Transactional Email API, and specifically the Single Send API can send an email after a purchase using our templates as well as custom properties from your external system along with HubSpot personalization tokens. Conditional statements using HubL cannot be used in the Marketing Email tool, as list segmentation and workflow automation handles most of the use cases for these scenarios.