The e-Commerce API is a Java API provided by CoreMedia DXP 8 that can be used to build shop applications. Various services allow you to access the e-Commerce system for different tasks:
The
CatalogServicecan be used to access the product catalog in many ways: traverse the category tree, products by category, various product and category searches.With the
PriceServiceyou can access prices: list prices and dynamic offer prices.The
AvailabilityServicelets you access the inventory of the e-Commerce system to check the availability of Stock Keeping Units (SKUs).The
MarketingSpotServicegives you access to IBM WCS e-Marketing Spots, a common method to use marketing content (product teasers, images, texts) depending on the customer segments.The
SegmentServicelets you access customer segments, for example, the customer segments the current user is a member of.Use the
CartServiceto manage orders.The
WorkspaceServicelets you retrieve the list of existing workspaces. A workspace is a concept to prepare changes in a separated branch/environment. A selected workspace is part of the current store context you work with.
The e-Commerce API is used internally to render catalog-specific information into standard templates. Furthermore, the Studio Library integration makes use of the API to browse and work with catalog items. If you develop your own shop application you will use the API in your templates and/or business logic (handlers and beans).
The following key points will give you a short overview of the components that are also involved. They build up an infrastructure to bootstrap a connection to a commerce system and/or perform other supportive tasks.
The
Commerceclass is the essential part of the bootstrap mechanism to access a commerce system. You can use it to create a connection to your commerce system.The
CommerceConnectionInitializeris used to initialize a request specific commerce connection. The resolved connection is stored in a thread local variable.The
CommerceBeanFactorycreatesCommerceBeanswhose implementation is defined via Spring. It is also used by the services to respond service calls, for example, instances ofProductand/orCategorybeans. You can integrate your own commerce bean implementations via Spring (inheriting from the original bean implementation and place your own code would be a typical pattern).The
StoreContextProvidercan retrieve an applicableStoreContext(the shop configuration that comprises information like the shop name, the shop id, the locale and the currency).The
UserContextProvideris responsible to retrieve the currentUserContext. Some operations, like requesting dynamic price information, demand a user login. These requests can be made on behalf of the requesting user. User name and user id are then part of the user context.The
CommerceIdProvideris able to format and parse references to commerce items. References to commerce items will be possibly stored in content, like a product teaser stores a link to the commerce product.
Commerce beans are cached on time basis. Cache time and capacity can be configured via Spring.
Please refer to the Javadoc of the Commerce class as a good starting point on
'How to use the e-Commerce API'.







