Email templates conditional

#1

Hello all,

I’d like to create an email template, where some of the text in the template differs depending on a field value in the deal itself. For instance I don’t want to add a headline for additional notes, if the additional notes field in the deal is empty.

[ if $notes ]
Additional notes with regards to this deal: [$notes]
[endif]

#2

Hey Troels,

We’re actually working on a new Feature for our email templates (2.0). It’s still in beta, but it would grab fields from Person/Org/Deal. Can you reach out to our support and ask them to have this enabled for your account?

#3

Hi David

Talked to support, and it turns out the beta is over and the new system has been released this week:

My original question still stands, as I can’t seem to find anything in the template editor.

Thanks in advance :slight_smile:

#4

Yeah, I was just informed on this as well that it’s no longer in beta. (now I have egg on my face :smiley: )

Perhaps I’m not understanding the original issue enough though. Do you think you could give me a direct example?

#5

Hey Troels,

You should be able to see a “Fields” option in the bottom of your composer now. Between “Templates” and “Signature”. You can insert fields from the Contact/Organisation/Deal sheet now, including custom fields, that would solve your case, as I understand it.

#6

Hehe, support didn’t know that at first either :-p

Perhaps my example was too simple.
I’m asking if the template engine can do conditions so we can make template react to the data in the deal.

For example, we have a custom field that tells us if the customer should pay VAT.
Depending on the value, the template will be different, like:


[if deal.should_pay_vat]
Your price is [deal.value] + VAT
[else]
Your price is [deal.value]
[endif]

#7

This is currently not possible. The values must be already in the custom fields and will be pulled as they are.

#8

Any plans to support this, for instance using a common javascript template like Nunjucks?