Coding an email module - Getting custom properties from lineitems into email

Hi there,

I am trying to create an email module where lineitems will be listed according to the associated deal.

Every lineitem needs to include 5 properties(same everytime), whereas 3 of them is custom. After this, it ends with a line(--------), and the next lineitem(with props) will be listed. etc, etc

My problem is to get the custom properties inserted into the email.

When i preview it, it just doesnt show anything where they should be.

Any suggestions to this? :slightly_smiling_face:

It all seems pretty standard, but i cant seem to find the problem here.

Email-module mockup:

Hi, @IOspect

Quick request, can you please share your code example as a reply? You can use the code block formatter to keep things neat.

Troubleshooting from a code example is always easier for our community members. You didn’t do anything wrong, my goal is to increase the odds of you getting a helpful reply.

Thank you! — Jaycee

{#//module.html#}
<br>
<br>
<span style="font-family: Arial; font-size: 15px;">

{% email_each list="deal.line_items" item="line_item" %}
<ul>
<li>Produkt: {{ personalization_token('line_item.name', 'name') }}</li>
<li>Kampagne start: {{ personalization_token('line_item.Kampagne_start','') }}</li>
<li>Kampagne **bleep**: {{ personalization_token('line_item.Kampagne_slut', '') }}</li>
<li>Visninger: {{ personalization_token('line_item.Visninger_lineitem', 'Ikke relevant') }}</li>
<li>Vilkår: {{ personalization_token('line_item.Description', '') }}</li>
<li>Note: {{ personalization_token('line_item.Note_til_produkt', '') }}</li>
</ul>
{% endemail_each %}
<br>

Hi Jaycee,

Thanks for the advice, i see that it makes it better :slightly_smiling_face:

UPDATE:

I solved this by publishing it and testing it through a workflow.

The issue was that the “review” when making the email cant work with product properties. So to test the code and solution, i needed to run it live.

That is definetly something i will write down to remember :wink: