I am having trouble displaying personalization tokens for line items in our emails. When integrating a personalization token for a line item, the only value that appears is the default value (null in my case).
It is odd because I am able to retrieve the correct information when using the personalization tokens for the deal. It just will not work for line items. Even though the line items is associated with the deal.
Am I missing something? A speedy response would be very helpful since my subscription is running up soon. I would like to publish my workflow before then so I can decide to re-subscribe again.
I got the answer directtly from support! Personalization tokens are not supported when using standalone line items (no eccomerce connection). So if you created the line item manually the personalzation token will not work.
The only work around I found was to create a custom module and use HTML / HUBL code to display the line item properties.
Code used:
{% email_each list="deal.line_items" item="line_item" %} /// THIS IS WHERE YOUR LINE ITEMS GO {% endemail_each %}
Apologies, looks like I jumped the gun. When I looked into this further its just the ability to add line items from a cart and as long as you have Magento\Shopify etc
I got the answer directtly from support! Personalization tokens are not supported when using standalone line items (no eccomerce connection). So if you created the line item manually the personalzation token will not work.
The only work around I found was to create a custom module and use HTML / HUBL code to display the line item properties.
Code used:
{% email_each list="deal.line_items" item="line_item" %} /// THIS IS WHERE YOUR LINE ITEMS GO {% endemail_each %}
This is great! I'm just getting into HubSpot custom modules. I want to create a marketing email that triggers from a workflow to send. I want it to include the line items from the deal. Where would I use the snippet: {% email_each list="deal.line_items" item="line_item" %} /// THIS IS WHERE YOUR LINE ITEMS GO {% endemail_each %}
It has been a long time since doing this project so forgive me if I am not all that helpful. In my example I created a "Line-Items in Email" module within the email template and then edited the code to display the items unique to the person receiving the email.
I remeber having to use the Products & Qoutes functionality inorder to get that code working. Since the code used above is referencing the product line items. As you can see here I created two items in my product list.
As for testing my code, I basically created a dummy "Contact" and assigned them one of the two products. Then when I sent out the email, it would populate based on which product I assigned to them.
Sorry, I wish I can remember more of how I acheived this. My best advice would be to get in contact with support thye were super helpful and turned my week long project into an hour long project.
I ended up finding some abandoned cart code that I'm modified and I think between what you provided, thanks again, and this, I'll be able to work it out. 🙂
The workflow works perfectly fine. I am able to recieve the email with the personalization tokens but the line item personalization tokens are the defualt values. However, the deal personalization tokens are getting the correct information.
Here is the Email format:
Here is the Email I receive:
Here is the line item in this particular deal:
It is quite odd why the deal personalization tokens work but the line items personalzation tokens do not.
In your test, is the email sent without the personalization token or is it not sent at all? Have you check the workflow history tab for any clues?
It's hard to tell without being able to access these assets – since you're on a Professional subscription, I'd recommend reaching out to HubSpot support. They can help identify the issue right in your portal.
Best regards!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
Line item personalization tokens are only valid in deal-based workflow emails – could you confirm you're working on a deal-based workflow and not a contact-based workflow?
Hope this helps!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
Here is my deal workflow for this deal stage. The email I am trying to add the line item personalization to is called "Abandon Cart - ABS".
Right now I have added two line items into the deal "Test - 4" as you can see below. "Test - 4" is using the deal workflow above and is in the "Checkout Stage - Shipping" stage.