Include Line Item Info in Deals Pipeline automated email

I have a deal with line items from our products category. I would like to include in the email sent to the internal team and to the customer what they have ordered. That information is captured in the line-items. However, line items (or other associations) are not avaliable to use in the email. Is it possible to include that information?

Line Items: 2 Hats

Pipeline: Send Internal Email

Email Template:

Hi @KKard,
I love to read your post, thank you for checking with the Community!
I understand that you’d like to have line items data into an internal email notification.
On a similar thread “Automated pipeline e-mail based on line items” I have found for you the solutions from @franksteiner79 and @jolle that might help you.
Also, I tested on my own portal and you should be able to “edit available data” to add the “Line item” properties (see screenshot below):

I also wanted to invite a couple of subject matter experts to this conversation: Hi @LouiseHare, @Jnix284 and @MandyDROS do you have suggestions to help @KKard, please?
If anybody else has anything to add and/or share, please feel free to join in the conversation :slightly_smiling_face:
Thanks a lot and have a fantastic day!
Best,
Bérangère

Hi @KKard ,

I think what @BérangèreL has suggested here is the easiest way to get this to work. The only issue with it might be that you can only reference one line item - either the most recently updated or the most recently created.

If this notification is very important to send, you could potentially create a programmable email (which requires Marketing Hub Pro) and then send the notification as a marketing email. Which would require creating your users as contacts and an internal subscription type. Not the cleanest solution but a potential option.

Hope this helps,

Louise Hare she/her
Freelance HubSpot Expert
If my reply helped to answer your question please mark it as a solution to make iteasier for others to find!

You can created a custom email modules in programmable email and use the following code to retrieve line item information:

{# {% set dealId = getattr(contact, module.deal_id_property) %} #}

{% set dealId = 352930242758 %}

{% set deal = crm_object("deal", dealId, "dealname,hs_object_id") %}

{% set line_items = crm_associations(dealId, "HUBSPOT_DEFINED", 19, "limit=20", "name,hs_object_id", true) %}
{% for line_item in line_items.results %}
{{line_item.name}}
{% endfor %}