Namespace Reference
Campaign
The campaign variables are defined in the campaign definition.
The following table shows all campaign variables.
Variable | Description |
---|---|
campaign.id |
The unique identifier of the campaign. |
campaign.name |
The name of the campaign. |
campaign.marketingprogram |
The specified marketing program in the campaign definition. |
campaign.marketingstrategy |
The specified marketing strategy in the campaign definition. |
campaign.externalcode |
The specified external campaign code as defined in the campaign. |
Datasource Hashes
Datasource namespaces, or hashes, contain the fields that are defined in the datasources user interface. The datasource appears as a top level hash, and its fields appear under that hash. Both the hash and its fields use the respective aliases for registration into the namespace.
For example, if you declared a namespace to provide email (from EMAIL_ADDRESS_) with the alias profile, you can specify the following interpolation:
${profile.email}
The above example obtains the EMAIL_ADDRESS_ of the individual record.
Environment
Launch
Launch contains the following elements:
Variable | Description |
---|---|
launch.id |
Defines the current unique identifier of the given launch. |
launch.type |
Describes the launch type. The value is one of the following: standard proof preview |
Message
Message describes attributes of the message campaign.
Variable | Description |
---|---|
message.format |
Defines the format being used to personalize the current message. It can be: “H”=HTML the format “T”=text format. |
NOTE: In some situations, two personalization datasources provide a field with the same name but different values. RPL uses only the first value, as per order in which the datasources were specified. Trying to access the second value using a Special Variables Reference.
RPL defines a set of special variables RPL. To access these variables, use the .variable_name syntax, for example, .version.
The following table lists all supported special variables.
About Fields and Field Types
The underlying data model is provided by multiple data sources. One of those data sources is the recipient record. The recipient record is the set of fields and values coming from the personalization datasources, including the profile list, PETs, etc.
RPL provides a way to reach the personalization record by utilizing the .fields and .field_types special variables. You can use these to see a summary of the fields when the debug flag is on, as shown in the following example.
<#if environment.debug>
<table cellspacing="0" cellpadding="0" border="1">
<tr><th>FIELD</th><th>VALUE</th><th>TYPE</th></tr>
<#list .fields?keys?sort as fieldname>
<tr>
<td>${fieldname}</td>
<td>${.fields[fieldname]}</td>
<td>#{.field_types[fieldname]}</td></tr>
</#list>
</table>
</#if>
Note: .fields and .field_types must be preceded by a period.