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
Procedure
- 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.
- 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:
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 customInsertMoreWalletItemTypeSpecificDataCmd
implementation to populate this noun part with custom data.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:- Define the order receipt database schema.
- Extend the wallet item noun to support order receipts. That is, define the logical schema of the WalletItem noun's Data noun part.
- Extend the digital wallet services to support the addition of order receipts to a digital wallet.
- 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.
- Extend the starter stores to support the displaying of order receipts by calling the digital wallet services.
- Deploy your customizations using the BOD command framework and the data service layer.