Event-Triggered Campaigns with ExternalXML
This section describes how to create an event-triggered campaign using an ExternalXML element followed by scenarios that use this campaign:
Send a message to a subscribed customer
Send a message to a customer who is not subscribed
Create a new customer and send a message
Update a customer and send a message
XSL
The campaign uses the following XSL.
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>Your CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="//ExternalXML/catalog/cd"> <tr> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="artist"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template></xsl:stylesheet> Testing the Campaign using a Staging Message
Stage the content. To stage an event-triggered campaign that expects ExternalXML data, you need to enter sample data that is available in the ExternalXML tag (including the ExternalXML tag). For example, you can use the following sample data for staging the content in this example:
<ExternalXML><catalog><cd><title>Empire Burlesque</title><artist>Bob Dylan</artist><country>USA</country><company>Columbia</company><price>10.90</price><year>1985</year></cd><cd><title>Greatest Hits</title><artist>Dolly Parton</artist><country>USA</country><company>RCA</company><price>9.90</price><year>1982</year></cd></catalog></ExternalXML>Schedule the campaign.
Approve the content and launch.
Launch the campaign.