Migrate > Take the first steps after WebSphere Commerce migration > Migrating promotions
Partial migration XSL template
If you are performing a partial migration of promotions built on custom promotion types, you can copy and paste the following XML snippet as a starting point to create the required custom XSL template for each promotion type.
XSL template
<?xml version="1.0" encoding="UTF-8" ?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="PromotionMigrationTemplate" match="/"> <!-- handle default promotion rule --> <PromotionMigrationData> <px_promoauth> <promotionType> <xsl:value-of select="Promotion/CorrespondingRBDTypeName" /> </promotionType> <dailyStartTime> <xsl:value-of select="Promotion/Schedule/TimeWithinADay/Start" /> </dailyStartTime> <dailyEndTime> <xsl:value-of select="Promotion/Schedule/TimeWithinADay/End" /> </dailyEndTime> <xsl:for-each select="Promotion/Schedule/Week/WeekDay"> <xsl:choose> <xsl:when test=".='SUNDAY'"> <weekday_sun>1</weekday_sun> </xsl:when> <xsl:when test=".='MONDAY'"> <weekday_mon>1</weekday_mon> </xsl:when> <xsl:when test=".='TUESDAY'"> <weekday_tue>1</weekday_tue> </xsl:when> <xsl:when test=".='WEDNESDAY'"> <weekday_wed>1</weekday_wed> </xsl:when> <xsl:when test=".='THURSDAY'"> <weekday_thu>1</weekday_thu> </xsl:when> <xsl:when test=".='FRIDAY'"> <weekday_fri>1</weekday_fri> </xsl:when> <xsl:when test=".='SATURDAY'"> <weekday_sat>1</weekday_sat> </xsl:when> </xsl:choose> </xsl:for-each> <comments> <xsl:value-of select="Promotion/TypedNLDescription/Description[@type='admin']" /> </comments> </px_promoauth> <xsl:choose> <xsl:when test="Promotion/PromotionCodeRequired='true'"> <PromotionCodeCue> <xsl:value-of select="Promotion/PromotionCodeCue" /> </PromotionCodeCue> </xsl:when> </xsl:choose> <xsl:for-each select="Promotion/TypedNLDescription/Description"> <px_description> <language> <xsl:value-of select="@locale" /> </language> <type> <xsl:value-of select="@type" /> </type> <description> <xsl:value-of select="." /> </description> </px_description> </xsl:for-each> </PromotionMigrationData> </xsl:template> </xsl:transform>
Related tasks
Migrate promotions built on default promotion types: complete migration
Migrate promotions: partial migration