Difference between revisions of "Template Variables"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
:<blockquote>"Greetings ''Carl''! You're invited to Friday nite Yappy Hour at the Dog Owners Club! Hope to see you and ''Bruiser'' there! " </blockquote>
:<blockquote>"Greetings ''Carl''! You're invited to Friday nite Yappy Hour at the Dog Owners Club! Hope to see you and ''Bruiser'' there! " </blockquote>


==About Template Variables==
Template variables embedded into HTML templates provide this kind of merge capability.  
Template variables embedded into HTML templates provide this kind of merge capability.  
:''Learn more: [[HTML Resources]]''
:''Learn more: [[HTML Resources]]''


HTML templates can be used in these areas of the platform:
HTML templates can be used in many areas of the platform:
:{|
:{| border="1" cellpadding="5" cellspacing="1"
! Context !! Available Variables
 
! align="left"|Context  
! align="left"|Available Variables
 
|-
|-
| Email Marketing [[Campaigns]]  
|  
* Email Marketing [[Campaigns]]  
|
|
* [[Send_Email#Template_Variables_in_Campaigns|Template Variables in Campaigns]]
* [[Send_Email#Template_Variables_in_Campaigns|Template Variables in Campaigns]]


|-
|-
| [[Email Templates]] and Letterheads
|  
*[[Email Templates]] and Letterheads
*[[Web Form]] notifications and auto-response email messages
*[[Data Policies]] with Send Email actions
|
|
*[[Template Variables in Email Templates]]
*[[Template Variables in Email Templates]]
{{#if: {{ShowIsvInfo}} |:*[[Template Variables in Service Provider Email Messages]] }}
{{#if: {{ShowIsvInfo}} | *[[Template Variables in Service Provider Email Messages]] }}
   
   
|-
|-
| [[Print Templates]]
| [[Print Templates]]  
|
*[[Template Variable Tool]]
 
|-
|-
| [[Data Policies]] with Send Email actions
| GUI [[Actions]]  
|-
|
| [[Web Form]] notifications and auto-response email messages
*[[Template Variables for Component Actions]]
*[[Template Variables for Actions Using Execute JavaScript]]
 
|-
|-
| [[Workflow Templates]], which describe email communications from [[Workflows]]
| Emails from [[Workflow Templates]]
|
|
:*[[Template Variables for Actions in Components]]
*[[Template Variables in Workflows]]
:*[[Template Variables for Actions Using Execute JavaScript]]
*[[Template Variables in Email Templates]]
:*[[Template Variables in Workflows]]
{{#if: {{ShowIsvInfo}} | *[[Template Variables in Service Provider Email Messages]] }}
 
|}
|}


==Template Variable Tool==
==Template Variable Tool==
{{:Template Variable Contexts}}
{{:Template Variable Tool}}
{{:Template Variable Tool}}



Latest revision as of 02:13, 11 September 2013

Template Variables are used to personalize communications from the platform.

For example, instead of a generic "Dear Sir" salutation, messages can be personalized:

"Greetings Carl! You're invited to Friday nite Yappy Hour at the Dog Owners Club! Hope to see you and Bruiser there! "

About Template Variables

Template variables embedded into HTML templates provide this kind of merge capability.

Learn more: HTML Resources

HTML templates can be used in many areas of the platform:

Context Available Variables
Print Templates
GUI Actions
Emails from Workflow Templates

Template Variable Tool

Template variables have slightly different syntax in different contexts. The template variable tool gives you the possible variables, in the correct syntax for each context:

Email Templates Designer > Objects > {object} > Email Templates > {template}
Print Templates Designer > Objects > {object} > Print Templates > {template}
Actions Designer > Objects > {object} > Actions > {action} > Type:Execute JavaScript
Data Policies Designer > Objects > {object} > Data Policies > {policy} > [Add Action] > Send Email
Web Forms Designer > Objects > {object} > Web Forms > {web form} > Email Notification Details
Workflows Designer > Objects > {object} > Workflows > {workflow} > Notification Templates
Web Tabs Designer > Web Tabs > {web tab}
Components Designer > Components > {component}

In the Sales Force Automation application, to send Emails from Accounts, Contacts, and Prospects:

  • Workspace > All Items > Templates > {template}

For Service Provider emails:

  • Settings > Service Provider Settings > Manage Email Templates


Template Variable Syntax

Depending on where they are used, variables may need to be specified with braces (${variable}) or without them ($variable). (See Template Variable Resources for a list of contexts in which variables are available.)

Except for that difference, variables are standardized using the following syntax:

$objectname.fieldname
Where objectname is the name of the tab or object (Prospect, Account, Contact, etc.) and the fieldname is the name of the field (owner, description, etc.)
Second-degree Related Objects

Second-degree related objects can also be used in templates, and provide the ability to to drill down to one level of the hierarchical lookup from the object.

Second-degree related object variables are standardized using the following syntax:

$objectname.fieldname.seconddegree
Where objectname is the name of the tab or object (Prospect, Account, Contact, etc.), fieldname is the name of the field (owner, description, etc.) and seconddegree is the name of the second-degree related object
Examples
  • To include the email address of a primary contact in a prospect, use this syntax:
$prospect.primary_contact_id.email
  • To get the tax_type of an autopolicy insurer, use this syntax:
$autopolicy.insurer.tax_type
Where 'autopolicy' and 'insurer' are objects, and 'tax_type' is a field in the 'insurer' object

Template Variable Resources

Learn more about Template Variables: