Variable Fields on Email Templates

Variable Fields on Email Templates

  
Hello,

I was wondering if we can create an email template with variables fields? Like expressions, but instead of doing it programmatically we do it on the published page instead. For example I would let the users put firstname and lastname values wherever they want on a created email body.
----------

Eg:

Dear {firstname} {lastname},

Hello {firstname}! How are you?

Sincerely,
Bob

-----------------

Any thoughts?

Thanks,
Gino
Hi Gino,

It's pretty easy to acheive
1) Create an Email with input parameters firstname, lastname,
2) design the body of the email with expressions for the above input parameters
3) set the subject for the e-mail (this could also be from another input parameter or an expression)
4) Create a Web Screen with two local variables firstname, lastname
5) Drag two Textboxes, set their variable attributes to the above local variables
6) Drag a button for sending the e-mail 
7) Double click the button to create an action, drag the e-mail screen from  the interface tab
8) set the email's  receipient in the "To" field, also set theinput parameters to use the local variables.

you could also set up the validation for the input textboxes and the button
is it possible to to create Dynamic email template without taking input paramertes.

what will happen if my template needed  30-40 dynamic values,should i need to create 30-40 input parameters ?

Depending on your requirement, you could use an entity for saving your records from the webscreen and make sure you do a commit action after the create action. then you could just pass the Id to the e-mail as the input parameter. add a preparation to the e-mail to fetch the data

You could also use the delete action after the email, if you dont want to save the data.

Hi Sudhakar,

Always avoid passing too many parameters  especially between WebScreens,
Wherever possible pass id's.
One immediate problem with passing many parameters is that you have to forsee the url length.
Charles Colaço can you pls tel me how can i use id's into email templates.
You can also take a look on eSpace example Campaigns where some tags are replaced by Time, User Data from a table, and other predictable information.
Charles Colaço wrote:
Hi Gino,

It's pretty easy to acheive
1) Create an Email with input parameters firstname, lastname,
2) design the body of the email with expressions for the above input parameters
3) set the subject for the e-mail (this could also be from another input parameter or an expression)
4) Create a Web Screen with two local variables firstname, lastname
5) Drag two Textboxes, set their variable attributes to the above local variables
6) Drag a button for sending the e-mail 
7) Double click the button to create an action, drag the e-mail screen from  the interface tab
8) set the email's  receipient in the "To" field, also set theinput parameters to use the local variables.

you could also set up the validation for the input textboxes and the button
 What if the user of the page has the ability to modify the email template along with the expressions within it?? This one assumes we have a fixed template on which we are the ones who put the firstname and lastname variables before publishing it right?

Thanks,
Gino
 
Nuno Reis wrote:
You can also take a look on eSpace example Campaigns where some tags are replaced by Time, User Data from a table, and other predictable information.
 I'll take a look. Thanks.