Sales Invoice Emails

Hi,

Looking for help related to invoice email fields and delivery.

When email delivered it doesn’t pickup the fields data.
Also, it gone to Spam folder. I am using Gmail smtp here.

Anyone know how to fix fields data and delivery issue?

Thank you :blush:

Anyone please help me on this?

I expect that the emails are going to SPAM folder because of the settings in the receiving email client rather than anything to do with Manager.

I am also having the same issue with placeholder/merge fields in email not being replaced with relevant data and just being sent in the email as text. Other programs I’ve used use the { } as indicators of a merge variable and some programs need those braces manually typed - ie can’t just COPY/PASTE the {variable}, but that doesn’t seem to be the case in Manager. I also can’t find anything regarding how to use them in the Forum or Guides.

If anyone can help, it would be greatly appreciated. Email templates are not quite useless without automatic replacement of placeholders, but they’re not far off useless either.

Thanks

Hello @AS_Grya,

Welcome to the forum @Eljay59,

Email Templates are written in Shopify Liquid templating language.

The wrappers for field names are double curly braces, i.e. {{fieldname}}.

Also, the field names used here are incorrect.

The field name for Customer name is {{recipient.name}}.

To get the Due date loaded into {{dueDate}}, you have this code:

{% for field in fields %} 
   {% if field.label == 'Due date' %}
      {% capture dueDate %}
         {{ field.text }}
      {% endcapture %}
   {% endif %}
{% endfor %}

To get the balance due loaded into {{balance}}, you have this code:

{% for total in table.totals %} 
   {% if forloop.last == true and total.label == 'Balance due' %}
      {% capture balance %}
         {{ total.number }}
      {% endcapture %}
   {% endif %}
{% endfor %}
1 Like

Thanks for that.
Are there any instructions anywhere about where that code should be written?

EDIT:

I think I have it figured out

Thanks

1 Like

Copy paste in the Subject
Invoice no. {{reference}} for {{ recipient.name }}

Copy paste in the email Body

=================
{% for total in table.totals %}
{% if total.label == “Total” %}
{% capture invoice_total %}{{ total.text }}{% endcapture %}
{% endif %}
{% endfor %}

{% for field in fields %}
{% if field.label == “Due date” %}
{% capture due_date %}{{ field.text }}{% endcapture %}
{% endif %}
{% endfor %}

Dear {{ recipient.name }},

Invoice no. {{ reference }} for total: {{ invoice_total }} due date {{due_date}}.

===========================================

Hope this will help

2 Likes