Example 6 – Integrating XML with personalisation – recommendations
Details for the example |
|
---|---|
Data source |
XML file; generated by Recommendation Engine |
Transformation |
Yes |
Personalisation/ |
Yes |
Agent |
Content |
Time of the update |
Sending time |
Notes on the example
In this example, XML data generated by the econda Cross Sell recommendation solution is used as the data source. Recipient attributes from Inxmail Professional are transferred to the data source. A query is submitted to the data source, and the personalised recommendations are transferred to Inxmail Professional.
Through the transformation, the XML data is transformed to a DIV container and integrated into the mailing.
URL for data source – Recommendation Engine
https://content.crosssell.info/mailrecommendations.do?Uid=[$recID]
Transformation
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="productresponse">
<xsl:if test="size > 0">
<xsl:variable name="emcs0" select="widgetdetails/tracking/emcs0"/>
<xsl:variable name="emcs1" select="widgetdetails/tracking/emcs1"/>
<div style="width:900px; clear:both">
<xsl:for-each select="items/product">
<div align="center" style="width:190px; display:inline-block; right:left; margin: 0 20px 20px 0">
<a><xsl:attribute name="href"><xsl:value-of select="concat(deeplink,'?emcs0=',$emcs0,'&emcs1=',$emcs1)"/></xsl:attribute><img><xsl:attribute name="src"><xsl:value-of select="iconurl"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="name"/></xsl:attribute></img></a>
<br/>
<a><xsl:attribute name="href"><xsl:value-of select="concat(deeplink,'?emcs0=',$emcs0,'&emcs1=',$emcs1)"/></xsl:attribute><xsl:value-of select="name"/></a>
<br/>
<xsl:value-of select="price"/>
</div>
</xsl:for-each>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Display in the mailing