WCS Doc
WCS Doc
WebSphere commerce server is a product where in any business can sell their products
online. The latest versions of WCS is no longer simply about presenting and selling
products online. It is about delivering a smarter shopping experience.
IBM WebSphere Commerce can be used by companies of all sizes, from small businesses, to
large enterprises, and for many different industries. It provides easy-to-use tools for
business users to centrally manage a cross-channel strategy. Business users can create and
manage precision marketing campaigns, promotions, catalog, and merchandising across all
sales channels. WebSphere Commerce is a single, unified platform that offers the ability to
do business directly with consumers (B2C), directly with businesses (B2B), and indirectly
through channel partners (indirect business models). WebSphere Commerce is a
customizable, scalable, and high availability solution that is built to leverage open
standards.
You should use the edition of WebSphere Commerce that matches to your business:
There are three editions of WebSphere Commerce. Each edition provides an increasing set
of functionality:
WebSphere Commerce - Express is an easily installed and affordable customer
interaction platform that is designed to jump-start your online presence.
WebSphere Commerce Professional provides a powerful customer interaction
platform to help mid-size companies offer personalized, cross-channel shopping.
WebSphere Commerce Enterprise provides a sophisticated platform for high-
volume B2C and B2B business models and multiple sites.
There are four main components to the WebSphere Commerce development environment:
In the WebSphere Commerce development environment, you can create customized code
and then test the code using the WebSphere Commerce Test Server.
2) WCS Architecture.
The Web server is the first point of contact for incoming HTTP requests for your e-commerce
application. In order to interface efficiently with the WebSphere Application Server, it uses
the WebSphere Application Server plug-in to manage the connections between the two
components.
The WebSphere Commerce Server runs within the WebSphere Application Server, allowing it
to take advantage of many of the features of the application server. The database server
holds most of your application's data, including product and customer data. In general,
extensions to your application are made by modifying or extending the code for
the WebSphere Commerce Server. In addition, you may have a need to store data that falls
outside of the realm of the WebSphere Commerce database schema within your database.
create and customize storefront assets such as JSP and HTML pages
create and modify business logic in Java
create and modify access beans and EJB entity beans
test code and storefront assets
create and modify Web services
New to this release is the further decoupling of the presentation tier from the business logic
tier to better enable support for multiple sales channels. A sales channel is a method that a
customer can use to purchase merchandise for example, in-store, from an online store, or
from a call center. As shown in the following diagram, requests can enter the WebSphere
Commerce Server from different types of clients such as a rich client, kiosk or as a browser
request.
Controller layer
Presentation layer
The presentation layer displays the result of command execution. The presentation
layer can use JSP pages, or other rendering technologies.
Controller commands
A controller command business process logic such as OrderProcess. It invokes task
commands to accomplish different unit of work in the business process. By default,
access control is enabled for controller commands.
Task commands
A task command is an autonomous task that accomplishes a specific unit of
application logic such as check inventory. A task command usually works with other
task commands to complete processing of a controller command. By default, access
control is not enabled for task commands.
Access beans
Access beans are simple persistent objects with setters and getters. The access bean
behaves like a Java bean and hides all the enterprise bean specific programming
interfaces, like JNDI, home and remote interfaces from the clients. Rational
Application Developer provides tooling support to generate access beans from the
schema.
Entity beans
Entity beans are used in the persistence layer within WebSphere Commerce. The
architecture is implemented according to the EJB component architecture. The EJB
architecture defines two types of enterprise beans: entity beans and session beans.
The runtime framework enhancements better enable support for multiple sales channels by
further decoupling the presentation tier from the business logic tier. A sales channel is a
method that a customer can use to purchase merchandise for example, in-store, from an
online store, or from a call center. Requests can enter the WebSphere Commerce Server
from different types of clients such as a rich client, kiosk or as a browser request.
WebSphere Commerce runtime framework
WebSphere Commerce is multichannel-enabled, meaning that WebSphere Commerce can
support transactions across various sales channels. The framework enhancements support
multiple presentation layers, responsible for showing results, which decouple control logic
from business logic.
Task commands, controller commands, access beans, and entity beans continue to function
as in previous releases.
This section provides a summary of the interaction flow between components when
forming a response to a request.
This diagram is specific to a Web application that uses Struts. The IBM Sales Center
framework interaction is described in the topic IBM Sales Center architecture.
1. The request is directed to the Presentation layer (Web container) in its own thread.
2. The thread handling the request is dispatched to the WebSphere Commerce servlet
filter. The filter passes the request to the adapter framework.
3. The adapter manager determines which adapter can handle the request, then
returns that adapter to associate with the request. For example, if the request
originated from an Internet browser, the adapter manager associates the request
with the HTTP browser adapter. The adapter is passed back to the Dynacache
servlet container. The filter regains control and passes the request to the servlet
engine for processing. At this point, either of the following actions can occur:
a. The request can be cached and the cached response can be returned.
b. If the request is not cached, the Struts action invokes the business logic
facade by specifying the interface name of the business logic to invoke and
the associated parameters. The business logic facade queries the command
registry to determine the appropriate implementation for the store
associated with the request.
4. The business logic facade invokes the appropriate controller command.
5. The controller command begins execution:
a. The controller command can access the database using an access bean and its
corresponding entity bean.
b. The controller command can invoke one or more task commands. Then task
commands can access the database, using access beans and their
corresponding entity beans.
c. A combination of a and b.
6. The business logic facade returns a set of properties to the Struts action. One of the
elements that is part of the properties is the key to the global forward that will
represents the response.
7. The action looks up the global forward in the Struts configuration files. It resolves to
the right one based on the store configuration. The action forward implementation
that is selected is the appropriate one for the device of the request.
8. The Struts request processor executes the action forward which will execute the
appropriate JSP page. Within the JSP page, a data bean is required to retrieve
dynamic information from the database. The data bean manager is used to activate
the data bean.
9. The access bean from which the data bean is extended accesses the database using
its corresponding entity bean. Based on globalization information in the request, the
data bean formats the data.
3) Business models.
Before starting to develop your site with WebSphere Commerce, you need to determine the
business model supported by WebSphere Commerce that best represents the purpose of
your site. Usually sites created with WebSphere Commerce will be implemented based on
of one of these business models.
WebSphere Commerce supports the following types of direct sales business models:
A value of B2C in the STORE table STORETYPE column indicates a B2C direct store
A store that supports commerce transactions involving products, services, between two
businesses or parties.
C ) Extended sites
WebSphere Commerce supports the Extended Sites business model, where a seller can
have many sites that are aimed at different audiences. For example, a seller might create
sites based on geographical regions, while some customized sites might be created for
individual large customers. These different sites can share assets such as the catalog,
whereby each site selects the subset of the catalog that is presented, and adjusts the prices
as necessary. A customer cannot share a shopping cart across multiple sites; a customer
has a shopping cart at each location. The business can customize sites by:
Geography
Brand
Market segment
Customer
Each site appears unique to the customers that access it, and each site can implement
business rules unique to that site. For example, different geographical areas might have
unique legal and tax regulations.
A site that allow your selling organization to provide unique storefronts for different
enterprise customers or showcase several branded storefronts. Creation and management
of the extended sites is through the hub in Commerce Accelerator. These extended sites
may share much of the data, such as master catalog and list prices, and presentation
information. An extended site store can be a B2B direct or Consumer Direct store.
Note: A value of B2C in the STORE table STORETYPE column indicates a consumer direct
store. MHS is for consumer direct hosted hub, B2C and B2B and so on.
Fulfillment centers are used by stores as both inventory warehouses and shipping and
receiving centers. A fulfillment center represents a place from which products are shipped
to customers. Inventory counts are maintained separately for each fulfillment center . One
store can have one or many fulfillment centers that are associated with it. In the
WebSphere Commerce Accelerator, you must select one fulfillment center when you log on,
if you are assigned one or more roles that pertain to fulfillment.
Procedure
The maximum quantity of order releases contained in each pick batch when a pick batch is
generated.
Minutes delayed
The delay in minutes from the time an order is released to fulfillment until one of its
releases can be picked in batch.
Drop ship
Indicates whether the fulfillment center is a drop-ship fulfillment center. This involves
requesting a fulfiller to ship the items directly to the customer rather than from the seller's
own fulfillment center
Inventory:
Inventory includes anything that can be physically accounted for a fulfillment center. There
are specific definitions of types of inventory that can be fulfilled, such as items, products,
SKUs, bundles, and prebuilt kits, but these are all considered inventory.
Inventory allocation
WebSphere Commerce supports five inventory systems: Available to promise (ATP), non-
ATP, no inventory, external inventory, and DOM inventory. The interface to inventory is
encapsulated by a single inventory task command, which in turn invokes the appropriate
task commands.
ATP inventory
Using the ATP inventory model, you can allocate stock from existing inventory or
backorder from expected inventory. You can also obtain an estimated availability time for
each order item after it is added into the shopping cart. The ATP also supports allocating
stocks for future order processing.
Non-ATP inventory
The non-ATP inventory model supports inventory operations that are only based on
existing on-hand inventory.
No inventory
The no inventory model assumes that all products have infinite quantities. When the
products in a store are virtual products, digital downloadable products, or electronic
assets, such as downloadable images or music, you can use this model.
The no inventory model has three typical characteristics that differentiate it from the other
inventory models:
All products have unlimited available quantities. Any check of inventory always returns a
positive result.
Since all products have infinite available quantities, all order items are successfully
allocated after an 'allocate inventory' operation. Specifically, the INVENTORYSTATUS
column of the ORDERITEMS table is always set to 'ALLC'.
The No inventory system does not support RTF (Release to Fulfillment), Pick batch, and
Ship Confirmation. Order management functions can be supported by custom integration
with an existing order management system.
External Inventory
The DOM inventory model supports the local inventory cache in WebSphere Commerce.
The external inventory model does not support the use of the local inventory cache.
The DOM inventory model uses the new logical schema and outbound service interfaces.
The external inventory model uses the legacy inventory outbound service interfaces.
To set a store to use a specific inventory model, WebSphere Commerce uses a configuration
flag to determine which set of interfaces to use. You need to populate the corresponding
tables for inventory configuration and inventory availability of this inventory model. For
ATP, non-ATP, and DOM inventory models, refer to the corresponding data models. For No
inventory and External inventory models, there are no local tables for inventory. The tables
for these inventory models are not populated. The ALLOCATIONGOODFOR column in the
STORE database table, is used to define the expiration time of the inventory allocation. The
ALLOCATIONGOODFOR column is applicable only for the ATP inventory model. It is not
applicable for other inventory models. The INVENTORYSYSTEM column in the STORE
database has values: -1 for ATP inventory, -2 for Non-ATP inventory, -3 for No inventory, -4
for External inventory and -5 for DOM inventory system
5) Store publish.
Site is one in an organization and stores can be any number for an organization.
Starter Store: A fully functional sample online store, provided in store archive format with
WebSphere Commerce. Starter stores are samples designed to be used as a base from
which a customized online store can be created. Starter stores are translated into several
languages and support multiple Web browsers and platforms.
Aurora starter store is B2C starter stotre and Elite is B2B starter store
The Aurora starter store can be used only as a storefront asset store in the Extended Sites
business model. It is not possible to deploy Aurora as a stand-alone B2B or B2C store.
The Aurora.sar archive contains the organization structure, predefined user roles, and
access control policies necessary to create either a B2C storefront asset store or a B2B
storefront asset store.
Follow this procedure to publish the Aurora starter store as a storefront asset store in an
existing Extended Sites organization.
Procedure
Option Description
Consumer direct storefront asset Select this option to publish a B2C storefront
store (MPS) asset store.
Option Description
B2B direct storefront asset store Select this option to publish a B2B storefront
(BMP) asset store.
8. Complete the publish wizard parameters that apply to the business model you
selected:
Store directory
The name of the directory that you want to contain the storefront assets (such as JSP
files and images).
The default value is Aurora. If you are publishing more than one type of store from
the Aurora.sar store archive, consider changing to a more meaningful name, for
example, Aurora_B2C.
Important: As you are publishing your store, record the value that you set for
the Store directory field. You must specify this value as the value for your store
name when you set up your Store server in your customization workspace.
Store identifier
The default value is Aurora. If you are publishing more than one type of store from
the Aurora.sar store archive, consider changing to a more meaningful name, for
example, Aurora_B2C.
Organization
The default value for B2B is Extended Sites Seller Organization (Root
Organization).
The catalog that you want to use. Select the name of the store that contains the
shared catalog data that you want to use.
Example: Extended Sites Catalog Asset Store
Inventory Model
store: http://localhost /webapp/wcs/stores/servlet/aurorab2besite/
6) WCS Subsystems
A) Member Subsystem :
The Member subsystem is a component of the WebSphere Commerce Server that includes
data for participants of the WebSphere Commerce system. A member can be a user, a group
of users (also known as a member group), or an organization. Business logic in the Member
subsystem provides member registration and profile management services. Other services
which are closely related to the Member subsystem include access control, authentication,
and session management.
The Member subsystem allows its users and organizational entity members to be assigned
roles depending on the activities in which they choose to participate. Role assignment is the
responsibility of an administrator, such as a Site Administrator. Once a member is assigned
a role, access control component authorizes the member to participate in activities
associated with the role. For example, an organization can be a buyer or a seller, or both. A
user can also be assigned multiple roles.
The Member subsystem also allows you to create member groups, which are groups of
users categorized for various business reasons. The groupings can be used for access
control purposes, for approval purposes, as well as for marketing purposes, such as
calculating discounts, prices, and displaying products.
The following features are associated with the Member subsystem:
Registration information
Profile management
Access control or authorization : Access control determines what tasks users can perform
on specific resources
Security, authentication, and session management.
Membership hierarchy :
Users and organizational entities within the Member subsystem are organized into a
hierarchy. Generally this hierarchy mimics a typical organizational hierarchy, with entries
for organizations and organizational units, and entries for users in the leaf nodes. The
hierarchy includes artificial organizational entities created specifically to support access
control.
B2C organization structure:s
The Root Organization is at the top level of the organization and is its own parent.
All organizations in WebSphere Commerce organization structure are descendants
of the Root Organization. The MEMBER_ID value for the Root Organization is -2001.
This value should not be changed.
Default Organization
Under the root is the Default Organization, and organizational entities that
represent the seller and buyer organizations in the WebSphere Commerce system.
When a user registers and does not identify an organizational entity to which the
user belongs, the Default Organization will be used. All guest customers and
customers in consumer direct businesses are created under the Default
Organization. It is recommended that when a business user (with profile type B)
registers that the business user identify the appropriate organizational entity that
he belongs to instead of defaulting to the Default Organization. The parent member
of a user is the immediate organizational entity to which the user belongs. A user
can specify his parent organizational entity during registration. If he does not
specify his parent organizational entity, the Default Organization will be used the
parent. The MEMBER_ID value for the Default Organization is -2000. This value
should not be changed.
OrgAdminConsole: This tool to manage business users and administrators does not
list users under the Org -2000 (Default Org), or allow users to be created under the
Default Org, since it assumes that is where B2C Shoppers (and guest users) are kept.
Accelerator can be used to manage B2C shoppers.
Access Control: By default, Default Org (-2000) subscribes to
GuestShopperManagementPolicyGroup which allows for some administrators
(regardless of where they play their role) to manage the users under the Default
Org. Guest users are implicitly owned by the Default Organization (-2000), when an
access control check is done on this type of user, since guest users do not exist in
the MBRREL table.
MemberRegistrationAttributes.xml: By default, it has configurations that assume the
Default Org DN.
UserRegistrationAdd command: If no parentMember is specified (for example, the
B2C scenario), the use will be placed under the Default Org.
Sub-organizational entities
One or more other levels of organizational entities can exist beneath the parent
organizational entities. An administrator can add as many child organizational
entities as necessary to support their business.
Users
Each organizational entity can have multiple users. Each user can belong to only one
organizational entity.
The MBRREL table stores membership hierarchy information, and must be populated for
every user and organizational entity. The MBRREL table only contains entries for
registered users. Guest customers always have the Default Organization as their parent
organizational entity. The members that are above a user or organizational entity in the
membership hierarchy are referred to as the ancestors of that user or organizational entity.
The immediate ancestor is also referred to as the parent. The relationship of the user to its
parent organizations is defined in the MBRREL table and also mirrored in the DN for the
user.
Users
When a user first accesses an e-commerce site and is browsing product pages, the user is
running as a generic user. The generic user has a common user ID (-1002) that is used
across the entire system. The use of a common user ID on the site minimizes system
resource usage. Once the user performs an operation that requires a unique identity, for
example, adding a product to the shopping cart, the user is converted from a generic user to
a unique guest user. A guest user has a unique user ID, but no password. This user
implicitly belongs to the Default Organization and does not have any roles in the site.
Depending on the business model of the store, and the access control policies, the user may
be able to do other operations on the site, for example, placing an order. Both the generic
user and a unique guest user have the registration type of "G" (Guest user). If the guest user
registers to the current store, then the user is converted to a registered user, and any assets
that the guest user owned will now be owned by the registered user.
A registered user has a unique logon ID and password, and is required to provide some
profile data for registration purposes. This user has registration type of "R" (Registered
user). The user would typically have the Registered Customer role in the current store's
organization. Other roles can be automatically assigned during registration by configuring
the MemberRegistrationAttributes.xml file. If the user is later assigned the Site
Administrator role, its registration type would be changed to "S" (Site Administrator). If the
user is later assigned any other administrative role, for example, Customer Service
Representative, the user's registration type would change to "A" (Administrator). Approval
may be required for user registration, depending on the configuration of the parent
organization. If approval is not needed, the user will automatically be in approved state. If
approval is needed, the user will initially be in pending approval state. Once the
registration has been processed, the user will be in approved, or rejected state. Only
approved users can log into the site. If a user's registration is rejected, the user could try to
register again. Registered users can be classified according to their profile type; that is,
profile type B denotes a business user (or a B2B direct or value chain customer) and profile
type of C denotes a retail user (or a consumer direct customer). It is recommended that
business users belong to their appropriate organizational entity in the membership
hierarchy instead of the Default Organization. This means that, when a business user
registers, the organizational entity that the user belongs to should be specified. If it is not
specified, WebSphere Commerce will default to using the Default Organization.
USERS
This table contains all users of the WCS that is registered users, guest users, and generic
users.
USERREG
This table stores user authentication information like username and password.
USERREPROF
This table contains basic registered user profile information.
USERDEMO
This table stores demographics information for users.
MBRGRP
This table stores member groups defined in the WCS. A member group is a group of
members.
MBRGRPDESC
This table contains locale specific information for the entries in the MBRGRP table.
BUSPROF
This table stores business profile information for a user. It is populated by the user
registration commands. It is intended to be populated for users with profile type
(USERS.PROFILETYPE) of "B", signifying that this is business user.
MEMBER
Stores the list of members of the WCS. A member is a user, an organizational entity or a
member group.
MBRATTR
This table contains the custom member attributes available to be assigned to users and
organizations.
MBRATTRVAL
This table contains the custom member attributes available to be assigned to users and
organizations.
ATTRTYPE
This table holds the type identifier for attributes.
MBRREL
This table stores member hierarchy relationships (ancestors and descendants) of
organizational entities and registered users. Note that member groups are not part of the
member hierarchy.
ROLE
This table stores the roles defined in WebSphere Commerce. Once a role is created, you
cannot change the name or description of a role using a graphical user interface tool.
MBRROLE
This table stores role assignment for members. Each member can play one or more roles in
the WebSphere Commerce system. When a member is assigned a role, the org Entity for
which the member plays that role can also be specified.
ORGENTITY
This table contains information on organizational entities (OrgEntities). An OrgEntity is
either an organization or an organization unit. Authorization domains are also stored in
this table.
ADDRESS
This table stores the addresses of users or organizations in the WebSphere Commerce
system. The addresses can be the members' own addresses or for their friends, associates,
or clients, and so on. Some columns here replace columns used in previous versions.
LogonCmdImpl
This command helps to login a user into a site or store. User should have role in current
stores organization and users account should be an approved one and is enabled.
If the user is authenticated successfully then user’s resources are migrated from guest to
register. MigrateUserEntriesCmd migrates resources owned by one user to another. The
mandatory resources that are migrated are Addresses, Current Orders, Interest Items,
Order Items, Orders, and Order templates. It migrates the guest user's shopping cart also.
There is a migrateOrder method in the MigrateUserEntriesCmdImpl class which does the
job. All that this method does in change the member id of the guest user's orders and
orderitems to the registered user's information. But it does not do anything if the logged in
user has a previous shopping cart. In that case user's past order has been deleted and order
items have been migrated to the new migrated order.
LogoffCmdImpl
LogoffcmdImpl will logs of current user .This command clears the session of the current
user, and begins a new session as the generic user. By default this commands deletes
persistent session while logs off(remember Me=false).If persistent session is enabled and
rememberme=true even after log off user will be able to see the shopping cart(but not
order history or address)
UserRegistrationAddCmdImpl
This command is used to register a guest or a generic user .If the parent organization of
user requires registration approval, user will be allowed to login only after getting the
approval. Default Organization (B2C business model) does not require user registration
approval. Information for new users is stored in the MEMBER, USERS, USERREG, MBRREL,
MBRROLE, USERPROF, BUSPROF, USERDEMO, ADDRESS, and ADDRBOOK database tables.
UserRegistrationUpdateCmdImpl
This command is used to update the registration information of a registered user. . If the
current user is a guest customer, this command will call the UserRegistrationAdd command
to register a new user. Information for users is stored in the MEMBER, USERS, USERREG,
ADDRESS, ADDRBOOK, MBRREL, USERPROF, BUSPROF, USERDEMO, and ADDRESS
database tables.
OrgEntityAddCmdImpl
This command registers a new organization or organizational unit.This command registers
a new organization or organizational unit. Information for new organizations or
organizational units are stored in the MEMBER, ORGENTITY, MBRREL, and ADDRESS
database tables.
OrgEntityUpdateCmdImpl
This command updates information about an organization or organizational unit.This
command updates information about an organization or organizational unit. If orgEntityId
parameter is not specified, OrgEntityAdd command will be called to add a new organization
or organizational unit. Information for the organizations or organizational units are stored
in the MEMBER, ORGENTITY, MBRREL, ADDRESS and ADDRBOOK database tables.
AddressAddCmdImpl
This command adds a new address entry for a user or organization.When an address is
created, its status is marked with a "P", meaning "permanent", and indicating the current
address. When an address is updated, a new record of the address is created with the
updates. The new record is marked with a "P" and the earlier record is marked with a "T",
meaning "temporary", and indicating the historical address.When an address is deleted
with the AddressDelete command, its status is marked with a "T".
AddressDeleteCmdImpl
This command deletes an address for a user.If address exists, the address is marked as
temporary or historical (that is, STATUS=T). The command then returns a success page
defined by the URL parameter. If the address already has status T, the success page is
returned regardless.
AddressUpdateCmdImpl
This command updates the address entry for a user. If the addressId parameter is not
provided, the AddressAdd command is called to add a new address. The nickname cannot
be updated. Inserts a new address into the ADDRESS table with the specified nickname. The
old address is marked as temporary, and the new address is marked as permanent.
AddressCheckCmdImpl
This command determines whether a user has at least one permanent address.
ResetPasswordCmImpl
This command is used by Registered users and administrators to update their own
passwords. Registered users who want to log on but have forgotten their password. They
use this command to reset their password without logging in.A randomly generated
password is e-mailed to the guest customer.
.
MemberRegistrationAttributes XML
The MemberRegistrationAttributes.xml configuration file specifies attributes that should
automatically be assigned to users and organizations during user and organization
registration and some authentication scenarios (For e.g.: SSO). The XML files is located in
C:\IBM\WCDE_ENT70\workspace\WC\xml\member directory. This file might be
overwritten when a store is published, but a back file is kept in the same directory.
B ) Catalog subsystem
The catalog subsystem contains all logic and data relevant to an online catalog, including
catalog groups (or categories), catalog entries, and any associations or relationships among
them.
Catalog groups
Catalog groups are generic groupings of online catalog entries within a catalog. A catalog
group may contain more than one catalog group or catalog entries. You can associate
catalog groups with any number of catalogs. For example, the "Men's Pants" catalog group
can be associated to the "Summer", "Winter" and "Spring" catalogs.
Although catalog groups can include catalog entries for any purpose, the main intent of
catalog groups is for catalog partitioning purposes. Catalog groups also determine
the navigational hierarchy of an online catalog.
Catalog entries
Catalog entries represent merchandise in an online catalog that often includes a name or
part number, a description, one or more offer prices, images, and other details. A catalog
entry can be a product, item, package, bundle, or dynamic kit.
Catalog entries can be a single item (atomic) or composed of several other catalog entries
(composite). When atomic, a catalog entry is an individually orderable entity that needs no
further SKU resolution. When composite, a catalog entry represents unresolved products,
packages, or bundles that may need additional information before becoming atomic
entities.
Packages and bundles
Packages and bundles are groupings of catalog entries used for promotional purposes.
A bundle is a collection of catalog entries that allow customers to buy multiple items with
one click. A bundle can be a grouping of items, or a combination of products, items, and
fully resolved packages. If you select a bundle which only contains items, the bundle is
decomposed into separate orderable SKUs that are added individually to the shopping cart.
However, if you select a bundle which contains products, these products need to be
resolved into items through SKU resolution before being added to a shopping cart. In either
case, once a bundle is decomposed and its component items are added to a shopping cart,
you can modify or remove each item. The bundle's price is the aggregate of the prices of all
the bundle components. For example, a computer bundle might be composed of a central
processing unit, a monitor, a hard drive, and a CD-ROM drive.
Unlike bundles, a package is an atomic collection of catalog entries. Viewed in similar ways
as a product, a package has defining attributes and is a container for fully resolved
packages. A fully resolved package is comparable to an item, with its own price, and can be
added to a shopping cart. You cannot decompose or modify a package during navigation or
after the package has been placed in the shopping cart. For example, a computer package
might contain a specific central processing unit, monitor, and hard drive that cannot be
sold separately.
CATGRPREL This table has the information on the relationship between the CATEGORY or
CATGROUP, like it says which is parent and which is child.
CATENTRY This table holds the information related to a catalog entry. Examples of catalog
entries include products, items, packages, and bundles.
CATGPENREL This table relates catalog groups (or categories) to the catalog entries that
are inside them. You can also use this table to dictate the navigational flow from catalog
groups to catalog entries. Each relationship is also qualified by a Catalog ID.
TopCategoriesDisplayCmd
This command sets the view task that will display the root Categories in a specified Catalog.
StoreCatalogDisplayCmd
This command can be used as the first page of a shopping flow to display the catalogs of a
given store.
CategoryDisplayCmd
This command retrieves the configured display page for the specified category in the
specified catalog.
ProductDisplayCmd
This command retrieves the configured Display Page for the specified CatalogEntry which
will in turn be launched in order to display information about the CatalogEntry.This
command first ensures that the CatalogEntry specified by the ProductId can be displayed in
the current store, if published, and is not marked for delete.
C ) Order Subsystem:
What is Order?
A typical order includes one or more products, billing and shipping addresses, payment
details, and the total cost including shipping charges and taxes. Comments and price
adjustments can also be included in an order.
Order states:
A
Backordered: An initial authorization has been performed. A re-authorization for the full
amount will be done when all backordered items are allocated.
E
CSR edit: A Customer Service Representative is working with the order.
Ready for remote fulfillment: The order is ready to be sent to a remote system for
fulfillment. This status is used by the MQAdapter feature and the TransferOrder task
command.
Waiting for remote fulfillment: The order has been sent to a remote system for
fulfillment. This status is used by the MQAdapter feature and the TransferOrder task
command.
(1) An order has been submitted for transfer and the distributor responded with
a failed transfer confirmation. The failure may be due to an invalid user ID or
password. The error code for the transfer is stored in the ORDSTAT table OSCODE
column and the error status message can be located in the ORDSTAT table OSCMT
column.
(2) An empty quotation order arrived due to quotation failure.
I
Submitted: The customer has submitted the order, but has not yet initiated
payment.
Low inventory: The customer has initiated payment. A previously allocated (or
backordered) order item has become unavailable.
Approval denied: Approval has been denied for some order items.
P
Pending: The customer can modify this order.
Quick order profile: The order contains default information for a customer such as
shipping address and payment information that can be copied when creating a new
pending order.
Waiting for approval: Not all order items have obtained approval.
Private requisition list: The order is a private requisition list (ordering same items
frequently)
IITEMLIST
Each row in this table represents an InterestItemList.
IITEM
Each row of this table represents an IItem in an IItemList.
CIITEMLIST
Each row in this table represents the relationship between an IItemlist and a member to
which it is the current list.
ORDERS
Each row in this table represents an order in a store.
SUBORDERS
Each row of this table contains subtotals of amounts for all the OrderItems of an Order with
the same shipping address.
ORDERITEMS
Each row of this table represents an order item in an order.
ORDPROMOCD
This table contains promotion codes captured for an order.
CPENDORDER
Each row of this table indicates that an order is marked as current for a customer in a store,
if its status is "P" (Pending).
ORDPAYINFO
Each row in this table holds a name-value pair representing payment information for a
particular Order. Values added to this table are encrypted when the "Instance/PDIEncrypt"
configuration flag is "on".
ORDADJUST
Each row of this table represents an OrderAdjustment.
ORDIADJUST
Each row in this table represents an OrderItemAdjustment.
ORDADJTXEX
Each row of this table indicates that an OrderAdjustment is exempt from taxation of a
particular TaxCategory. For example, an "after tax rebate" can be represented as a negative
OrderAdjustment that is exempt from taxation of all TaxCategories.
ORDCALCD
Each row of this table indicates to the CalculationCodeCombineMethod that a
CalculationCode is directly attached to all OrderItems in an Order. The order
directCalculationCodeAttachment flag in ORDERITEMS.PREPAREFLAGS is 1.
ORDICALCD
Each row of this table indicates to the CalculationCodeCombineMethod that a
CalculationCode is directly attached to an OrderItem. The attachment is not effective unless
the directCalculationCodeAttachment flag in ORDERITEMS.PREPAREFLAGS is 1.
ORDTAX
Each row of this table represents the total of the tax amounts of a particular TaxCategory
for all the OrderItems in an Order.
SUBORDTAX
Each row of this table specifies the tax amount of a particular TaxCategory for all the
OrderItems with the same shipping address as the SubOrder.
ORDITAX
Each row of this table contains a tax amount of a particular TaxCategory, for an OrderItem.
By default, WebSphere Commerce does not save any data in this table. However tax
amounts are aggregated by TaxCategory in the SUBORDTAX and ORDTAX tables.
ORCOMMENT
The table stores the comments for an order entered by a customer service representative.
ORDERHIST
This table is used to save order snapshots in XML format.
InterestItemAddCmd
This command adds one or more products, or items, or both, to one or more interest item
lists.
InterestItemDeleteCmd
This command deletes catalog entries from one or more interest item lists.
InterestItemListDeleteCmd
This command deletes the specified interest item lists and all items in them.
InterestItemDisplayCmd
This command displays all the catalog entries and items in the specified interest item list or
lists.
SetInterestItemListCmd
This command sets or resets interest item lists as current. Invoking this command is the
only way to set or reset an interest item list as "current". Only registered users can execute
this command.
InterestItemListCopyCmd
This command creates or updates an interest item list by copying interest items from one
interest item list to another.
OrderItemAddCmdImpl
This command adds items or products to the shopping cart. OrderItemAddCmdImpl calls
the below commands in this sequence.
1)ResolveSkuCmdImpl
2)OrderCreateCmd
3)ResolveOrderItemPriceCmd
4)UpdateShippingAddressCmd
5)ValidateTradingPaymentCmd
6)DoInventoryActionCmd(CheckInventory)
7)UpdateShipInfoCmdImpl
8)RaiseOrderEventCmdImpl
9)OrderCalculateCmd
10)ExtendedOrderItemProcessCmd
1)ResolveSkuCmdImpl
This command finds the type of catalog entry. If it is a package then
PackageResolveSkuCmd is called. If it is a product then this command determines the
attributes required to resolve the product to an orderable item. If attributes are missing
then ErrorMissingAttributeErrorCmd or ErrorProductAttributeErrorCmd is called.
2)OrderCreateCmd
This order command is used to create an order container with no line items.
3)ResolveOrderItemPriceCmd
This command is used to resolve price for a group of order items from one order.This
command calculates the best price for the input OrderItems. It calls
GetContractUnitPriceCmd or GetContractSpecialPriceCmd task command to calculate the
price. If GetContractUnitPriceCmd/GetContractSpecialPriceCmd is not available, it calls
GetBaseUnitPriceCmd/GetBaseSpecialPriceCmd. If input trading agreements and/or offers
are specified, they will be used providing they are valid. Otherwise, eligible trading
agreements will be obtained.
4)UpdateShippingAddressCmd
This Order task command is used to update the shipping address for the passed order
items
5)ValidateTradingPaymentCmd
ValidateTradingPaymentCmd is called to validate that the payment method is compatible
with the trading agreement
6)DoInventoryActionCmd(CheckInventory)
If doInventory = Y, call DoInventoryActionCmd to update the fulfillment centers and check
for available inventory
7)UpdateShipInfoCmdImpl
Call UpdateShipInfoCmd to update the shipping instructions, shipping account number and
shipping charge type
8)RaiseOrderEventCmdImpl
Call RaiseOrderEventCmd to raise ORDERITEM_CREATION_EVENT or
ORDERITEM_UPDATE_EVENT
9)OrderCalculateCmd
If the flag calculateOrder is set then Call OrderCalculateCmd to do calculations that are
based on the calUsageIds passed in
10)ExtendedOrderItemProcessCmd
Call ExtendOrderItemProcessCmd to execute any customization logic
OrderItemUpdateCmdImpl
OrderItemUpdateCmdImpl command updates order items in an existing
Order.OrderItemUpdateCmdImpl calls the following commands in sequence
1)DoInventoryActionCmd(Reserve Inventory)
2)AddOrderItemComponentsCmd
3)ResolveOrderItemPriceCmd
4)UpdateShippingAddressCmd
5)ValidateTradingPaymentCmd
6)DoInventoryActionCmd(Check Inventory)
7)updateShipInfoCmdImpl
8)RaiseOrderEventCmdImpl
9)OrderCalculateCmd
10)ExtendedOrderItemProcessCmd
ReserveInventoryCmd
This command get the quantity available for the requested item, store, and fulfillment
center.This command check to make sure that the quantity available is greater or equal to
the quantity requested.If it is successful,obtain the ITEMFFMCTR row and increment the
itemffmctr.qtyreserved by the requested quantity,then insert a new row into the
INVRESERVE table.
UpdateInventoryCmd
UpdateInventory let you update inventory for items. There are two ways to update
inventory.Set one or list of order items by calling setOrderItem method.Set one catalog
entry by calling setCatEntryId, setQuantity and setStoreId methods. Method
setQuantityMeasure is optional.
2)AddOrderItemComponentsCmd
This command creates the components that are associated with a composite order item. It
derives the component list in one of two ways
1. By making use of a list of CatalogEntries that are passed in
2. Get the list of components by finding all of the unassigned components through the
given configuration id.
3)ResolveOrderItemPriceCmd
This command is called to calculate the best price and update order total.
4)UpdateShippingAddressCmd
This Order task command is used to update the shipping address for the order items
passed in the request.
5)ValidateTradingPaymentCmd
ValidateTradingPaymentCmd is called to validate that the payment method is compatible
with the trading agreement.
6)DoInventoryActionCmd(Check Inventory)
Check Inventory allows us to check inventory for items. There are two ways to check
inventory.
1) Set one or list of order items by calling setOrderItem method.
2) Set one catalog entry by calling setCatEntryId, setQuantity and setStoreId methods.
Method setQuantityMeasure is optional.
7)updateShipInfoCmdImpl
Call UpdateShipInfoCmd to update the shipping instructions, shipping account number and
shipping charge type.
8)RaiseOrderEventCmdImpl
Call RaiseOrderEventCmd to raise ORDERITEM_CREATION_EVENT or
ORDERITEM_UPDATE_EVENT.
9)OrderCalculateCmd
If the flag calculateOrder is set Call OrderCalculateCmd to do calculations that are based on
the calUsageIds passed in.
10)ExtendedOrderItemProcessCmd
Call ExtendOrderItemProcessCmd to execute any customization logic.
OrderItemDeleteCmdImpl
This command delete order items based on orderItemId or catEntryId
specified.OrderItemDeleteCmdImpl calls below commands in sequence.
1)DoInventoryActionCmd(ReserveInventory)
2)PrepareShipInfoCmd
3)ReolveOrderItemPriceCmd
4)OrderCalculateCmd
2)PrepareShipInfoCmd
Perform a verification between the SHIPINFO table and the ORDERITEMS table and check
for orphaned SHIPINFO records. Any orphaned records will be removed.
3)ReolveOrderItemPriceCmd
This command is used to resolve price for a group of order items from one order.This
command calculates the best price for the input OrderItems.This command calls the
GetContractUnitPriceCmd/GetContractSpecialPriceCmd task command to calculate the
price.
If GetContractUnitPriceCmd/GetContractSpecialPriceCmd is not available, it calls the
GetBaseUnitPriceCmd/GetBaseSpecialPriceCmd. If input trading agreements and/or offers
are specified, they will be used providing they are valid. Otherwise, eligible trading
agreements will be obtained.
4)OrderCalculateCmd
If the flag calculateOrder is set Call OrderCalculateCmd to do calculations that are based on
the calUsageIds passed in.
OrderPrepareCmd (Controller Command)
Prepares an order by determining its prices, discounts, shipping charges, and taxes. If an
order reference number is not specified, all current pending orders will be prepared for the
current customer at the given store. The remerge, merge, check, allocate, backorder and
reverse parameters are applicable only if ATP inventory is enabled (STORE Table
INVENTORYSYSTEM column value -1).
1.PrepareOrderCmd(Task Command)
2.ValidateShippingAdjustmentCmd
PrepareOrderCmd(Task Command)
PrepareOrderCmd task command prepares an order by determine its prices, discounts,
shipping charges, and taxes for an order. This command will also lock the order to indicate
that it is ready for submission for the Order Process command. The lock can be reset either
by expiry, by changing the Order during update or delete operations or by calling
OrderUnlockCmd.The expiry period for a lock is stored in STORE table column
QUOTEGOODFOR.
This command removes generated order item based on the prepare flags setting (PREPARE
FLAG = 1 which means generated) in ORDERITEMS table. This command will also check if
all order items are buyable and throw exceptions if they are not buyable.
UpdateShippingAddressCmd is called to find the appropriate shipping address for all the
order items and update them for each order item. For a dynamic kit
ValidateDynamicKitConfigurationCmd is called to do validation.
ResolveOrderItemPriceCmd is called to calculate the best price and update order total.
DoInventoryActionCmd is called for inevntoy check and allocation .CalculateOrderCmd is
called for calculation of charges.
ValidateShippingAdjustmentCmd
This Order task command is used to find any inconsistencies in the order's shipping
adjustments. If new items have been added then the value returned from
hasShoppingCartChanged() will be true else it will be false.
This command submits an order for processing. The order must be locked by the Order
Prepare command before calling this command.
OrderProcessCmd calls the following commands in the below sequence
1)PIAddCmd
This controller command is used to create a new payment method to an order.
2)ValidatePaymentMethodCmd
This command checks whether the payment method to be added comply with the Buy
Online Pick In Store (BOPIS) rules.
3)ProcessOrderCmd
The ProcessOrderCmd task command makes the ProcessOrder server request.
4)RaiseOrdereventCmd
The RaiseOrderEventCmd task command is used to raise an order related event
1)PreProcessOrderCmd
If Unified Business Flow is not enabled or is enabled and approval is needed then this
command is called.
2)DoInventoryActionCmd(getATPParameter)
Call DoInventoryActionCmd to update inventory.
3)UpdateSependingLimitCmd
Call UpdateSpendingLimitCmd to check the trading agreement spending limit and validate
the PO number.
4)PrimePaymentCmd
Call PrimePaymentCmd (EDP command) to guarantee that the customer has funds to pay
for the order.
5)RaiseOrderSubmitEventCmd
Call RaiseOrderSubmitEventCmd to raise the order submit event.
6)PersisitOrdersWithMemberGroupIdsForCurrentUserCmd
PersistOrdersWithMemberGroupIdsForCurrentUserCmd (Marketing command) is called If
OrdersMgpPersistListener is enabled in order to persist the orders_id with the member
group id.
7)ExtOrderProcesCmd
ExtOrderProcessCmd command is called to execute any customization logic during order
process flow.
8)TransferOrderCmd
This command confirms successful transfer of an order to an external system. This
command is called to generate the outbound Order Create Message.
9)OrderMessagingCmd
This command generates the outbound Order Create Message "Report_NC_PurchaseOrder".
Marketing subsystem
The Marketing subsystem is a component of the WebSphere Commerce Server, and
provides numerous marketing concepts to your site, designed to increase brand awareness,
and to attract and retain customers. Components of the marketing subsystem provide
functionality to create marketing campaigns, including customer segments and advertising;
and e-mail activities. All of these components can be extensively customized to ensure that
your site's marketing strategy matches that of your brick and mortar store.
Promotion groups
Promotion groups, as the name implies, group promotions according to their type. These
groups have no hierarchical structure, or priority. By default, each store has the following
promotion groups
1.ProductLevel Promotions
A business user creates a promotion in the inactive state. From that point forward, the
promotion can be activated, modified, and deleted.When a promotion is first created, it
is inactive.When an inactive promotion is activated, a new version of that promotion is
created and marked active. The original promotion is then marked as obsolete.An active
promotion can be withdrawn, marking it as inactive.
Promotions are static. When changes are made to a promotion, a new revision is made.
The new revision inherits the state of the promotion before the change. The original
promotion is then marked as obsolete.Promotions in either active or inactive state can
be modified or deleted. The changes take effect immediately after they are made.
The promotion engine evaluates promotions for customers while they shop on the
storefront. The evaluation process has several stages and involves different components of
the promotion engine (PromotionAgendaBuilder, PromotionSequenceBuilder)
The two commands that call the promotion engine are:
1. PromotionEngineOrderCalculateCmdImpl
2. PromotionEngineDiscountCalculationCodeCombineCmdImpl
When the promotion engine is called, it processes any promotions for the current order,
and returns a PromotionArgument.The order subsystem is then responsible for
interpreting the results (PromotionArgument) returned by the promotion engine and
storing the results the respective order and order item adjustment tables. Due to
limitations in the order subsystem, not all Adjustments are supported by the order
subsystem
PX_PROMOTION -This table contains promotions.
PX_GROUP- This Table contains the promotion groups for the site.
PX_USAGE -This table tells about statistics the promotion usage. Also contains the
ORDERS_ID of the orders to which the promotion was applied.
PX_COUPON -This table contains all of the coupons issued to individual customers. Also
contains the ORDERS_ID of the orders to which the coupon was applied.
PX_DYNATTR -This table contains the details about any dynamic attributes that belong to
promotion entities, such as promotion groups, promotion policies, and others.
PX_PROMOARG- This table contains details about how promotions are applied to an order.
This table contains the history of promotions applied to an order.
PX_PROMPROM-Reserved for IBM internal use.
Change
<DefaultBehavior>
<StatelessInvocation>true</StatelessInvocation>
<CheckTargetingAtRuntime>true</CheckTargetingAtRuntime>
<SkipTargetingOnCodeEntered>true</SkipTargetingOnCodeEntered>
<PriceAdjustmentBasedOnStandardOfferPrice>true</PriceAdjustmentBasedO
nStandardOfferPrice>
<Debug>false</Debug>
</DefaultBehavior>
to
<DefaultBehavior>
<StatelessInvocation>true</StatelessInvocation>
<CheckTargetingAtRuntime>true</CheckTargetingAtRuntime>
<SkipTargetingOnCodeEntered>true</SkipTargetingOnCodeEntered>
<PriceAdjustmentBasedOnStandardOfferPrice>true</PriceAdjustmentBasedOnStandardO
fferPrice>
<Debug>true</Debug>
</DefaultBehavior>
E-Marketing Spots reserve space on your store pages for displaying marketing information to
your customers. By using web activities, you can control the information that displays in e-
Marketing Spots without new development.
Web activities are managed by Marketing Managers. They are used to deliver brand or
promotional messages to customers through a variety of methods.
Tables Associated
A static e-Marketing Spot, at any time, schedules only those activities that display the same
results to all customers. The activities do not contain targets, branches, or experiments. The
activities can have specific start and end dates.
A dynamic e-Marketing Spot, at any time, has one or more scheduled activities whose behavior
can depend on the current customer or the current context. These activities use targets,
branches, and experiments.
In general, marketing objects can be cached within the following marketing-specific caches:
Marketing Business Objects Cache
Marketing User Behavior Cache
WCMarketingDistributeMapCache
DynaCache Marketing Command Cache
There are three aspects to gaining improvements in management center marketing:
Marketing JSP caching
Marketing command caching
Marketing business object caching
To set up this type of caching, dependency IDs are dynamically set to invalidate the cached JSP
when the e-Marketing Spot definition changes. These definition changes can be caused by
events such as web activity changes, default content changes, content changes, product
changes, and category changes. The page time limit is set to invalidate the page at the next
scheduled time that an activity is added or removed from the e-Marketing Spot. When the page
is reloaded, the new set of active activities for the e-Marketing Spot is in effect.
For each e-Marketing Spot JSP snippet in the store, include a cache entry similar to the
following code.
Ensure that the following are specified:
<cache-entry>
<class>servlet</class>
<name>/Madisons/Snippets/Marketing/ESpot/ContentAreaESpot.jsp</name>
<property name="do-not-consume">true</property>
<property name="do-not-cache">true</property>
<property name="save-attributes">false</property>
<cache-id>
<component id="emsName" type="parameter">
<required>false</required>
</component>
<component id="DC_storeId" type="attribute">
<required>false</required>
</component>
<component id="DC_lang" type="attribute">
<required>false</required>
</component>
<metadatagenerator>com.ibm.commerce.marketing.cache.EMarketingSpotMetaData
Generator</metadatagenerator>
</cache-id>
</cache-entry>
For more information please visit the infocenter in the following link
http://www.ibm.com/support/knowledgecenter/en/SSZLC2_7.0.0/
com.ibm.commerce.admin.doc/tasks/tdcjspsnipcachactivbehav.htm
EMarketingSpotMetaDataGenerator
This class is used to assist in determining how an e-Marketing Spot can cache its results based
on the definition of the web activities and default content scheduled to the e-Marketing Spot.
The default value for do-not-consume should be true and for do-not-cache should be true. This
specifies to not cache the e-Marketing Spot JSP fragment. This class will dynamically set the e-
Marketing Spot JSP fragment to be cached if the e-Marketing Spot displays the same results to
all customers.
For more information about metadata generator please visit the below infocenter link
http://www.ibm.com/support/knowledgecenter/en/SSZLC2_7.0.0/
com.ibm.commerce.api.doc/com/ibm/commerce/marketing/cache/
EMarketingSpotMetaDataGenerator.html
<wcf:eMarketingSpotCache>
When the wcf:eMarketingSpotCache tag is used, the class for this tag dynamically sets the
dependency IDs to invalidate the cached e-Marketing Spot JSP fragment when the e-Marketing
Spot definition changes. The e-Marketing Spot definition changes whenever the content
(marketing content, products, categories) or web activities that are associated with the e-
Marketing Spot changes. The dependency IDs are set for the e-Marketing Spot (ID or name).
Dependency IDs can also be set for the data (catalog entry, category, content) that is being
displayed within an e-Marketing Spot.
If the parent page is being cached, the dependency IDs are set on the parent page cache
entry
If the parent page is not being cached, the dependency IDs are set on e-Marketing Spot JSP
cache entry
Sample Code
<wcf:eMarketingSpotCache marketingSpotData="${marketingSpotDatas}"
contentDependencyName="contentId" catalogEntryDependencyName="productId"
categoryDependencyName="categoryId"/>
For marketing commands cache entries like the below has to be in place.
To verify that cache is receiving data properly check the cache entries in the cache monitor.
The MarketingCache object cache instance is a location where a distributed map cache
(DM_Cache) stores data that pertains to a marketing business object.
Note: Do not clear the DM_Cache with the WebSphere Application Server cache monitor. If the
entire DM_Cache is cleared with the WebSphere Application Server cache monitor, then the
marketing services do not detect the events that are associated with any behavior rules. As a
result, certain triggers and targets that are used in marketing activities to detect customer
behavior do not work properly. If you need to clear the DM_Cache, then update the Marketing
registry with the Administration Console.
The MarketingUserCache object cache instance is a location where a distributed map cache
(DM_UserCache) stores data about customers that participate in marketing activities.
Note: For the Display Recently Viewed action in a web activity, only the server stores the list of
recently viewed items in the marketing user behavior cache. The list is not stored in the
database by default. When the customer's user behavior cache entry is removed from the
cache, that customer's recently viewed list is lost. The user behavior cache entry of a customer
is removed from the cache when it is not modified for 30 minutes. The user behavior cache can
also be removed when the cache is full. The default size is 10,000 cache entries. You can
configure the user behavior cache to hold more entries by increasing the size of the cache and
by enabling disk offload.
If the marketing information in the database is updated through SQL, massload, or stageprop,
then clear all cached information. Updating the registry through the Administration Console
clears the MarketingCache and MarketingUserCache, and the command and JSP caches.
Payment SubSystem:
The Payment rules engine determines which action to take based on the payment
instruction, payment method and the payment event.
Payment plug-in controller
Payment plug-ins
The shopper or CSR completes an order. When the order is submitted, the OrderProcess
command runs, then invokes the PrimePayment payment task command.
The Payment rules engine determines the payment action that needs to be performed, for
example, Approve.
The payment action is wrapped into an event, which is passed to the Payment plug-in
controller. For example, for the approve action, the Payment plug-in controller API
Approve is called.
The payment action is invoked against the plug-in. For example, for approve action, the API
approve of the corresponding plug-in is called.
The plug-in sets the transaction state according to the transaction execution results with
the Payment Service Provider. This transaction state will return to the Payment plug-in
controller.
The Payment plug-in controller updates the payment related records in the database
according to the state of transaction execution returned by the plug-in.
Payment Lifecycle
validation
reservation
finalization
The payment life cycle is related to the order life cycle stages:
order capture
release to fulfillment
shipping
validation
Ensures that a customer has enoughfunds to make the purchase. The payment action
depends on the customer's payment method. For instance, when a customer pays for a
purchase using a credit card, a credit card authorization is sent and if it is valid, the
transaction is approved. This process occurs during an order submission.This
authorization can be 1$ or full $ auth. It depends on the business needs.
reservation
Ensures that funds are available before shipment of the goods. The reservation amount is
the sum of all order release amounts. This process occurs during a release to fulfillment.
finalization
An order can have multiple releases if items in the order must be shipped from different
warehouses or use different carriers, or if some of the items need to arrive at different
times, such as for an expedited item. Additionally, a customer can group order items in the
same order to ship together, including backordered items or future shipments.
PrimePaymentCmd
ReservePaymentCmd
FinalizePaymentCmd
Once items are added to cart, an order is created in the ORDERS table with status as
pending “P”. Items in the shopping cart are added to ORDERITEMS table which has an
ORDER_ID reference to the ORDERS table. Correspondingly, a payment order record is
created in the EDPORDER table. Once the customer selects payment method and proceeds
for payment, for each payment method in the order, there is a payment instruction record
created in the EDPPAYINST.
Using the payment instruction returned, you can get the details like amount, payment
method, etc.
There is a PPCPAYINST table which stores the value object Payment Instruction in WCS
which contains information for payment plugins to process the final payments. Payments
for a specific payment method can only be charged upto a maximum specified by the
AMOUNT column in PPCPAYINST table. PPCEXTDATA contains non-standard data specific
to a payment method. For example, paymentexpress might have some non-standard
protocol data which is stored in here.
Tables
EDPOEDER is the part that handles the payments part only. Every order has an entry in
EDPORDERS.
EDPPAYINST contains the list of all payment instructions associated with an order. To
fetch ths list we have to come through EDPORDER.
PPCEXTDATA stores the non-standard protocol data required in the financial transaction
which goes beyond the standard attributes defined in the payment instruction
EDPPAYHIST keeps the payment activity history for all operations on payment
instructions and financial transactions.
Dataload:
Data can be loaded into WCS tables using data load utility.
There are three configurations files and a input source file required to complete the data
loader setup. WCS supports only CSV File Reader for other input source you should write
your own Reader Class. This means that if you are using OOB CSVReader then your input
file must be a CSV file. The three configuration files are listed below.
1.wc-dataload-env.xml
2.wc-dataload-loader.xml
3.wc-dataload.xml
wc-dataload-env.xml holds the environment settings such as database name, encrypted
password, database type, user name, schema name.
wc-dataload-loader.xml holds the mapping between your input csv file and the WCS
tables.
<_config:DataMapping>
<_config:mapping xpath="CatalogGroupIdentifier/UniqueID" value="GroupUniqueId" />
<_config:mapping xpath="CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier"
value="GroupIdentifier" />
<_config:mapping xpath="ParentCatalogGroupIdentifier/UniqueID"
value="ParentGroupUniqueId" />
<_config:mapping
xpath="CatalogGroupIdentifier/ExternalIdentifier/StoreIdentifier/ExternalIdentifier/
NameIdentifier" value="StoreIdentifier" valueFrom="InputData" />
<_config:mapping
xpath="ParentCatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier"
value="ParentGroupIdentifier" />
<_config:mapping
xpath="ParentCatalogGroupIdentifier/ExternalIdentifier/StoreIdentifier/
ExternalIdentifier/NameIdentifier" value="ParentStoreIdentifier"
valueFrom="InputData" />
<_config:mapping xpath="topCatalogGroup" value="TopGroup" />
<_config:mapping xpath="displaySequence" value="Sequence" />
<_config:mapping xpath="Description[0]/Name" value="Name" />
<_config:mapping xpath="Description[0]/ShortDescription" value="ShortDescription" />
<_config:mapping xpath="Description[0]/LongDescription" value="LongDescription" />
<_config:mapping xpath="Description[0]/Thumbnail" value="Thumbnail" />
<_config:mapping xpath="Description[0]/FullImage" value="FullImage" />
<_config:mapping xpath="Description[0]/Attributes/published" value="Published" />
<_config:mapping xpath="Description[0]/Keyword" value="Keyword" />
<_config:mapping xpath="Description[0]/Attributes/note" value="Note" />
<_config:mapping xpath="Attributes/field1" value="Field1"/>
<_config:mapping xpath="Attributes/field2" value="Field2"/>
<_config:mapping xpath="" value="Delete" valueFrom="InputData" deleteValue="1"/>
</_config:DataMapping>
wc-dataload.xml is the main xml that is passed as parameter to the dataload utility, this
file contains information about the environment file, loader file and input CSV file for the
loader.
To run the dataload utility, just go to command prompt and navigate to WCS installation
folder and then open bin folder, by default it would be the one shown below.
C:\IBM\WCDE_INSTALL70\bin
Type dataload.bat <path of dataload file>
for e.g dataload C:/IBM/WCDE_INSTALL70/samples/DataLoad/Catalog/wc-dataload.xml
You can use the table-based mediator to load data with the Data Load utility when the
following conditions exist:
You want to load data into a table when a component-based object mediator does not exist
for the object that you are loading.
You are loading data into a table that is updated and you do not want to customize or
extend the existing component mediator.
You are loading custom UserData into an extended table.You can add your UserData into a
default provided sample CSV or XML file. You can then load this file by using the
TableObjectMediator and TableObjectBuilder with the Data Load utility.
Table-based builder
Table-based mediator
TableObjectMediator is used to convert the data objects into physical objects. To use a
table-based data load, you must know the physical tables that you want to load data into.
You also must know the foreign key relationships, how the keys generate, and how the
generated keys are resolved based on the unique index. The column values that the Data
Load utility can retrieve from the business contexts must also be known. This mediator
accepts the populated table data objects from the builder class. Any partially populated
table data object is populated with more values with this mediator to ensure that the data
object can be resolved. The mediator populates the data objects with values from the
business context. The data object IDs are resolved through the business context service or
through the ID resolver. After the data object is populated, the data object is sent to the
data writer to populate the data object into the appropriate database table.
I will try to explain the data load on custom tables using Table-based builder and
table object mediator by loading data into a custom table called EMPLOYEE.
// Create Table EMPLOYEE
CREATE TABLE EMPLOYEE (
EMPLOYEE_ID BIGINT NOT NULL,
NAME VARCHAR(254),
TYPE VARCHAR(254)
);
name,type
employeex,admin
employeeY,tester
<_config:DataLoadConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/
config ../xsd/wc-dataload.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:DataLoadEnvironment configFile="wc-dataload-env.xml" />
<_config:LoadOrder commitCount="100" batchSize="1" dataLoadMode="Replace" >
<_config:LoadItem name="employee" businessObjectConfigFile="wc-loader-
employee.xml" >
<!--Indicates the location of input csv files, can be overrided at runtime.-->
<_config:DataSourceLocation location="employees.csv" />
</_config:LoadItem>
</_config:LoadOrder>
</_config:DataLoadConfiguration>
Define the wc-dataload-env.xml as below
<_config:DataloadBusinessObjectConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config
xsd/wc-dataload-businessobject.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:DataLoader
className="com.ibm.commerce.foundation.dataload.BusinessObjectLoader">
<_config:DataReader
className="com.ibm.commerce.foundation.dataload.datareader.CSVReader"
firstLineIsHeader="true" useHeaderAsColumnName="true" >
<_config:property name="keyColumns" value="Identifier" />
</_config:DataReader>
<_config:BusinessObjectBuilder
className="com.ibm.commerce.foundation.dataload.businessobjectbuilder.TableO
bjectBuilder" >
<_config:Table name="EMPLOYEE">
<!-- System generated primary key-->
<_config:Column name="EMPLOYEE_ID" value="employee_id" valueFrom="IDResolve">
<_config:IDResolve tableName="EMPLOYEE" generateNewKey="true" />
</_config:Column>
<_config:Column name="NAME" value="name">
</_config:Column>
<_config:Column name="TYPE" value="type">
</_config:Column>
</_config:Table>
<_config:BusinessObjectMediator
className="com.ibm.commerce.foundation.dataload.businessobjectmediator.Table
ObjectMediator">
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
</_config:DataLoader>
</_config:DataloadBusinessObjectConfiguration>
The Data Load utility creates a list of extended table data objects, which the table object
builder populates with the column values that are included in the input data. The builder
class also populates the data objects with any fixed values that are defined for the objects in
the column definitions that are specified in the business object configuration file. The Data
Load utility passes the populated list of extended table data object to the
TableObjectMediator. TableObjectMediator is used to convert the data objects into physical
objects.
Dataload C:\IBM\WCDE_ENT70\samples\AuroraDataLoad\custom\CSV\ wc-dataload.xml
<_config:DataloadBusinessObjectConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config
xsd/wc-dataload-businessobject.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:DataLoader
className="com.ibm.commerce.foundation.dataload.BusinessObjectLoader">
<_config:DataReader
className="com.ibm.commerce.foundation.dataload.datareader.XmlReader" >
</_config:DataReader>
<_config:BusinessObjectBuilder
className="com.ibm.commerce.foundation.dataload.businessobjectbuilder.TableO
bjectBuilder" >
<_config:Table name="EMPLOYEE">
<!-- System generated primary key-->
<_config:Column name="EMPLOYEE_ID" value="employee_id" valueFrom="IDResolve">
<_config:IDResolve tableName="EMPLOYEE" generateNewKey="true" />
</_config:Column>
<_config:Column name="NAME" value="name">
</_config:Column>
<_config:Column name="TYPE" value="type">
</_config:Column>
</_config:Table>
<_config:BusinessObjectMediator
className="com.ibm.commerce.foundation.dataload.businessobjectmediator.Table
ObjectMediator">
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
</_config:DataLoader>
</_config:DataloadBusinessObjectConfiguration>
Switch to C:\IBM\WCDE_ENT70\bin
Dataload C:\IBM\WCDE_ENT70\samples\AuroraDataLoad\custom\XML\ wc-
dataload.xml