Mail Merge Tags
Mail merge tags are placeholders for customer information in your message populated from the customer records in the database. This allows you to personalize the message to your customers. The most commonly used mail merge tags are [First Name] and [Last Name], [Location], [date()]. When used in a message, Connect replaces the fields with the actual information from the customer record.
Note: Mail merge tags are defined in the Connect system parameters in the Connect Instance Administration section of the application. If you need specific tags, contact your Connect administrator for help.
For example, when messaging the customer Lucy Smith, the use of "Hello [First Name] [Last Name]" would return the message "Hello Lucy Smith".
Using Mail Merge
Merge tags are used in static email messages and are not supported in dynamic messages. For example:
Dear <%[First Name] [Last Name] &
[Spouse First Name] [Spouse Last Name],|Pacific Sunset Customer,%>
This example uses each customer's 'First Name' and 'Last Name' which are located in the database customer master record, along with 'Spouse First Name' and 'Spouse Last Name'. If the attribute values 'Spouse First Name' and 'Spouse Last Name' are missing, the message defaults to "Dear Pacific Sunset Customer." Every message begins with "Dear" regardless of whether the primary text or alternate text is used.
The following example will display the current date in the message:
Today's date is <%date:[date()],%>
You can insert additional mail merge tag attributes anywhere in the message body, not only in the subject line. The following example is a campaign for Pacific Sunset that sends customers an email confirmation for catalog orders.
<%[Order Number],|information not available,%>
and <%[Price],|information not available,%>
Each message has unique content specific to each customer (e.g. order number, item price). The customer-specific information is stored in the database as attributes and placed in the message where the tag resides.
Note: Connect tries to validate mail merge tags that appear in the content. If the syntax is incorrect, Connect will not be able to find or validate the tag. Ensure that you use the correct syntax for mail merge tags.
Mail Merge in Subject Line
Mail merge tags can be used to personalize the message subject line. For example, the subject line "<%[First Name]%>, we have a special discount for you!” will display the customer's first name followed by the message "we have a special discount for you!"
Mail Merge in Link or Image URL
Mail merge fields can also be incorporated into a link. This allows you to personalize a link for the customer in the message content. For example, if you have the following link in your content:
http://www.client.com/dyn.jsp?E-mail=<%[active e-mail address]%>
A customer whose e-mail address is [email protected], is redirected to http://www.client.com/[email protected] when the customer clicks the link after receiving the message.
Note: Web browsers interpret the percent sign (%) in a URL differently. You must be careful about text that follows immediately after '%' symbols in your mail merge tags. Any text that is not a field tag offset by brackets is ignored if placed immediately after %. For example, the word Dear is ignored because it comes just after the '%' in the message "<%Dear [first name] [last name]%>".
Ensure that you place 'Dear' outside of the mail merge tag (i.e. "Dear <% [first name]
. The best practice is to place Dear outside the mail merge tag. As in 'Dear <% [first name] [last name]%>'.
Tag |
Description |
Dynamic Field |
Each message is addressed to one customer and the name of each customer is different. This tag dynamically changes the tag content based on the customer’s first name. Dear <% [firstname]:%>: At run time, the system replaces [firstname] with the value of the firstname field from the customer record, dynamically changing the content for each customer. |
Empty Fields |
Connect supports alternative text if the primary field is empty. For example, if the user does not provide a name, the default value, Hello Member, replaces Dear. Make sure you use the alternative text mark '|' (pipe). For example: Dear<%[first_name] | Hello member%>. In the case of <%Dear [First Name] [Last Name]:%>: Connect will only publish the "Dear" personalized message if both [First Name]and [Last Name] fields are on the customer record. If a customer record only has the first or last name as part of the customer record, nothing will display in the message. |
Special Field |
You are able to use predefined macro fields or define your own. A macro field points to a Java class that dynamically calculates the content and can take other fields as parameters. For example, one of the default macro fields provided with Connect is date(). If you do not assign parameters defining the display of the date, the field displays the current date using a default format. It can display another date based on parameters (either event or attribute) and a format parameter. For example, the date field <%Date: [date()] %>: would display Date: Mon Apr 10 17:58:15 PDT 2011 The date field <%Date: [date(”mm-dd-yyyy”)] %>: would display Date: 04-10-2011 The date field <%Date: [date([evnt:purchase date], mm-dd-yyyy)]%>: with a purchase date of May 25, 2013 would display Date: 05-25-2013 |