Email Templates & Inserting variables

Hello,

I don’t think this has been asked elsewhere, so apologies if it has been addressed.

I am trying to create a template email that will automatically include details of an invoice that I have created, and get the workflow to automatically email the details of any invoice to a specified email address.

What I am trying to include is the product, quantity and then the total amount of the invoice. I’ve tried this both using quotes and invoices to no avail.

When I enter the following variables in the template email (set up to send a quote), and create a quote, I only get a blank email with the total amount at the bottom.

[b]$aos_products_quotes_part_number x $aos_products_quotes_product_qty

$aos_quotes_total_amount
[/b]

Any help would be much appreciated B)

Craig

Craig,

The quote email template requires line items to be formatted as a table.

See wiki page for more info.

You can also use the sample quote template as a starting point, as it has one version of the table with line items already completed.

Best of luck,
Scott

HI Scott,

Thanks for this.

The obstacle I am finding though, is when I create an invoice, I want to automatically email that invoice.

So, I’ve created a workflow based on a condition of the invoice, to trigger an email template, but the template doesn’t include the line items in the invoice. (if that makes sense). I tried as you suggested inputting the variables in tables, but it doesn’t seem to want to work (specifically for the line items). Everything else seems to populate, e.g. grand total, due date etc.

Craig

Craig,

I see your issue now, and it appears there is some custom code that populates the line items on a quotation. When viewing a quotation, you have the option to Print as PDF, Email PDF, or Email Quotation. The first two options, as one would guess, generate a PDF document using the selected PDF Template. The third option, Email Quotation, uses the selected PDF Template as an email template; instead of generating a PDF file, it outputs to the email body itself.

Unfortunately, the Workflow module does not give you the option of generating an email from a PDF template, so it looks like you are going to have to write some code. I may be heading down this same path soon, so I will let you know if I come up with anything.

Scott

1 Like

HI Scott

Thanks for your reply.

I wondered about this - it did seem peculiar that some things came through and populated on the email and I couldn’t for the life of me figure out why it didn’t pick up the individual line items :).

I’d be very grateful if you do come up with something :0).

Thanks for your quick response Scott.

Best, Craig

hello,

did anyone has a solution for this issue.
What i am looking for is an extra row for an “Insert Variable”. You can see it in the screenshot in the attachments. Can anyone help me ?

Thanks in advance
Regards
Suhl