For every type of e-mail you want to send, the page developers working on your site create a JHTML or JSP template file that contains the body of the message. They include both the standard content (the text that is the same for every recipient) and the code elements that ATG uses to generate the personalized content.

The following example shows how the corresponding JSP file might look for the e-mail message above. Again, for the purposes of illustration, the code that produces the personalized content is shown in italic type:

<%@ taglib uri="/dspTaglib" prefix="dsp" %>
<%@ page import="atg.servlet.*"%>
<dsp:page>


<html>

<dsp:setvalue value="customerservice@pioneerbikes.com"
param="messageFrom"/>
<dsp:setvalue value="Order Confirmation" param="messageSubject"/>

<dsp:importbean bean="/atg/userprofiling/Profile"/>

<p>Dear <dsp:valueof bean="Profile.firstName"/>
<dsp:valueof bean="Profile.lastName"/>,

<p>Thank you for your order. We shipped it today to:<br>
<dsp:valueof bean="Profile.address"/><br>
<dsp:valueof bean="Profile.city"/>, <dsp:valueof bean="Profile.State"/>
<dsp:valueof bean="Profile.zipCode"/>

<p>May we suggest ordering these great products to complement your
<dsp:valueof bean="Profile.lastProductShipped"/>?

<p><dsp:droplet name="/atg/targeting/TargetingForEach">
<dsp:param bean="/targeters/crossellTargeter" name="targeter"/>
<dsp:oparam name="output">
<dsp:valueof param="element.name"/><br>
</dsp:oparam>
</dsp:droplet>

<p>Thank you for shopping with us!<br>
Sincerely,<br>
Customer Service<br>
Pioneer Bike Store

</html>

</BODY>
</HTML>

</dsp:page>

Note for page developers: In the e-mail template, you can include references to the message bean representing the scenario event that causes the system to send the e-mail. Consider the following example:

This diagram described in preceding text

In the body of the welcome.jsp e-mail, you can reference the properties of the Visits Page message, for example:

<dsp:valueof param="message.path"/>

This example would display the value of the message’s path property, which in this case is /login.jsp. For more information on how the Scenarios module uses message beans, refer to Using Scenario Events in the Personalization Programming Guide.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices