Develop > Presentation layer > Customize marketing > Marketing customization: Management Center > Customizing the Marketing tool to display catalog entry recommendations from an external system


Create the task command to retrieve external recommendations

By extending the DisplayExternalRecommendationActionTaskCmdImpl class, you can retrieve catalog entry recommendations from an external system for display on the store pages.


Before you begin

Review the following topic to ensure that you understand the class extend:

The default DisplayExternalRecommendationActionTaskCmdImpl class does not return any recommendations without customization. You must extend this class and implement the method getRecommendationsFromExternalSystem to retrieve a list of catalog entry IDs from the external system for display in an e-Marketing Spot.

The infrastructure for this customization also includes a prebuilt user interface (see the screen capture in Add support for external recommendations to the Management Center user interface). If this user interface does not provide the functions that meet your business needs, for example, to base the recommendations on the content of a customer's wish list, then there are additional methods you can extend in the DisplayExternalRecommendationActionTaskCmdImpl class. They are:


Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. Create a package for the task command file:

    1. Navigate to WebSphereCommerceServerExtensionsLogic > src.

    2. Right-click the src folder; then click New > Package.

    3. In the Name field, type com.your_company_name.marketing.commands.elements.

    4. Ensure that WebSphereCommerceServerExtensionsLogic/src is specified in the Source Folder field.

    5. Click Finish.

  3. In the new package, create a task command implementation that extends from the DisplayExternalRecommendationActionTaskCmdImpl class and implements the getRecommendationsFromExternalSystem method. If required, extend the validateParameters and performExecute methods in the class as well. Give the class a name that uses this syntax: external_recommendation_systemTaskCmdImpl; for example, MyRecommendationEngineTaskCmdImpl.

  4. Register the task command in the CMDREG table. Here is an example of a SQL statement that registers this type of task command:

    insert into cmdreg (STOREENT_ID, INTERFACENAME, CLASSNAME) values 
    (0, 'com.ibm.commerce.marketing.commands.elements.DisplayExternalRecommendationActionTaskCmd', 
    'com.mycompany.marketing.commands.elements.MyRecommendationEngineTaskCmdImpl');
    


Next topic: Add support for external recommendations to the Management Center user interface


+

Search Tips   |   Advanced Search