Introduced in Feature Pack 1

Customizing the store JSP file to pass the custom parameter to the Atom feed URL

Your custom parameter must be included in the e-Marketing Spot feed URL so that your new Java class can detect the parameter and pass it to the marketing services. The following procedure provides an example of how you can pass the custom parameter to the feed URL using the Madisons starter store pages. This involves adding code to the RemoteWidgetButtons.jsp file, which is used in the Madisons starter store for the Share and Subscribe links for e-Marketing Spot feeds and remote widgets.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Open the JSP file at this path:

    WCDE_installdir/workspace/Stores/WebContent/Madisons/Snippets/Marketing/ESpot/RemoteWidgetButtons.jsp

  3. Within the JSP file, locate the following lines of code:
    <c:set var="feedURL" value="${param.feedURL}"/>
    <c:if test="${contentPersonalizationId != null}">
     <c:set var="feedURL" value="${feedURL}&contentPersonalizationId=${contentPersonalizationId}"/>
    </c:if>
  4. Below the previous lines of code, paste the following code snippet to pass in your custom parameter to the e-Marketing Spot Atom feed:
    <c:if test="${customParameter != null}">
     <c:set var="feedURL" value="${feedURL}&customParameter=${customParameter}"/>
    </c:if>
    
    
  5. Replace customParameter with the name of your custom parameter.
    This assumes that your custom parameter value is stored in the variable called customParameter, and that the variable is populated from the store database records.
    Here is an example of a code snippet to pass in a custom loyaltyId parameter:
    <c:if test="${loyaltyId != null}">
     <c:set var="feedURL" value="${feedURL}&loyaltyId=${loyaltyId}"/>
    </c:if>
  6. Save and close the JSP file.
  7. Test your customization by recreating the scenario that you required the custom parameter for on the storefront.

    For example, for the loyaltyId parameter scenario, you could run a Web activity in the e-Marketing Spot that uses either the Current Page target or the Online Behavior target. These targets detect URL parameters to personalize Web activities. You could then log on to the store as a test customer with a specific loyalty program level. As a test customer, subscribe to the e-Marketing Spot feed and verify that the Web activity is returning the correct product recommendation based on the loyaltyId URL parameter value.

  8. Deploy your customized code.