Adding support for personalized text in an e-Marketing Spot

You can add support for substitution variables by customizing JSP files for store pages that contain e-Marketing Spots. Business users can then personalize the text that customers see displayed in the e-Marketing Spot, for example, by substituting a customer's name into a text string.

About this task

This task explains how to customize a store page for this purpose. When this customization is in place, business users must create marketing content that uses the variable text identifiers defined in the store page. Business users can then display the content in the e-Marketing Spot by creating Web activities, or by specifying the content as default content for the e-Marketing Spot.

Procedure

  1. Define the variable text to display to the customer in the e-Marketing Spot and assign an identifier to each piece of variable text.

    For example, you might want to display the following text:

    Hi [FirstName], welcome back!

    In this example, the identifier assigned to the variable text is [FirstName].

  2. Edit the JSP file for the store page containing the e-Marketing Spot in which you want to display variable text.
  3. Within the JSP file, locate the <c:import tag for the specific e-Marketing Spot.
  4. For each piece of variable text that must be defined, add code within the <c:import tag that uses the following syntax:
    <c:param name="substitutionName1" value="[parameterName1]" />
    <c:param name="substitutionValue1" value="parameterValue1" />
    
    Where:
    • [parameterName1] is the identifier for the variable text.
    • parameterValue1 is the text to replace in the content.

    For example, to substitute the customer's first name in a text string, the lines of code to add to the JSP file might look like those shown below in bold text:

    <wcf:getData type="com.ibm.commerce.member.facade.datatypes.PersonType" var="person" expressionBuilder="findCurrentPerson">
        <wcf:param name="accessProfile" value="IBM_All" />
    </wcf:getData>
    
    <c:import url="${jspStoreDir}include/WebServiceeMarketingSpotDisplay.jsp">
        <c:param name="emsName" value="HelpPage" />
        <c:param name="substitutionName1" value="[FirstName]" />
        <c:param name="substitutionValue1" value="${person.contactInfo.contactName.firstName}" />
    </c:import>

    In the previous example, the first three lines use the Get Person service to retrieve information about the current customer.

  5. Save and close the JSP file.

What to do next

The e-Marketing Spot now supports the defined substitution variables. Business users can use the Marketing tool to create content to display in the e-Marketing Spot that uses the substitution variables. In the Marketing tool, the Content type must be Text for store page display, and the text entered in the Text field must use the identifier defined for the variable text. Based on the example in the previous procedure, the business user could enter this text:

Hi [FirstName], welcome back!