Introduced in Feature Pack 1

Customizing digital wallet service modules

You can customize the digital wallet implementation using existing Business Object Document (BOD) service module customization best practices and using its additional extension points to add new wallet item types.

Before you begin

Ensure that you have completed the following prerequisite:

Procedure

  1. Customize the digital wallet BOD service module using existing BOD service module customization best practices. Perform this step when you want to retrieve extra data that comes from the WebSphere Commerce database. For example, assume you have an extra table that is associated with the wallet. When returning wallet information, you also want to return information from this table. You could use either UserData or overlay depending on the data.
  2. In addition to customizing the digital wallet BOD service module using existing BOD service module customization best practices, you can customize the digital wallet BOD service module using these additional extension points. Perform this step if you have some business logic that needs to be performed (rather than simply retrieving data from the database). For example, you need to call a service to get the data and then modify the data. You can use the following extension points to add new wallet item types:
    1. InsertMoreWalletItemTypeSpecificDataCmd

      This is a command called by InsertMoreWalletItemCmdImpl to populate the type-specific data of WalletItem nouns.

      For example, the following command implementation is used by the GetWalletItem service to insert coupon data:
      
      <cmdreg storeent_id="0" 
      interfacename="com.ibm.commerce.wallet.facade.server.commands.InsertMoreWalletItemTypeSpecificDataCmd+IBM_Store_Details.Coupon" 
      classname="com.ibm.commerce.wallet.facade.server.commands.InsertMoreWalletItemCouponDataCmdImpl"/>
      

      In addition, the WalletItem noun contains a Data noun part of type xsd:anyType. You can use a custom InsertMoreWalletItemTypeSpecificDataCmd implementation to populate this noun part with custom data.

    2. ProcessWalletItemTypeSpecificActionCmd

      This is a command called by the ProcessWalletItemActionCmd implementations to perform type-specific nouns.

      For example, the following command implementation is used by the ProcessWalletItem (Delete) service to delete the coupon using the coupon manager in the promotion component:
      
      <cmdreg storeent_id="0" 
      interfacename="com.ibm.commerce.wallet.facade.server.commands.ProcessWalletItemTypeSpecificActionCmd+Delete.Coupon" 
      classname="com.ibm.commerce.wallet.facade.server.commands.ProcessWalletItemDeleteCouponActionCmdImpl"/>
      
    For example, when adding new wallet item types, you can introduce order receipts for your store by extending the digital wallet services. Perform the following tasks:
    1. Define the order receipt database schema.
    2. Extend the wallet item noun to support order receipts. That is, define the logical schema of the WalletItem noun's Data noun part.
    3. Extend the digital wallet services to support the addition of order receipts to a digital wallet.
    4. Extend the appropriate order and payment commands, for example, OrderProcess, to create order receipts and add them to digital wallets by calling the digital wallet services.
    5. Extend the starter stores to support the displaying of order receipts by calling the digital wallet services.
  3. Deploy your customizations using the BOD command framework and the data service layer.