The goal is to have Valuemation decide automatically whether to use a German or English email body.
Let's consider an example in which the email is to be sent from a Ticket to its person responsible. The decision regarding used email body language will be made upon the value of 'Language' attribute specified for the given person.
- Create email template
Create an email template for the 'Ticket' object type.
Go to the 'Email Templates' catalog and call the 'Create' action'. In the 'New: Email Template' editor, specify necessary attributes.
New Email Template - 'Email template' tab
New Email Template - 'Object type' tab
- Create two alternative email bodies, one for English and another for German
Use 'Create' in the 'Email Bodies' reference list to create a new email body. Specify the 'Language' attribute as 'English' for one of the bodies and 'German' for the other. Specify only one of the languages as 'Default Language'. Fill in the 'Subject' and 'Text' fields of the English and German bodies with text in corresponding languages.
Our example also uses <%emf.getValue("personrequestedby.lastname")%> parameter to insert last name of the person to which the email is to be sent (in this case it is the person specified as 'requested by' in the source ticket object) to the greeting.
'Email Body' editor for the English version
'Email Bodies' tab of the 'Email Body' editor
- Specify the 'Language Attribute' for the email template.
Go to the 'Object type' tab of the 'Email Template' editor and specify the 'Language Attribute'. The value of this attribute will decide which 'Email Body' is used.
New Email Template - 'Object type' tab - 'Language Attribute' specified
'Email Body' whose 'Language' attribute matches the value of 'Language' attribute of the person to which the email is sent will be used with the email.
Using 'personrequestedby.language' as 'Language Attribute' means that the email will use the email body whose language matches the language specified for the person used as 'requested by'.