Interview Questions



1.What is reload interval? where do we configure reload interval?

WC_eardirStores.warWEB-INFibm-web-ext.xml — change reload-interval
Reload interval is generally used at the time when we are doing caching. if we make the relaod-interval to 10 then  the jsp  compilation interval will be 10 sec.

2.What is EJB copyHelper?
The access bean implements a copyHelper object that reduces the number of calls to the enterprise bean when commands get and set enterprise bean attributes. Only a single call to the enterprise bean is required when reading or writing multiple enterprise bean attributes.
  • The copy helper object is stored inside the access bean.
  • A getter and setter method is delegated to the local copy helper object instead of the remote enterprise bean object.
  • To commit the changes in the copy helper to the remote enterprise bean or to refresh the local copy helper from the remote enterprise bean, your client program must call commitCopyHelper() and refreshCopyHelper() respectively.

3.Difference between different types of DataBean? 

Types of data beans

A data bean is a Java bean that is mainly used to provide dynamic data in JSP pages. There are two types of data beans: smart data beans and command data beans.
A smart data bean
  • uses a lazy fetch method to retrieve its own data.
  • This type of data bean can provide better performance in situations where not all data from the access bean is required, since it retrieves data only as required.
  • Smart data beans that require access to the database should extend from the access bean for the corresponding entity bean and implement the com.ibm.commerce.SmartDataBean interface.
  • For example, the ProductDataBean data bean extends the ProductAccessBean access bean, which corresponds to the Product entity bean.
Some smart data beans do not require database access. For example, the PropertyResource smart data bean retrieves data from a resource bundle, rather than the database. When database access is not required, the smart data bean should extend the SmartDataBeanImpl class.
A command data bean
  • Relies on a command to retrieve its data and is a more lightweight data bean.
  • The command retrieves all attributes for the data bean at once, regardless of whether the JSP page requires them.
  • As a result, for JSP pages that use only a selection of attributes from the data bean, a command data bean may be costly in terms of performance time.
  • While access control can be enforced on a data bean level when using the smart data bean, this is not true for command data bean. Only use command data bean if using a smart data bean is impractical.
  • Command data beans can also extend from their corresponding access beans and implement the com.ibm.commerce.CommandDataBean interface.

Data bean interfaces

Data beans implement one or all of the following Java interfaces:
  • com.ibm.commerce.SmartDataBean.
  • com.ibm.commerce.CommandDataBean
  • com.ibm.commerce.InputDataBean (optional)
Each Java interface describes the source of data from which a data bean is populated. By implementing multiple interfaces, the data bean can access data from a variety of sources.
4.What is WCS? Overview
 WebSphere Commerce is an application supported by the WebSphere Application Server. It is a database-driven application, storing most of its operational information in a database.
The WebSphere Commerce Server runs within the WebSphere Application Server, allowing it to take advantage of many of the features of the application server.



Primary components of WCS
As with any Web application, WebSphere commerce has 3 main components
  • A Database
  • A J2EE Application Server
  • A Web server
Databases which are supported with WebSphere Commerce are:
  • DB2
  • Oracle
  • Derby (for WebSphere Commerce Developer only). It is provided with the Developer product.
The only supported application server is IBM WebSphere Application Server and that is provided with the WebSphere Commerce product.
The supported Web servers are:
  • IBM HTTP Server. It is provided with the product (except i5/OS)
  • Microsoft Internet Information Services (IIS)
  • Sun One/Sun Java System Web Server



Development Tool’s:
Rational Application Developer — The WebSphere Commerce development environment builds on top of Rational Application Developer, which is the core development environment from IBM. It is basically the customized version on eclipse by IBM.
Commerce Developer — A complete Web development environment based on Rational Application Developer, for developing storefronts and customizing the domain model (business processes and business objects) within the WebSphere Commerce Server.
5.Can you explain about Access Control Policies?
 
Access control policies is the utility provided by WebSphere Commerce, to allow access to the authorized group of user to a perform set of actions on the resources present in the application. There are four main concepts in the ACP.
  • Access: Allowing access to group of authorized users to which policy applies
  • Actions: Actions performed by user on the resources.
  • Resources:  Resources may include business objects (i.e. set of commands, etc)
  • Relationship: Each user can have relationship associated with it. (For e.g. a policy can apply the creator of an order can modify it and it is between the order and the user.)
The basic XML elements of the access control policy files are
  • <Action>: The new action will be loaded on ACACTION table.
  • <ActionGroup>: It is a group of related action and the action groups are stored in ACACTGRP table. Actions are associated with action groups in ACACTGRP table.
  • <Attribute>: Attribute is defined in ACATTR table.
  • <ResourceCategory>:  Resource Category is defined in ACRESCGRY table.
  • <ResourceGroup>: It is a set of resources and defined in ACRESGRP table.
  • <Relation>: Each resource can have set of relationship associated with it and it is stored in ACRELATION table.
  • <RelationGroup>: Relation group are defined in ACRELGRP.
  • <Policy>: Policies are defined in ACPOLICY.
  • <PolicyGroup>: Policy group are defined in ACPOLGRP.

ACP Load xml for views:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE Policies SYSTEM "../dtd/accesscontrolpolicies.dtd">
<Policies>
            <Action Name="m20FilterDisplayView"                                           CommandName="m20FilterDisplayView"></Action>
           
            <ActionGroup Name="AllSiteUsersViews" OwnerID="RootOrganization">
                       
                        <ActionGroupAction Name="m20FilterDisplayView"/>
            </ActionGroup>
</Policies>

Syntax:
acpload database_name db_username db_pwd WC_Installdir/xml/policies/acp_file_name.xml

6.Explain exception types in WCS (IBM Websphere Commerce)?

A command can throw two types of exceptions
ECApplicationException: This exception is thrown; if the error is related to user input and it always fail. When the user enters invalid parameter, this exception is always thrown. When this exception is thrown, the solution controller does not retry the command, even if the command is specified as retriable.
ECSystemException: This exception is thrown if a runtime exception or any WebSphere configuration error occurs. Examples of this exception are Remote Exception, Create Exception or other EJB exceptions. When this exception is thrown, the solution controller retries the command if the command is retirable and the exception was caused by either a database dead lock or database rollback.

7.Explain Order Management subsystem flow
 
The Order Management subsystem includes all logic and data relevant to placing, processing, and managing orders. The Order Management subsystem also deals with returns.
  1. OrderCreate: The order will be created even though there is no orderitems in the cart.
  2. OrderItemAdd: When the customer selects the item and click on the add to the cart, then the OrderItemAddCmd will be called. The order state will be pending (P).
  3. OrderItemUpdate: This command will be called when the quantity of the item is updated in the shopping cart page. The order state will be pending (P).
  4. OrderCalculate: This command will be called when the customer adds the orderitems in the cart. The order state will be pending (P).
  5. OrderItemMove: This command merges the current pending order to the previous order when the customer places the order by signing on to the store.
  6. OrderPrepare: It basically calculates determines the discount, prices, shipping charges and taxes for the order.
  7. OrderProfileUpdate: This command will be called to update the billing and shipping address and ship mode of the customer.
  8. OrderProcess: Submits the order.
Here, the order can be blocked for several reasons.
    • This may be due to manual verification of the customer.
    • The order payment has not been captured completely. If the full payment has been captured then the state of the order is complete (C) i.e. payment authorization is complete. When the partial payment has been captured the order state will be (M) i.e. part of the amount has been approved.

  1. OrderScheduled: The order is released, if the order is unblocked and fulfills all the requirements. This cmd is invoked by the scheduler. The order state will be released (R). When the order will be released, message will be sent to the LSP for shipment. Once the order gets shipped, the state of the order will be shipped (s) and after that shipment confirmation mail will be sent to the ecommerce. After this the state of the order will be deposited (D).
  2. OrderCancel: The order can be cancelled through Customer Sales Representatives, before the order is released to Fulfillment. OrderCancel can cancel orders with an order status of P, X, W, E, A, B, C, M and OrderItem not in R, S, F, and G. Here the order state will be cancelled (X).
  3. OrderEdit: This will be called, when the CSR is working with the order. The editor id will be assigned to the order. The order state will be CSR Edit (E). The order can be edit before the releasing the order.
8.What are the subsystems you deal in your project?
  1. Marketing Subsystem - The Marketing subsystem 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.
  2. Catalog Subsystem - The catalog subsystem provides online catalog navigation, partitioning, categorization, and associations. In addition, the catalog subsystem includes support for personalized interest lists and custom catalog display pages. 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.
  3. Member Subsystem- A member can be a user, a group of users (also known as a member group), or an organizational entity (which can be an organization, such as “IBM” or an organizational unit within an organization, such as “Electronic Commerce Division”). 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.
    • Registration information: Registration data for users and organizational entities can be configured to be stored in the WebSphere Commerce database or the directory server. Member group’s data can be stored only in the WebSphere Commerce database. For authentication purposes, a registered user has a unique identifier and a password. If the WebSphere Commerce database is used as registry, the unique identifier is the logon ID. If the directory server is used, the unique identifier can be a distinguished name or a relative distinguished name.
    • Profile management: A Site Administrator manages user and organizational entity profiles and data, including the organizations or organizational units, roles, users, and member groups within a site. In addition, a Buyer Administrator and Seller Administrator can manage users and organizational entities.
    • Access control and authorization: Access control determines what tasks users can perform on specific resources. An access group is a group of members defined specifically for access control purposes. A Site Administrator creates, maintains, and deletes access groups for a site. A Buyer Administrator or a Seller Administrator can also manage access groups for access control policies. Access groups usually group users based on their roles, organizations, and registration status.
    • Security, authentication, and session management: A user can be authenticated against a WebSphere Commerce database or a directory server. WebSphere Commerce supports two challenge types: logon ID and password, and X.509 client certificate. When logon ID and password is used, a user is authenticated against the WebSphere Commerce database or a directory server. When X.509 client certificate is used, the Web server performs the authentication. WebSphere Commerce supports two types of session management: cookie-based and URL rewriting.
  4. Trading Subsystem - The trading subsystem in WebSphere Commerce provides the logic, function and data relevant for negotiating the price and quantity of a product or set of products between the buyer and seller organization. The trading subsystem includes auctions, contracts, and Request for Quote (RFQ) components that are used to carry out specific transactions between organizations.
  5. Order Management Subsystem - The Order Management subsystem provides shopping carts, order capture, order fulfillment, inventory, and payment function support.
    Order management is broadly divided into:
    • Order capture: Order capture provides functionality such as sales quotes and shopping carts and order submission. There are a number of ways to create shop carts and submit orders, as described in the order mechanisms section.
    • Order processing: Order processing is responsible for the overall coordination of inventory allocation, payment processing, releasing the order to fulfillment and tracking order status.
    • Inventory processing: WebSphere Commerce supports two inventory systems: Available to promise (ATP) and non-ATP. The interface to inventory is encapsulated by a single inventory task command, which in turn invokes either ATP or non-ATP task commands.
    • Payment processing: WebSphere Commerce Payments supports the use of payment plug-ins for offline or online payment processing.

9.What is the difference between the controller command and task command ?


Generally controller command is the main command which we used to call from the JSP to process the request, But task command is used to perform some specific task like for inventory check, price check, these are handled through task commands, so task command are command which perform specific task for controller command. DIFFERENCE – By the above statement we can visualize that Controller command is required to be configure in the struts file, but task command is not required to be configured in struts, rest everything is same in both.
http://sureshraja-wcs.blogspot.in/2012/08/wcs-interview-questions.html

WCS Interview Questions

1)    What are the subsystems you deal in your project?
Ø  Marketing Subsystem - The Marketing subsystem 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.
Ø  Catalog Subsystem- The catalog subsystem provides online catalog navigation, partitioning, categorization, and associations. In addition, the catalog subsystem includes support for personalized interest lists and custom catalog display pages. 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.
Ø  Member Subsystem- A member can be a user, a group of users (also known as a member group), or an organizational entity (which can be an organization, such as "IBM" or an organizational unit within an organization, such as "Electronic Commerce Division"). 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.
·         Registration information: Registration data for users and organizational entities can be configured to be stored in the WebSphere Commerce database or the directory server. Member group’s data can be stored only in the WebSphere Commerce database. For authentication purposes, a registered user has a unique identifier and a password. If the WebSphere Commerce database is used as registry, the unique identifier is the logon ID. If the directory server is used, the unique identifier can be a distinguished name or a relative distinguished name.
·         Profile management: A Site Administrator manages user and organizational entity profiles and data, including the organizations or organizational units, roles, users, and member groups within a site. In addition, a Buyer Administrator and Seller Administrator can manage users and organizational entities.
·         Access control and authorization: Access control determines what tasks users can perform on specific resources. An access group is a group of members defined specifically for access control purposes. A Site Administrator creates, maintains, and deletes access groups for a site. A Buyer Administrator or a Seller Administrator can also manage access groups for access control policies. Access groups usually group users based on their roles, organizations, and registration status.
·         Security, authentication, and session management: A user can be authenticated against a WebSphere Commerce database or a directory server. WebSphere Commerce supports two challenge types: logon ID and password, and X.509 client certificate. When logon ID and password is used, a user is authenticated against the WebSphere Commerce database or a directory server. When X.509 client certificate is used, the Web server performs the authentication. WebSphere Commerce supports two types of session management: cookie-based and URL rewriting.
    · Trading Subsystem- The trading subsystem in WebSphere Commerce provides the logic, function and data relevant for negotiating the price and quantity of a product or set of products between the buyer and seller organization. The trading subsystem includes auctions, contracts, and Request for Quote (RFQ) components that are used to carry out specific transactions between organizations.
    · Order Management Subsystem- The Order Management subsystem provides shopping carts, order capture, order fulfillment, inventory, and payment function support.
Order management is broadly divided into:
    Ã˜ Order capture: Order capture provides functionality such as sales quotes and shopping carts and order submission. There are a number of ways to create shop carts and submit orders, as described in the order mechanisms section.
    Ã˜ Order processing: Order processing is responsible for the overall coordination of inventory allocation, payment processing, releasing the order to fulfillment and tracking order status.
    Ã˜ Inventory processing: WebSphere Commerce supports two inventory systems: Available to promise (ATP) and non-ATP. The interface to inventory is encapsulated by a single inventory task command, which in turn invokes either ATP or non-ATP task commands.
    Ã˜ Payment processing: WebSphere Commerce Payments supports the use of payment plug-ins for offline or online payment processing.

2) Explain Order Management subsystem flow?                                                                                                                         
The Order Management subsystem includes all logic and data relevant to placing, processing, and managing orders. The Order Management subsystem also deals with returns.                                                               
    Ã˜ OrderCreate: The order will be created even though there is no orderitems in the cart.
    Ã˜ OrderItemAdd: When the customer selects the item and click on the add to the cart, then the OrderItemAddCmd will be called. The order state will be pending (P).
    Ã˜ OrderItemUpdate: This command will be called when the quantity of the item is updated in the shopping cart page. The order state will be pending (P).
    Ã˜ OrderCalculate: This command will be called when the customer adds the orderitems in the cart. The order state will be pending (P).
    Ã˜ OrderItemMove: This command merges the current pending order to the previous order when the customer places the order by signing on to the store.
    Ã˜ OrderPrepare: It basically calculates determines the discount, prices, shipping charges and taxes for the order.
    Ã˜ OrderProfileUpdate: This command will be called to update the billing and shipping address and ship mode of the customer.
    Ã˜ OrderProcess: Submits the order.
Here, the order can be blocked for several reasons.
    · This may be due to manual verification of the customer.
    · The order payment has not been captured completely. If the full payment has been captured then the state of the order is complete (C) i.e. payment authorization is complete. When the partial payment has been captured the order state will be (M) i.e. part of the amount has been approved.
    Ã˜ OrderScheduled: The order is released, if the order is unblocked and fulfills all the requirements. This cmd is invoked by the scheduler. The order state will be released (R). When the order will be released, message will be sent to the LSP for shipment. Once the order gets shipped, the state of the order will be shipped (s) and after that shipment confirmation mail will be sent to the ecommerce. After this the state of the order will be deposited (D).
    Ã˜ OrderCancel: The order can be cancelled through Customer Sales Representatives, before the order is released to Fulfillment. OrderCancel can cancel orders with an order status of P, X, W, E, A, B, C, M and OrderItem not in R, S, F, and G. Here the order state will be cancelled (X).
    Ã˜ OrderEdit: This will be called, when the CSR is working with the order. The editor id will be assigned to the order. The order state will be CSR Edit (E). The order can be edit before the releasing the order.

3) Can you explain about Access Control Policies?
A) Access control policies is the utility provided by WebSphere Commerce, to allow access to the authorized group of user to a perform set of actions on the resources present in the application. There are four main concepts in the ACP.
·         Access: Allowing access to group of authorized users to which policy applies
·         Actions: Actions performed by user on the resources.
·         Resources:  Resources may include business objects (i.e. set of commands, etc)
·         Relationship: Each user can have relationship associated with it. (For e.g. a policy can apply the creator of an order can modify it and it is between the order and the user.)
The basic XML elements of the access control policy files are
·         <Action>: The new action will be loaded on ACACTION table.
·         <ActionGroup>: It is a group of related action and the action groups are stored in ACACTGRP table. Actions are associated with action groups in ACACTGRP table.
·         <Attribute>: Attribute is defined in ACATTR table.
·         <ResourceCategory>:  Resource Category is defined in ACRESCGRY table.
·         <ResourceGroup>: It is a set of resources and defined in ACRESGRP table.
·         <Relation>: Each resource can have set of relationship associated with it and it is stored in ACRELATION table.
·         <RelationGroup>: Relation group are defined in ACRELGRP.
·         <Policy>: Policies are defined in ACPOLICY.
·         <PolicyGroup>: Policy group are defined in ACPOLGRP.
Syntax:
acpload database_name db_username db_pwd  WC_Installdir/xml/policies/acp_file_name.xml

4) What is acugload?
A) The acugload is the utility to load the user access group in the appropriate database. This utility will load the <UserGroup> element in the MBRGRPUSG table.
A member group of type Access Group (-2) is for access control purposes, while a member group of type User Group (-1) is for general use.

5) What is acpnlsload?
A) The acpnlsload utility loads the XML files containing the display names and descriptions, into the appropriate databases. To insert or update display names and descriptions for the various policy related elements run the acpnlsload script.
 This script loads the following elements:
<Action_nls>, <Attribute_nls>, <ActionGroup_nls>, <ResourceCategory_nls>, <ResourceGroup_nls>, <Relation_nls>, <Policy_nls>, <PolicyGroup_nls>

6) What is acpextract?
A) The acpextract utility extracts the access control policy and access group information in the database and generates files that capture the information in XML format. It uses an input filter XML file to specify the data to extract from the database.

7) Suppose one user login into our site. He selected some of items and he has given the order. After two months, how can you check the status of the Order?
A) The status of the order can be checked from ORDERS table.
                Select STATUS from ORDERS where ORDERS_ID=XXXXXXX;

8) I want to collect user email id’s whose email id ends with @and particular company name.com. Then how can you give SQL query to Database in WCS?
A) The email id of the user can be found from ADDRESS table.  The ADDRESS_ID is the foreign key in the ORDERS table.
So for the particular user, first take the order no and fetch the ADDRESS_ID from the ORDERS table.
Use that ADDRESS_ID to get the email id for the user. Here there can be multiple addresses like permanent address (P) and the temporary address (T) for the same user. So, fetch the address with the STATUS as P.

Select EMAIL1 from ADDRESS where STATUS=’P’ and ADDRESS_ID in (select ADDRESS_ID from ORDERS where ORDERS_ID = XXXXXXX);
If you want to search email ID directly, so run the below query.
Select * from ADDRESS where EMAIL1 like ‘%@abc.com’ OR ‘EMAIL2 like ‘%@abc.com
Where EMAIL1 stands for primary email address.
EMAIL2 stands for secondary email address.

9) I want to know the particular member _id. Then tell me the relation between MEMBER tables with ORDER table?
A) The MEMBER_ID is the primary in the MEMBER table and the foreign key in the ORDERS table.

10) What kind of tables did you use?
A) In the Order management Flow following tables are used.
     ORDERS, XORDERS, ORDERITEMS, XORDERITEMS, OICOMPLIST, XOICOMPLIST, RMA, XRMA,    RMAITEM, XRMAITEM, RMAITEMCMP, XRMAITEMCMP, ORDADJUST, ORDIADJUST, CATENTRY, CATENTREL
B) In Member Subsystem, following tables are used.
USERS, MEMBER, USERREG, USERSDEMO, USERPROF, ADDRESS, ADDRESSBOOK


Setting Inventory Type:

STORE. INVENTORYSYSTEM


Indicates which inventory system is used:
  • -1 = ATP (Default value)
  • -2 = Non-ATP
  • -3 = No inventory
  • -4 = external inventory management system
  • -5 = DOM inventory system
This setting is used by the inventory component to determine inventory behavior.

11) What are JSP programming best practices?
A) Below are the JSP programming best practices:-
  • Use JSTL in place of Java Code.
  • Use commerce specific bean (<wcbase:useBean>) in place of standard bean (<jsp:useBean>) activation.
  • Use commerce specific maps to access request parameters i.e. WCParam & WCParamValues.
  • Use StoreErrorDataBean data bean for error handling. This can be used to display store specific error message in the jsp.
  •  Use appropriate includes mechanism.
ü  Static include: Includes the jsp file at the compile time.                                                                 <%@ include file=”filename.jspf” %>
ü  Dynamic include: Includes the jsp file at run time, while the request is getting processed.                                                                                  
         
<c:import url=”filename.jsp”>
 … </c:import>                                            
 <jsp:include  page=”filename.jsp” flush=”true|false”/>          

<c:import> v/s <jsp:include>:
<c:import> will offer a flexibility, and functionality improvement in addition to <jsp:include>.
  • <c:import> will allow you to specify content from other web applications, and contexts, as well as web servers; this gives you more flexibility.
  • Keep in mind though, that a static include, is always faster than a dynamic one; meaning that<%@ include file="" %> is faster than both <jsp:include> and <c:import>.
  • Technically, <c:import> should only be used if you require its functionality, or flexibility, the improvement in performance is minimal.
  • Some might state that implementing <c:import> is bad practice if you do not need it due to it being more heavy weight than <jsp:include>.

  • Use .jspf extension for the JSP segments. The parent jsp should be with .jsp extension and the included jsp should be with .jspf extension.
  • Use escapeXml attribute to preserve the HTML formatting. By default the value of the escapeXml will be true. When this value is true then the html special characters will be converted to standard entity codes.
For e.g. <c:out value=”${list.productPrice}”/>
Here the value is true by default, if there is any special character in the price, it will display the entity code in the UI
<c:out value=”${list.productPrice}” escapeXml=”false”/>
Here the value is false, if there is any special character in the price, it will display the special characters it is in the UI.
  • Use the POST method instead of GET.

12) What are different types of promotions?
A) There are three types of promotions.
  • Order Promotions
Ø  Percentage off
Ø  Fixed amount Off
Ø  Free gift with purchase
  • Product Promotions
Ø  Fixed amount off per item
Ø  Percentage off per item
Ø  Fixed amount off for all
Ø  Free gift with purchase
Ø  Buy X, get one or more items for discount
  • Shipping Promotions
Ø  Free shipping
Ø  Discounted shipping for the order using a selected shipping mode.
Ø  Discounted shipping for all the item using a selected shipping mode.
Ø  Discounted shipping per item using a selected shipping mode.

13) What are different types of calculation usages used in WCS?
A)   WebSphere Commerce performs all calculations for one calculation usage at a time. The order of calculation usages is stored in the SEQUENCE column of the STENCALUSG database table. The entries in this table are initially populated with information from the language-independent bootstrap file: wcs-bootstrap.xml.
Calculation usage
Calculation usage code
Discount
-1
Shipping
-2
Sales tax
-3
Shipping tax
-4
Coupon
-5
Surcharge
-6
Shipping Adjustment
-7

14) On what table promotion codes are stored?
A) The promotions that are created through accelerator are stored in PX_PROMOTION table.
PX_PROMOTION_ID is the primary key
STATUS: 
 0 means inactive,
1 means active,
2 means mark for deletion,
3 means suspended
4  means Obsolete.
All the promotion related information that is created from accelerator is stored in PX_PROMOTION table.
PX_PROMOTION contains PX_PROMOTION_ID,
CALCODE and CLCDPROMO are the two tables that can be used to populate the promotion code.
CALCODE consists of CALCODE_ID, STOREENT_ID, CALUSAGE_ID, CODE, DESCRIPTION, START_DATE, END_DATE, and LAST_UPDATE.
CLCDPROMO consists of CALCODE_ID and PX_PROMOTION_ID. NAME, CODE, STOREENT_ID, START_DATE, END_DATE, XML_PARAM, STATUS and etc.
ORDADJUST contains information of the promotions that are applied to the order.
ORDADJDSC consists of ORDADJUST_ID, LANGUAGE_ID, and DESCRIPTION.
ORDIADJUST consists of ORDIADJUST_ID, ORDERITEMS_ID, ORDADJUST_ID and AMOUNT.
ORDPROMOCD consists of ORDERS_ID and CODE
PromotionCodeAddRemoveControllerCmdImpl  and
 PromotionEngineOrderCalculateCmdImpl  are used to add the promotion code to the order.

15) How do you call a task command from a controller command? And what is the syntax?
A) Task commands are invoked from controller commands to perform the set of business operations.
     SYNTAX:
                OrderCalculateCmd cmd = (OrderCalculateCmd) CommandFactory.createCommand (OrderCalculateCmd.class.getName(), getStoreId()))
cmd.setCommandContext (getCommandContext ());
cmd.setRequestProperties (requestProperties);
cmd.execute ();

16) What is controller commands used in Member Subsystem?
A) UserRegistrationAddCmd for adding the user. This will insert the data of the user in USERS, USERREG, USERPROF, USERDEMO and ADDRESS table.
    UserRegistrationUpdateCmd for updating the user profile.
    LogOffCmd for logging out user session.
Customized Controller Commands in GOSP are GOSPNCIMHandShakeCmd used for authenticating the user, by hand shaking with NCIM. This command will search for user authentication token, if the authentication token is available, then the user will be allowed to sign on.
GOSPNCIMUserRegistrationFormCmd used for creating the registration form for the user.

17) For creating a Controller Command, we register Controller Command into CMDREG table? Is it necessary to register in that table? What is the main purpose to register in CMDREG table?
A) It is not necessary to enter data in the CMDREG table, but an entry should be made in the struts-config.xml.
The controller command can be registered in the CMDREG table by xml and SQL query.
To register a new controller command, or a new task command, in the CMDREG table, create an entry in the XML file for each new or customized controller or task commands, using the following example of a task command as your guide:
<cmdreg storeent_id="@storeent_id_1" interfacename= " com.ibm.commerce.payment.commands. DoPaymentCmd " classname = "com.ibm.commerce.payment.commands .DoPaymentMPFCmdImpl"/>

To register by SQL query
insert into CMDREG (storeent_id, interfacename, description, classname) values  (0,' com.ibm.commerce.payment.commands. DoPaymentCmd ', 'Payment  commands for all shops', ' com.ibm.commerce.payment.commands .DoPaymentMPFCmdImpl ').
If there is no entry for the command in the CMDREG table, then controller will check defaultCommandClassName in the interface.
public interface GOSPShipmentNotificationServiceCmd extends ControllerCommand {
                public static final String NAME = GOSPShipmentNotificationServiceCmd.class.getName();
               public static final String defaultCommandClassName = GOSPShipmentNotificationServiceCmdImpl .class.getName();
}


18) Can you list out some of the Controller Commands for giving the promotions to products, which you have been used? And explain the scenario?
A) Our custom command GOSPPromotionCodeAddRemoveCmdImpl inherits the out of box command PromotionCodeAddRemoveControllerCmdImpl to apply promotion in the shopping cart page.
Promotion codes are managed by the PromotionCodeManager component of the PromotionEngine. This is a configurable component. The default promotion code manager, WCSPromotionCodeManager, simply records promotion codes entered for an order in the ORDPROMOCD table. All promotion code managers must implement the com.ibm.commerce.marketing.promotion.code.PromotionCodeManager interface.

19) Can you list out the tag libraries in WCS?
A)    Core tags, sql tags, xml tags and fmt tags.

20) What is Dyna caching?
A) Caching improves response time and reduces system load to improve the performance of world-wide web applications.
The Dyna caching service includes:-
ü  Servlet or JSP result cache, caching the fragments of JSP or whole page.
ü  Command cache to cache business objects.
ü  Edge Side Include (ESI) caching to cache, assemble and deliver the dynamic web pages at the edge of enterprise network.
ü  Invalidation support to ensure that the content of cache is correct. Invalidation can be rule-based, time-based, group-based and programmatic.
ü  Replication support, to enable cache sharing and replication on multiple servers.
ü  Disk offload capability, to enable and storing large amount of data, preserve the content in the application server until it is restarted or stopped.
* The caching specific behaviour of the WCS is specified in the cachespec.xml present in the Stores.war.
* Dyna caching service, places the objects in the cache which is identified by unique cache-id’s (<cache-id> rules) defined in the <cache-entry> elements.
*Once the objects with particular cache-id are in the cache, then the subsequent request for the same cache-id is served from the cache.
* Cached objects are removed from the cache according to the information provided in the <cache-entry> elements such as <time-out>, <invalidation> and <priority> elements.
* When the available cache memory is full, LRU algorithm removes the cached objects with the lower priority.
* The <dependency-id> and <invalidation> elements defines the rule to generate dependency-id’s and the invalidation-id’s, which together specifies certain objects should be removed from the cache after the request is processed.
* The <inactivity> element is used to specify a time to live (TTL) value for the cache entry based on the last time that the cache entry was accessed.
Caching strategy
When determining a caching strategy for WebSphere Commerce, the key issues that need to be resolved are:
Ø  Which pages should be cached
Ø  Where caching should take place
Ø  Cache full pages or page fragments
Ø  How to invalidate the cached data.
When determining which Web pages should be cached, good candidates for caching are pages that:
Ø  Are accessed frequently
Ø  Are stable for a period of time
Ø  Contain a majority of contents that can be reused by a variety of users

The following <cache-entry> example uses a <cache-id> element to cache results created by a JSP and generate a cache ID with two components, "storeId" and "catalogId", obtained from parameters in the request object:
<cache-entry>
 <class>servlet</class>
 <name>/ToolTech/. . ./StoreCatalogDisplay.jsp</name>
 <property name="save-attributes">false</property>
 <property name="store-cookies">false</property>
 <timeout>3600</timeout>
 <priority>3</priority>
 <cache-id>
  <component id="storeId" type="parameter">
   <required>true</required>
  </component>
  <component id="catalogId" type="parameter">
   <required>true</required>
  </component>
 </cache-id>
...
</cache-entry>

21) What is the difference between WCParam and param implicit objects?
A) WCParam is a Websphere Commerce specific implicit object. This allows to access and decrypt the the HTTP request.
Param is a standard JSP implicit object, but it does not guarantee to decrypt the HTTP request.
When you don’t want to encrypt the request parameters, then following configuration needs to be done in wc-server.xml.
<NonEncryptedParameters display="false">
 <Parameter name="storeId" />
 <Parameter name="langId" />
 <Parameter name="catalogId" />
 <Parameter name="categoryId" />
 <Parameter name="productId" />
</NonEncryptedParameters>

22) What are the different ways of Cache Invalidation?
A)
Ø  Invalidating the cache using timeout: This can be done by adding <timeout>10</timeout> in side of <cache-id> element. The timeout value will be in seconds. If the default value is 0, then the cache will not expire.
Ø  Using Command invalidation: Command based invalidation means invalidation rules are executed upon the execution of the command that extends CachableCommandImpl WebSphere Command framework.
The invalidation id’s are constructed based on the fields and methods provided by command.
Ø  Invalidating cache using dyna cache API and CACHEIVL table: WebSphere provides DynaCacheInvalidation command which is called by scheduler to process the record in CACHEIVL table.
Ø  Invalidating cache using dependency trees: Using dependency id’s the cache can be invalidated.
For e.g.
<dependency-id>KitchenWare
   <component id="" ignore-value="true" type="pathinfo">
      <required>true</required>
      <value>/CategoryDisplay</value>
   </component>
   <component id="parent_category_rn" ignore-value="true"  type="parameter">
   <required>true</required>
     <value>10003</value>
  </component>
</dependency-id>

23) How to use the dyna cache API not to cache the page?
A)               
Ø  Not caching the whole page:
<%@ page import = "com.ibm.commerce.webcontroller. HttpControllerRequestObject" %>
<%@ page import="javax.servlet.http.HttpServletRequest" %>
<%@ page import="com.ibm.commerce.server.JSPHelper" %>
<%@ page import="com.ibm.commerce.command.CommandContext" %>

<%
         CommandContext commandContext = (CommandContext)request. getAttribute("CommandContext");

         HttpControllerRequestObject controllerReq = (HttpControllerRequestObject)commandContext.getRequest();

                 HttpServletRequest req = controllerReq.getHttpRequest();

                 JSPHelper.setUncacheable(req,true);

%>

Ø  Not caching the fragment of page:
     <%@ page import="com.ibm.websphere.servlet.cache.*" %>
            <%                      
              ((ServletCacheResponse)response).setDoNotConsume(true);
            %>

24) What is CommandContext ?
A)  CommandContext is the class in WebSphere Commerce, which contains session and user information and set in the Controller command before the execute method is called.
25) What is use of fmt tag?
A) fmt tag is used to display the message in locale language.
     For e.g <fmt:message key="TERMSCONDITION122C" bundle="${termsConditionText}" /></a>
26) Why JSTLEnvironmentSetup.jspf is included in jsp ?
A) This file retrieves and prepares the JSP page path, file path and resource bundle path which are used by other JSP’s. The EnvironmentSetup.jsp includes most commonly used attributes such as storeDir, jspDir, includeDir, bundleDir, etc.
27) How can you do Internationalization in WCS using fmt tag library? Tell me total flow of execution? What are the files to modify for that purpose?
A) To do Internationlization in WCS, following steps needs to be followed.
Ø  Include JSTLEnvironmentSetup.jspf in the jsp. This is required to get the path of the properties files from the environment. The properties files are fetched based on the language id.
Ø  Declare the variable name of the bundle in the jsp using the below code.                              <fmt:setLocale    value="${CommandContext.locale}" />                                                    <fmt:setBundle basename="${sdb.jspStoreDir}/GOSPNokiaTermsandCondition_NLS" var="termsConditionText" />
Ø  Get the key from the bundle and display in the jsp.                                                             <fmt:message key="TERMSCONDITION1"  bundle="${termsConditionText}" />
28) How can you take shipping address and billing address from customer? Explain?
A) The shipping and billing address of the customer are stored in the ADDRESS table. There will be two ADDRESS_ID one is for shipping and other is for billing addresses. The ADDRBOOK_ID is the foreign key in the ADDRESS table. The ADDRESSTYPE will be S for shipping , B for billing and SB for both shipping and billing.
The ORDERS table only contains the ADDRESS_ID of the billing address.

29) Do you know about .sar files? What’s the use of it?
A) Store archive file (.sar) is the zip file that contains all necessary assets to create a store or site.

30) What are the business models in WCS?
A) Business model provides sample commerce solution which includes organization structure, default roles and access control policies, one or more starter stores, administrator tools and business processes that demonstrate best practices.
Ø  Consumer Direct: A store that support commerce transactions involving products, services or information directly between businesses and consumers. eg: Madison, Aurora stores
Ø  B2B Direct: A store that supports commerce transactions between two business parties.             
·         Hub: A site that enables its customers and partners to access products and services available from business partners or clients of the hub owner.
·         Extended Site: A site that allow the selling organization to provide unique storefronts for different enterprise customers.

30) What is the difference between DataBean and AccessBean?
A) DataBean class implements SmartDataBean uses lazy fetch method. Uses appropriate AccessBean for database access. It is used in JSP.
AccessBean are light-weight simple Java Bean and it is called in the Command, to fetch all the data at once. AccessBean extends AbstractEntityAccessBean.
InputDataBean retrieves data from the URL or view command attributes.

31) What are the types of Data Bean?
A) Data Bean is Java Bean that is used in JSP to populate dynamic data.
There are three types of Data Bean,
Ø  Smart Data Bean: Smart Data Bean uses lazy fetch method to retrieve data. This type of data bean provides better performance in the situations where not all data from data beans are required. Smart Data bean that requires access to the database should extend access bean from the corresponding entity bean and implement com.ibm.commerce.SmartDataBean interface.
Ø  Command Data Bean: Command data bean relies on the command and it is more light weight. The command data bean fetches all the data at once, regardless of whether the JSP requires them or not. Command Data Bean extends corresponding Access Bean and implements com.ibm.commerce.CommandDataBean. interface
Ø  Input Data Bean: The Data Bean implementing com.ibm.commerce.InputDataBean interface retrieves data from the URL parameters or attributes set by the View.
When a JSP page is invoked, the generated servlet populates all the attributes that matched in the URL parameters and activates the data bean by passing it to the data bean manager. Then the data bean manager invokes the data bean’s setRequestProperties () method to pass all the attributes set by the view.
The following code is required to activate the data bean.
com.ibm.commerce.beans.DataBeanManager.activate (data_bean, request, response).

32) How do we use Data Bean in the JSP?
A) The below code is used to get access to data bean from JSP.
<wcbase:useBean id=”orderDB” classname=”com.gosp.order.beans.GOSPOrderDataBean” scope=”request”>
<c:set value=”${orderId}”  target=”${ orderDB }” property=”orderId”/>
</wcbase:useBean>

33) Explain about blocking an order.
A) The order will be blocked by calling task command NotifyBlockCmd or the controller command BlockNotifyCmd. When the order is blocked, the value of BLOCKED column in the ORDERS table will be 1 (means the order is blocked).
The record for the blocked orders exists in ORDERBLK table. This table contains the ORDERBLK_ID, ORDERS_ID, BLKRSNCODE_ID, RESOLVED (value 0 indicates not resolved and 1 indicates resolved).
The BLKRSNCODE and BLKRSNDESC table contains the reason for blocking the order.
The STORBLKRSN table contains the block reason that is available for the store. Here the RESPECTED column is used to make active the reason code (0 means off and 1 means on).

34) Explain Controller command programming model?
A) The new controller command should extend com.ibm.commerce.command .ControllerCmdImpl or implements abstract class or interface. While writing new controller command you must implements following methods from abstract class.
Ø  isGeneric (): In WCS, there are three types of users, registered users, guest users and generic users. The generic users have common id, and that common id is used to browse to the site.
The isGeneric () methods returns true, if the user is generic and returns for registered users.
Ø  isRetriable (): This method returns true, if the command is tried even after the transaction rollback exception or not.
For e.g. the command should be retried even after the transaction rollback exception occurred during the OrderProcess. This command invokes third party payment system for authorization process. It cannot be retried, since authorization cannot be reversed. An example of command that can be retried is ProductDisplay command.
Ø  setRequestProperties (com.ibm.commerce.datatype.TypedProperty reqParams) :
This method is invoked by the web controller to pass all the input properties to the controller command. The controller command must parse the input properties and set each individual property explicitly in this method.
Ø  validateParameters (): This method is used to validate all the request parameters before processing.
Ø  getResources (): This method is used to implement resource level access control. If the resource level action is performed, then it returns vector which contains resource-action pair and if no action is performed then it returns nothing.
Ø  performExecute ():  this method is called to perform business logic. Before calling this method, the controller command should invoke the super class performExecute () methods.
35) What is master catalog?
A) Master Catalog is a centralized location to manage stores. Everything that is required for the store is present in master catalog. It is a single catalog that contains products, items, relationships and prices that is required for sale in the store.

36) What is a fulfillment center? Can a store have a multiple fulfillment centers?
A) Fulfillment centers are used by stores as warehouses for shipping and receiving centers. One store can have multiple fulfillment centers associated with it. Inventory count is maintained separately for each fulfillment centers. Fulfillment includes picking, packing and shipping. Picking is the selection of products from one or more releases from a fulfillment centers, packing is the putting the products in the shipping container and shipping is sending them to customers.
37) What is the role of helper classes in WCS?
A) Helper class is a utility class that can be used any where and anytime without prior coding and it reduces code redundancy.
For e.g. BaseJDBCHelper is a JDBC helper class which provides interaction with the database, such as establishing connection with the database, executing the query and closing the connection.

38) Which method is invoked in the data bean for calling an access bean?
A) In the populate () method we can write the code to call access bean.

39) What is Optimistic locking?
A) Optimistic locking allows you to lower the isolation level that you use in the application, so that fewer locks are placed against the database assets. It allows more application to run concurrently against the same database.

40) Explain something about scheduler?
A) A WebSphere Commerce scheduler is a background server that schedules and launches the jobs both at the site level and the store level.
The scheduler polls the SCHACTIVE table to find the jobs scheduled to run.
Following are the value of STATE in SCHACTIVE table
Ø  W:  the job is waiting for execution
Ø  I:  the job is currently inactive.
Ø  IF: the job has run and failed.
Ø  R: the job is currently running.
Ø  RF: the job is running because of previous attempt failed.
Ø  C: the job is finished running.
Ø  CF: the job failed to execute successfully.
The scheduler gets the job configuration information from SCHCONFIG table. The job can be run only on WebSphere Commerce server and its clones.
The scheduler logs the status of the job in SCHSTATUS table.
The scheduler can broadcast the jobs on its clones and logs the broadcast job entries in SCHBRDCST table.

41) Difference between Optimistic locking and pessimistic locking?
A) Optimistic locking improves the performance of application by reducing the isolation level of the database transactions. If two or more transaction is performing the update operation of the same row, the lock on the row will be acquired by one transaction and remaining transaction will be roll backed.
Pessimistic locking protects the integrity of the database by locking the database assets over the entire duration of the transaction. But this will affect performance of the application that is running multiple transactions at a time and becomes deadlock.

42) Explain about bundle and kits?
A) There are different types of bundle and kits
Ø  Prebuilt Kit: A prebuilt kit is a collection of catalog entries that cannot be sold separately. A prebuilt kit has own its price and cannot be changed once it is added to the shopping cart. Inventory of prebuilt kit is independent of its component parts.
Ø  Dynamic Kit: A dynamic kit is a group of product that is ordered as a unit. The components of kit cannot be modified in the order, but they are reconfigured by the configurator. The entire configuration must be fulfilled together.
Ø  Static Kit:  A static kit is a group of product that is ordered as a unit. The components of kit cannot be modified in the order. The individual components within the order cannot be modified and must be fulfilled together. A static kit will be backorder if any of its components is unavailable. A static kit has no inventory of its own. When the static kit is purchased, the inventory of its component part is lowered.
Ø  Bundle: A bundle is a collection of catalog entries which allows customer to buy multiple merchandise with one click. The bundle components can be sold separately.

43) Explain exception types in WCS?                                                                                                                     
A) A command can throw two types of exceptions
Ø  ECApplicationException:  This exception is thrown; if the error is related to user input and it always fail. When the user enters invalid parameter, this exception is always thrown. When this exception is thrown, the solution controller does not retry the command, even if the command is specified as retirable.
Ø  ECSystemException: This exception is thrown if a runtime exception or any WebSphere configuration error occurs. Examples of this exception are Remote Exception, Create Exception or other EJB exceptions. When this exception is thrown, the solution controller retries the command if the command is retirable and the exception was caused by either a database dead lock or database rollback.

44) What is the purpose of Bootstrap files?
A) Bootstrap files are XML files which WebSphere Commerce uses during instance creation to populate database tables with information after the schema has been created. Once the data has been loaded, you can see the preloaded information in the table. These files are used to retrieve information about the specific data, such as calculation codes and pricing policies.

45) What is Search Engine Optimization?
A) Search Engine Optimization is considered to be the one of the most important channel that can be reached to the customer.
Dynamic Database driven URL such as those generated by WebSphere Commerce contains stop characters like (?, %, &) that can be overwhelm by search engine crawlers. For this reason, search engine limit the URL’s that they index. To overcome this limitation, WebSphere Commerce provides the functionality to help improve the results of search engine indexing.
Crawler is software that is used by search engine to index the page that is available in the website for public.
In WebSphere Commerce, we need to create static URL for the database driven dynamic URL.
For e.g.
The dynamic URL that generates the request as shown below:-
/TopCategoryDisplay?storeId=10500&languageId=-1&categoryId=56723&catalogeId=21789
This dynamic URL contains the stopping characters and it will prevent the indexing by the search engine crawlers.
To avoid this, we need to create a static URL as below:-
/CategoryDisplay_10500_-1_56723_21789
The static URL for all the request can be created by making an entry in the SEOUrlMapper.xml
<mappings>
<pathInfo_mappings separator=”_”>
                <pathInfo_mapping name=”CategoryDisplay” requestName=” TopCategoryDisplay”>
                                <parameter name=”storied” />
                                <parameter name=”languageId” />
                                <parameter name=”categoryId” />
                                <parameter name=”catalogId” />
                </pathInfo_mapping>
</pathInfo_mappings>
</mappings>
When search engine analyze the page, it gives more weightage to the page title, page header and the page first sentence of the body.

46) Explain relationship between CATENTRY and CATENTREL?
A) The CATENTRY_ID is the foreign key in the ORDERITEMS table and OICOMPLIST table.
The CATENTRY_ID is the primary key in the CATENTRY table. The relationship of the parent and child CATENTRY_ID can be defined in CATENTREL table.
The CATENTRYTYPE_ID can be Product Bean, Item Bean, Package Bean, Bundle Bean, DynamicKitBean and CatalogEntryBean.
The CATENTDESC contains all the descriptive information for the CATENTRY_ID and the CATENTRY_ID is the primary key in the table.
The LISTPRICE contains the pricing information of the CATENTRY_ID.
The OFFER table contains the OFFER_ID of the CATENTRY_ID.
The OFFERPRICE table contains the offer price of the CATENTRY_ID and the OFFER_ID is the primary key.


47) Explain something about ATTRIBUTE?
A) The ATTRIBUTE table contains all the attribute information of the CATENTRY_ID.  ATTRIBUTE_ID is the primary key. The single CATENTRY_ID can have more than one ATRRIBUTE_ID.
Examples of ATTRIBUTE are like color, Internet browser, FM Radio, Blue Tooth, Warranty, Video Recorder, Music player, etc.
ATTRIBUTE specifies all the features that are available for the CATENTRY_ID.
THE ATTRTYPE table contains attribute type information. ATTRTYPE_ID can be STRING, FLOAT, INTEGER, DATETIME, FREEFROM, BIGINT, and ATTACHMENT.
The ATTRVALUE table contains the STRINGVALUE and the FLOATVALUE description of the ATTRIBUTE_ID based on the store specific LANGUAGE_ID.

48) Explain something about EMSPOT?
A) All the Marketing spot that is created in the application will have record in the EMSPOT table.
EMSPOT table consists of EMSPOT_ID, STORE_ID, NAME, DESCRIPTION and USUAGETYPE
ESMAPOBJ table consists of mapping between ESMAPOBJ_ID and the OBJECT_ID.

49) Explain something about INVENTORY?
A) The INVENTORY contains information like CATENTRY_ID,  STORE_ID, FFMCENTER_ID, QUANTITY and INVENTORYFLAGS.
INVENTORYFLAGS values can be as below:-
1 = noUpdate. The default UpdateInventory task command does not update QUANTITY.
2 = noCheck. The default CheckInventory and UpdateInventory task commands do not check QUANTITY.

50) Explain something about ADDRESS and ADDRBOOK?
A) ADDRBOOK table contains the address owned by the member. ADDRESS_ID is the primary key.
ADDRESS table consists of Member own address, friend address and etc.  ADDRESS_ID is the primary key; ADDRESSTYPE can be Shipping S, Billing B or Shipping and Billing SB.

51) Explain SHIPMODE, SHIPINFO, SHPMODEDSC, SHPMODCLCD, SHPARRANGE, and SHPJCRRULE.
A) SHIPMODE – Each row of this table represents the shipmode for store entity.  
SHIPMODE_ID, STOREENT_ID, CODE, CARRIER and MARKFORDELETE (0 by default)
SHPARRANGE- Each row of this table represents a ShippingArrangement, indicating that a FulfillmentCenter can ship products on behalf of a Store using a ShippingMode.                      SHPARRANGE_ID, STORE_ID, FFMCENTER_ID, SHIPMODE_ID.
SHPMODEDSC-Each row contains the language dependent description of the ship mode.

http://kingofwcs.blogspot.co.uk/2011/01/wcs-interview-questions.html


General
  • JSTL tags and its details?
                <TODO: answer>
  • How to configure JMS in wcs?
  • How to develop webservice in wcs?
                <TODO: answer Refer AddressLookup service>

  • Explain the access control policy?What is the purpose of access control policy?
  • How to publish the store?what you mean by starter store?
Ans:        Admin Console->Site ->Store Archives->Publish->..Finish
  • How to setup payment ,tables,payment policy,payment types ?
  • Explain the Dynacache?
  • How to enable single sign on?
  • How to enable cross site scripting?
  • How to do fitgap analysis in WCS?
  • What the EJB transaction parameters?
  • which are different types of entity beans n which one is used in commerce?
  • Which are the different types of databeans. What is commonly used in commerce.when do we use it?
  • which are the different flavours of EJB in wcs ?
  • What are acessbeans? What is the advantage of accessbean?
  • How to read the object status from the Remote Java VM?
  • Steps of insert and read data into commerce tables?
  • State one diff between 6.0 and 7.0 commerce version?
  • what is optimistic locking?
  • Which are the different subsystems in commerce?
  • What are the different tools available in commerce?
  • How to schedule job in the commerce ,tables ?
  • Which are the different databases which commerce supports?
  • Which is default database in commerce?
  • Explain Control command and task command in wcs ?
  • What is the use of KEYS table in wcs ?
  • What is the use of CMDREG table in wcs ?
  • How to instatiate a databean -2 ways?
  • What is a command context.?
  • List different types of command context ?
  • How do you instantiate a task command ?
  • Can we instantiate controller command from another controller command ?
  • How do you pass data from controller command to task command?
  • Name five methods available in a Controller command?
  • What is validateParameters() used for?
  • What is the purpose of isRetriable() method in a controller command?
  • what is the first method executed when a controller command is invoked?
  • What is the method called when a databean is invoked?
  • what is the use of optCounter field?
  • List all tag libraries used in a JSP?
  • Why is struts-config entry required while creating a JSP or a command?
  • What is the use of commitCopyHelper() and refreshCopyHelper()?
  • What does map.mapxmi file contain?
  • what does stores project contain?
  • While creating a new View, what are the entries made in struts-config xml?
  • What is format tag used for?
  • what is a locale?
  • What does SAR file mean?
  • What is the default store for b2c?
  • What are the different editions of WCS?
                                Ans:
                                                ·  Express
                                                ·  Professional
                                                ·  Enterprise

  •  List the different business models of wcs ?
  • Which are different types of Exceptions used in commerce?
  • Whats the difference between system Exception and Application Exception?
  • Which exception is retriable?
  • How can we make a command retriable?  Ans:  this.setRetriable(false); in Cmd.
  • Which  the main Exception class used in commerce?
  • Functional architecture and Runtime architecture of WCS 6.0/WCS 7.0.
Member subsystem
  • Organization hirarchy?
  • Different tables used for user registraton?
  • Releationship between the user and organization?
  • How to create roles ?
  • How to create users?
  • How to create organization?
  • What are the different typs of user types?  Generic, Guest and Registered
  • What are the different types of member groups

Merchandizing
  • How to setup promotion- explain the tables used for promotion ?
  • How to create campagin activity?
  • What are the diffent activity in marketing campaign?

Order Subsystem
  • Explain the differnt order status?

  • Difference between the order item and orders and tables ?
  • Different types of promotions and details with tables?
  • Explain the Calculation frame work with example and tables?
Accelerator
  • Explain the Acceleretor framework?
  • Explain in detal any customisations or development done in acceleretor using Notebook, Wizard, Dialogs?
  • Best practices for customizing accelretor?

Adminstration
  • How to setup the email?
  • What is the use of transport option in administration console?

Contracts
  • How to create contract?
  • How to setup the Catalog filter and explain with tables?

Catalog
  • Difference between mastercatalog and sales catalog?
  • How to setup different category - tables and commands?
  • Explain the SKU,partnumber with catalog tables?
  • What is dictionary?
  • Which tool is used for catalog management ?
  • what is the difference between product and item?
wcs7.0
  • About wcf


http://www.buggybread.com/2013/03/ibm-wcs-websphere-commerce-interview.html

IBM WCS ( Websphere Commerce ) - Interview Questions and Answers



1. What is the difference between Controller and Task Command.

Ans. Controller Command is the command that gets called upon a request, just like We have actions in struts and controller in Spring. Task is a step in this bigger process. Task command are the commands that perform specific task for a controller command, like service classes in other frameworks. In order to complete the request, a controller command may invoke multiple task commands.

Other difference are -
 a. There is a url mapping for controller command whereas Task command don't have URL mapped to them.
 b. Controller command gets invoked before the task command.

2. What is difference between Product and Item ?

Ans. Item is a sale-able merchandise where as Product is a group of sale-able merchandise which share certain attributes. For example - Cell phone is a product whereas Samsung Galaxy S2 - White is an item.

Quantity is always attached to SKU ( Stock keeping unit ) or items. Product quanity has no relevance in terms of identify the current stock or reorder condition. 

3. How Promotions are created and stored in WCS ?

Ans. Promotions are created either using Management Center or Accelerator. PX_PROMOTION table is used to store Promotions. Complete Promotion is stored as an XML string within XMLPARAM column. Other tables which are used to store promotion related information are -

CATENTCALCD
CALCODE
CLCDPROMO

4. What is purchase condition and reward in promotions ?

Ans. Purchase condition is the condition that must be fulfilled before a promotion is applied and Reward is the benefit that is passed to customer.

For Example - If promotion is "Buy 2 Quantity of  X,  Get Y Free" , Purchase condition is inclusion of 2 qty of X in Cart. Reward in this case would be 1 qty of Y.

5. What steps are needed to create a new promotion type ?

Ans.

a. Create necessary lzx files( template , object definition and properties ), make config entries and then Build open Laszlo project ( for LOBTools ) so that new promotion type should be displayed in management center.
b. Create a new promotion type xsl ( promotion type template ) and then map it to the promotionn type.

6. How can you check the status of an ORDER ?

Ans. By querying the STATUS from the ORDERS table.

7. I want to collect email addresses of all Registered Users. Which table should I refer ?

Ans. ADDRESS

8. How can i get to know all the active promotions without going to management center ?

Ans. We can query the DB as follows 

Select NAME from PX_PROMOTION where STATUS=1;

9. How can we remove a JSP page from getting cached ?

Ans. Remove the jsp entry from cachespec.xml.

10. Where do we store DB configuration and how can we change that ?

Ans. wc-server.xml stores the DB configuration. We can either change it manually or by using setdbtype command.  

11. Which table holds the encrypted login password ?

Ans. USERREG

12. How can we enable promotion engine logs ?

Ans. By making Debug=true within WCSPromotionEngineConfig.xml   

13. What are the steps to create a new business policy ?
Ans.

Step 1 - Create a new policy definition by adding record in tables POLICY, POLICYDESC.
Step 3 - Associate commands to the new policy by adding records in POLICYCMD.
Step 2 - Associate the new policy with its terms and conditions by adding a record in relationship table POLICYTC.
Step 4 - Add reference to the policy in the respective contract xml file.   


14. Define Business policy categories provided by WCS ?

Ans.
Catalog business policies
Catalog business policies define the scope and characteristics of the catalog of products for sale in a store including prices and the categorization of products in a store's catalog.
Payment business policies
Invoicing, payment, and refund business policies define how a store accepts payments, pays refunds, and the format of a store's invoices.
Returns business policies
Returns business policies define if refunds are accepted, the time period they are accepted for, and any re-stocking fees applied to returns.
Shipping business policies
Shipping business policies define the shipping providers a store can use and the charges associated with each type.
Referral interface business policies
Referral interface business policies define the relationship between a proxy store and a remote store.
15. Where do we specify the buyer seller relationship ?

Ans. In the contract xml files. 

16. How Access control Policies are implemented in WCS ?

Ans. There are three elements i.e Users ( Who want access ) , Actions ( What kind of Access ) and Resources ( Whose Access ). The relationship between resource and user is store in ACRELATION table and ACRESREL associate a resource and relationship.

17. What are the tables used for Access control ?

Ans. ACPOLICY , ACPOLDESC , ACACTION , ACRELATION , ACRESREL , ACRESGRP.

18. Who manages the Access control policies and How ?

Ans. Site Administrator and through Org Admin Console.

19. What are the design patterns used in WCS ?

Ans. MVC , Display Design and Command.

20. What is reload interval and where it is defined ?

Ans. reload interval or jsp caching interval is a parameter that indicates how frequently a JSP should be recompiled.

It is defined within 

Stores.war\WEB-INF\ibm-web-ext.xmi





21. What information is stored in CACHEIVL table and How does this help in caching ? 

Ans. This table records the changes to product or category information in the database. This is referred by WCS for invalidating dynacache.

22. What are the different types of Auctions in WCS ?

Ans. open cry, sealed bid, and dutch.

23. Can we schedule auctions and promotions in WCS ?

Ans. Yes

24. How do we set Auctions in WCS ?

Ans. Through Accelerator. 

25. What is SKU ?

Ans. SKU is Stock keeping unit. Items are referred to as SKU as they are the narrowest identifier for which business needs to track quantity.

26. Why can't we add Products while specifying Target Catalog entry in Promotions?

Ans. Product refer to category of Items and hence can't be associated to a particular Stock keeping unit. Items can only be targeted while creating promotions.

27. What is B2C and B2B Business model ?

Ans. B2C business deals with selling merchandise directly to consumers whereas B2B business deals with selling / coordination with other businesses ( partners , distributors , affiliates etc ) for selling merchandise. 

28. Explain concept of Hubs and Extended site stores ?

Ans. Hub and Extended sites /stores are used in case of selling through partners and affiliates. Hub is the central site around which extended stores are created by/for the respective partner / affiliate. Store owner performs the extended site administrations whereas overall control over merchandise remains with the site.

29. What are eSpots and How do we manage them ?

Ans. eSpot is the mechanism in WCS to schedule and display dynamic content. Content management for these slots are done through Accelarator.

30. What are different Business Models supported by WCS ?

Ans. B2C , B2B , Supply Chain , Extended Sites.

31. What is dynacache and role of cachespec.xml in WCS ?

Ans. Dynacache in WCS is the object cache. Instead of creating objects again and again , the store objects are rendered on the basis of matched rules. Caching rules are stored in a configuration file called cachespec.xml.

32. Can we see objects cached in Dynacache ?

Ans. We can see , monitor and can even change dynacache manually but for that we need to install a seperate application provided by WCS.

33. How to enable Cross Site scripting protection in WCS ?

Ans. By specifying XSiteScriptingProtection within wc-server.xml. Prohibited characters and attributes are specified within XSiteScriptingProtection to protect the application from any XSS attach.

34. What is an Asset store ?

Ans. Asset stores are collections of sharable resources (business artifacts, business processes and storefront assets) that can be leveraged in other stores.  

35. What is an Attribute Dictionary and What are its benefits ?

Ans. Attribute dictionary is a set of common attributes that can be reused by multiple products. 

The attribute dictionary provides a central place to manage shared attributes, with the following features:
  • The ability to standardize attributes.
  • The ability to easily compare attributes shared by products and SKUs.
  • The ability to quickly change attributes in one place to affect all catalog entries.
36. What is ETL ?

Ans ETL is Extract , Transform and Load. As the name suggest , it is the process of Data extraction , fabrication and then transfer to Database. Data Migration is one case of ETL.

37. Whats is a starter store ?

Ans. Its the default store that comes in built with WCS.

38. What is SAR file ?

Ans. Its the Store Archive that holds the store Assets in the compressed form. 

39. What is suborder ?

Ans. Part of the order that needs to be shipped to a particular Address. There could be an Order where different portions needs to be delivered to different addresses. Each portion in such case is a suborder.

40. What is backorder ?

Ans. The status of an ordered product when inventory allocation has determined that the product is not available.

42. What is cross-selling ?

Ans. Selling of Merchandise across stores. For example - Store A selling Store B's merchandise.

43. What is fulfillment center ?

Ans. Fulfillment center or Delivery Center is the store or warehouse from where the actual delivery of merchandise takes place.

44. What is a retriable command ?

Ans. A retriable command is a controller command that can re-execute itself after encountering a system-level exception during the command execution.  

45. What are the benefits of Smart bean ?

Ans. A smart data bean uses a lazy fetch method to retrieve its own data. This type of data bean can provide better performance in situations where not all data from the access bean is required, since it retrieves data only as required.

46. Describe Marketing subsystem and What WCS components are part of this system ?

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.

Various components are -

1. Promotions
2. Auctions
3. eSpots
4. e Mail Campaigns
5. Hubs and Extended sites for affiliates 

47. Describe Catalog subsystem and the tables used in WCS for managing this ?

Ans. The catalog subsystem or Catalog Management provides online catalog navigation, partitioning, categorization, and associations. In addition, the catalog subsystem includes support for personalized interest lists and custom catalog display pages. 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.


Tables used for Catalog subsystem

1. CATENTRY

2. CATENTREL

48. Is it necessary to register controller command  in CMDREG table ? 

Ans. It is not necessary to enter data in the CMDREG table, but an entry should be made in the struts-config.xml. The controller command can be registered in the CMDREG table by xml and SQL query. 

49. What are the tag libraries used in WCS ? 

Ans. Core tags, sql , xml and fmt tags. 
50. What is acugload?


Ans. acugload is the utility to load the user access group in the appropriate database. 

51. What is acpnlsload ?


Ans. acpnlsload loads the XML files containing the display names and descriptions, into the appropriate databases. 

52.  What is acpextract ?

Ans. acpextract extracts the access control policy and access group information in the database and generates files that capture the information in XML format.

53. What are the tables used for Order Management ?

Ans. ORDERS, XORDERS, ORDERITEMS, XORDERITEMS, ORDADJUST, ORDIADJUST

54. What are the tables used for Catalog Management ?

Ans. CATALOG , CATALOGDSC , CATENTRY, CATENTREL, CATENTATTR, ATTRIBUTE, ATTR , ATTRVAL , ATTRDESC , ATTRVALDESC , CATENTTYPE , CATGPENREL.

55. What are the tables used for Member Management ?

Ans. USERS, MEMBER, USERREG, USERSDEMO, USERPROF, ADDRESS, ADDRESSBOOK 

56. What are different types of Promotions ?

Ans. Order , Product and Shipping.

57. What is difference between OrderItemAdd and OrderItemUpdate 
command ?

Ans. OrderItemUpdateCmd can do all that OrderItemAdd command can do. In addition, it can also update products and items in the existing order list.

58. Can we call a task command by specifying action mapping in struts ?

Ans. No, a task command is not set up to handle web requests directly.

59. Explain the trade off in using Data bean against Access bean ?

Ans. DataBean's implement more caching than a AccessBean, so potentially reduce calls to the database.

DataBean's are appropriate for use in the JSP pages that make up the site / web application as the number of instances is likely to be low and it should help control the number of transactions hitting the database.

AccessBean's are much less memory intensive, so can be more appropriate to looping processes etc.

60. Explain exception types in WCS? 

Ans. Command can throw two types of exceptions 

ECApplicationException: This exception is thrown; if the error is related to user input and it always fail. When the user enters invalid parameter, this exception is always thrown. When this exception is thrown, the solution controller does not retry the command, even if the command is specified as retriable. 

ECSystemException: This exception is thrown if a runtime exception or any WebSphere configuration error occurs. Examples of this exception are Remote Exception, Create Exception or other EJB exceptions. When this exception is thrown, the solution controller retries the command if the command is retriable and the exception was caused by either a database dead lock or database rollback. 



61. What is the purpose of Bootstrap files ? 

Ans. Bootstrap files are XML files which WebSphere Commerce uses during instance creation to populate database tables with information after the schema has been created. Once the data has been loaded, you can see the preloaded information in the table. These files are used to retrieve information about the specific data, such as calculation codes and pricing policies. 

62. Explain relationship between CATENTRY and CATENTREL?

Ans. The CATENTRY_ID is the foreign key in the ORDERITEMS table and OICOMPLIST table. The CATENTRY_ID is the primary key in the CATENTRY table. The relationship of the parent and child CATENTRY_ID can be defined in CATENTREL table. The CATENTRYTYPE_ID can be Product Bean, Item Bean, Package Bean, Bundle Bean, DynamicKitBean and CatalogEntryBean. The CATENTDESC contains all the descriptive information for the CATENTRY_ID and the CATENTRY_ID is the primary key in the table.

The LISTPRICE contains the pricing information of the CATENTRY_ID. The OFFER table contains the OFFER_ID of the CATENTRY_ID. The OFFERPRICE table contains the offer price of the CATENTRY_ID and the OFFER_ID is the primary key. 

63. Explain something about ATTRIBUTE ?

Ans. The ATTRIBUTE table contains all the attribute information of the CATENTRY_ID. ATTRIBUTE_ID is the primary key. The single CATENTRY_ID can have more than one ATRRIBUTE_ID. Examples of ATTRIBUTE are like color, Internet browser, FM Radio, Blue Tooth, Warranty, Video Recorder, Music player, etc. ATTRIBUTE specifies all the features that are available for the CATENTRY_ID. THE ATTRTYPE table contains attribute type information. ATTRTYPE_ID can be STRING, FLOAT, INTEGER, DATETIME, FREEFROM, BIGINT, and ATTACHMENT. The ATTRVALUE table contains the STRINGVALUE and the FLOATVALUE description of the ATTRIBUTE_ID based on the store specific LANGUAGE_ID. 

64. Explain something about EMSPOT? 

Ans. All the Marketing spot that is created in the application will have record in the EMSPOT table. EMSPOT table consists of EMSPOT_ID, STORE_ID, NAME, DESCRIPTION and USUAGETYPE ESMAPOBJ table consists of mapping between ESMAPOBJ_ID and the OBJECT_ID. 

65. Explain about INVENTORY table ? 

Ans. The INVENTORY contains information like CATENTRY_ID, STORE_ID, FFMCENTER_ID, QUANTITY and INVENTORYFLAGS. INVENTORYFLAGS values can be as below:- 1 = noUpdate. The default UpdateInventory task command does not update QUANTITY. 2 = noCheck. The default CheckInventory and UpdateInventory task commands do not check QUANTITY. 

66. Explain something about ADDRESS and ADDRBOOK tables? 

Ans. ADDRBOOK table contains the address owned by the member. ADDRESS_ID is the primary key. ADDRESS table consists of Member own address, friend address and etc. ADDRESS_ID is the primary key; ADDRESSTYPE can be Shipping S, Billing B or Shipping and Billing SB. 

67. What are the difference between B2B and B2C ?

Ans. In B2C customer can access store directly and make online purchases whereas In B2B , Its the store business between organizations.

68. What is Store Access Bean ?

Ans. Its an access bean related to Store Table. 

69. We need to store an attribute color for few SKU. What all tables we will store information in ?

Ans. Attribute "color" will be stored as a record in tables ATTR and ATTRDESC. All possible values for this attribute will be stored in tables ATTRVAL and ATTRVALDESC. Association between Attribute , Attribute Value and Catentry will be stored in CATENTRYATTR table.    

70. Can we call multiple controller Commands from a JSP ?

Ans . Yes


71. What do you mean by optimistic locking ?

Ans. Database tables are open for read/write over entire network for all users/sessions. It results in increased throughput but results in the loss of updates during parallel access. For ex -


- User x reads a record
- User y reads the same record
- User x updates that record
- User y updates the same record


User y has now over-written the changes that User x made.



72. What is Asset Store ?


Ans. Asset stores are collections of sharable resources that can be used in other stores. An asset store is typically composed of the assets that can be used by stores, but is in itself not a functional store and does not conduct business transactions.

73. What is the relation between MEMBER tables with ORDER table?


Ans. The MEMBER_ID is the primary key in the MEMBER table and the foreign key in the ORDERS table.


74. What are different types of calculation usages used in WCS?


Ans.   WebSphere Commerce performs all calculations for one calculation usage at a time. The order of calculation usages is stored in the SEQUENCE column of the STENCALUSG database table. The entries in this table are initially populated with information from wcs-bootstrap.xml.

75. What are Controller Commands used in Member Subsystem ? 

Ans. 

UserRegistrationAddCmd for adding the user. This will insert the data into tables 

- USERS
- USERREG
- USERPROF
- USERDEMO
- ADDRESS

UserRegistrationUpdateCmd for updating the user profile.


LogOffCmd for logging out.

Customized Controller Commands in GOSP are GOSPNCIMHandShakeCmd used for authenticating the user, by hand shaking with NCIM. This command will search for user authentication token, if the authentication token is available, then the user will be allowed to sign on. 
GOSPNCIMUserRegistrationFormCmd used for creating the registration form for the user.

76.  Is it necessary to register a Controller Command in CMDREG table? 

Ans. It is not necessary to enter data in the CMDREG table, but an entry should be made in the struts-config.xml. The controller command can be registered in the CMDREG table by xml and SQL query.
 
77. What is the difference between WCParam and param implicit objects ?


Ans. WCParam is a Websphere Commerce specific implicit object. This allows to access and decrypt the the HTTP request. Param is a standard JSP implicit object, but it does not guarantee to decrypt the HTTP request.

78.  What is CommandContext ?

Ans. CommandContext is the interface in WebSphere Commerce, which contains session and user information and set in the Controller command before the execute method is called.


79.  What is use of fmt tag?

Ans. fmt tag is used to display the message in locale language.

For e.g <fmt:message key="Color" bundle="${ColorProperties}" /></a>


80.  Why JSTLEnvironmentSetup.jspf is included in jsp ?


Ans. This file retrieves and prepares the JSP page path, file path and resource bundle path which are used by other JSP’s. The EnvironmentSetup.jsp includes most commonly used attributes such as storeDir, jspDir, includeDir, bundleDir, etc.

81. What do you mean by shipping address and billing address of customer ? How do we store them in DB ?


Ans. The shipping and billing address of the customer are stored in the ADDRESS table. There are two records in this table - one is for shipping and other is for billing addresses. The ADDRBOOK_ID is the foreign key in the ADDRESS table. The ADDRESSTYPE will be S for shipping , B for billing and SB for both shipping and billing.

82. What is the difference between DataBean and AccessBean?


Ans. 
DataBean class implements SmartDataBean uses lazy fetch method. Uses appropriate AccessBean for database access. It is used in JSP.


AccessBean are light-weight simple Java Bean and it is called in the Command, to fetch all the data at once. AccessBean extends AbstractEntityAccessBean.


83.  Explain about blocking an order ?


Ans. The order will be blocked by calling task command NotifyBlockCmd or the controller command BlockNotifyCmd. When the order is blocked, the value of BLOCKED column in the ORDERS table will be 1 (means the order is blocked).




84.  What is master catalog?


Ans. Master Catalog is a centralized location to manage stores. Everything that is required for the store is present in master catalog. It is a single catalog that contains products, items, relationships and prices that is required for sale in the store.



85.  What is a fulfillment center? Can a store have a multiple fulfillment centers?


Ans. Fulfillment centers are used by stores as warehouses for shipping and receiving centers. One store can have multiple fulfillment centers associated with it.


86. What is the role of helper classes in WCS?


Ans.  Helper class is a utility class that can be used without prior coding and it reduces code redundancy.
 
87. Which method is invoked in the data bean for calling an access bean?


Ans. We can write the code to call access bean in the populate () method

88. What are Loading Utilities ?

Ans. Utilities provided by WCS for preparing and loading data into WCS Database.

89. Is it possible to retrieve data using access bean on the jsp page ?

Ans. Yes.  

90. What is the difference between WCS version 5.6 , 6.0 and 6.0.1 in relation to Struts framework ?

Ans. 5.6 doesn't use struts. 6.0 started using struts and Validation got introduced with 6.0.1.

91. What is OPTCOUNTER ? How does it work ?

Ans. OPTCOUNTER is the field used in all tables for Optimistic locking. Whenever a client updates a record in the table , WCS increments the OPTCOUNTER for that table so that this value can be compared in case the other client try to update it to see if someone else updated it in the duration between its retrieval and update.

92. What is ATTRTYPE table used for ?

Ans. It is used for storing data type of attribute values. Valid values: INTEGER, STRING, FLOAT, DATETIME, FREEFORM or BIGINT.
   
93. Explain something about EMSPOT?


Ans. All the Marketing spot that is created in the application will have record in the EMSPOT table.


EMSPOT table consists of EMSPOT_ID, STORE_ID, NAME, DESCRIPTION and USUAGETYPE


ESMAPOBJ table consists of mapping between ESMAPOBJ_ID and the OBJECT_ID.


94.  Explain something about INVENTORY table ? Whats does INVENTORY FLAGS used for ?


Ans. 

The INVENTORY contains information like CATENTRY_ID,  STORE_ID, FFMCENTER_ID, QUANTITY and INVENTORYFLAGS.

INVENTORYFLAGS column can contain values as follows -


- noUpdate. The default UpdateInventory task command does not update QUANTITY.
 

- noCheck. The default CheckInventory and UpdateInventory task commands do not check QUANTITY.

95. Name few WCS controller commands used in your application for Order subsystem ?

Ans.   

OrderCreateCmd
OrderItemAddCmd
OrderItemDeleteCmd
OrderItemUpdateCmd
OrderProcessCmd
ProcessOrderCmd
PrepareOrderCmd
PreProcessOrderCmd

OrderCancelCmd
OrderDisplayCmd



96. Name few WCS controller commands used in your application for Member subsystem ?


Ans.

PostOrgEntityAddCmd
PostOrgEntityUpdateCmd
CheckUserInMemberGroupCmd

LogonCmdImpl
DBAuthenticationCmd
LDAPAuthenticationCmd
LogoffCmd


97. Name few WCS controller commands used in your application for Catalog subsystem ?

Ans.

AttributeCreateControllerCmd
ProductPricingControllerCmd
CategoryDisplayControllerCmd
ProductDisplayControllerCmd
GetContractUnitPriceCmd
 

98. Name few WCS controller commands used in your application for Marketing subsystem ? 

Ans.  

PromotionCodeAddRemoveControllerCmd

AddOrderItemWithPromotionCodeOrCouponCmd
CouponAddRemoveControllerCmd
99. What are different Order Status ?

Ans. Pending , Schedule, Submit , Pending Payment Approval , Payment authorization complete ,  Approve , CSR Edit , CSR Submit , Release , Shipment, Backordered , Order Transferred ,  Cancel , Close.


100. What are the different types of Users ?

Ans. Generic , Guest and Registered.


101. What are the different roles a user can have in WCS ?

Ans. Site Administrator , Seller , Buyer , CSR , Buyer Administrator , Buyer Approver , Marekting Manager , Store Administrator , Operations Manager , Returns Adminsitrator , Cateogry Manager , Logistics Manager, Sales Manager.


102. What does Order Prepare Command do ?

Ans.

  -update order item address
  -update order item validation
  -update order item prices
  -update order item total
  -update auto added order items
  -check order inventory

  -determine prices
  -discounts
  -shipping charges
  -shipping adjustment
  -taxes
  -Lock the order

  -ensure all orderitems are buyable
 

103.  What are the steps to Publish a Controller Command as a Web                     Service ?
  • Identify the business logic that you want to expose as a Web service.
  • Identify the controller command that represents this business logic. If it is not available, then create a new controller command. You can write new commands to call a collection of existing commands.
  • Identify the mandatory and optional parameters that this command requires.
  • Create a WSDL description for the Web service.
  • Register the WSDL description.
  • Write a JSP page to compose a response.
  • Deploy the service. This includes the deployment of related files and resources. In case of a new command, you must deploy and register it in the WebSphere Commerce command registry.


http://cceil.biz/cceil/websphere-commerce-server/websphere-commerce-server-interview-questions/

  1. How do you instantiate a task command ?
  2. When does WCS check if there are any promotions associated with a product/item or with a product/item or order?
  3. Why does WCS use Command pattern?
  4. Which are different types of Exceptions used in commerce?
  5. What is the difference between system Exception and Application Exception?
  6. Which exception is retriable?
  7. How can we make a command retriable?
  8. Can you please explain the difference between B2B and B2C flow in WCS ?
  9. What is reload interval? where do we configure reload interval?
  10. What is EJB copyHelper?
  11. Difference between different types of DataBean?
  12. Explain exception types in WCS (IBM Websphere Commerce)?


http://www.careerride.com/Websphere-Interview-Questions.aspx
WebSphere - What is WebSphere? - Feb 24, 2009, 19:00 pm by Vidya Sagar

What is WebSphere?

WebSphere refers to a brand for IBM software products. It is designed for setting up, operation and integration of electronic business applications. These applications could perform well on cross platform environment. These set of software are java based web technologies.
WebSphere - What is WebSphere? - Nov 20, 2009, 12:40 pm by Amit Satpute

What is WebSphere?

WebSphere is a set of Java-based tools from IBM that allows customers to create and manage sophisticated business Web sites.

WebSphere - What is WebSphere Commerce? - Feb 24, 2009, 19:00 pm by Vidya Sagar

What is WebSphere Commerce?

WebSphere Commerce is a software platform framework from IBM. This framework provides the functionality for e-commerce, including sales, marketing, customer support and order processing functionality. These functions are performed using a tailorable and integrated package. WSC is a unified and single platform. This platform offers to perform the functionality between businesses to customer, business to business through channel partners. WSC is a scalable, highly reliable and customizable solution which is built on JEE platform. WSC uses the open standards such as XML and Web services.
WebSphere - What is WebSphere Commerce? - Nov 20, 2009, 13:10 pm by Vidya Sagar

What is WebSphere Commerce?

  • IBM WebSphere Commerce is a software platform framework for e-commerce, including marketing, sales, customer and order processing functionality in a tailorable, integrated package.
  • It is a single, unified platform which offers the ability to do business:
    1. directly with consumers (B2C),
    2. with businesses (B2B),
    3. indirectly through channel partners , or
    4. all of these simultaneously.
  • It is a customizable, scalable and high availability solution built on the Java EE platform using XML and Web services.

Explain the architecture of Web Sphere.

WebSphere architecture consists of one or more computer systems which are called nodes. Nodes are available within WebSphere cell. A WebSphere cell can have one node. On this node all the needed softwares installed. If a WebSphere cell contains more than one node, then all the software components are distributed among the nodes. The software components that are installed in one node can share in the distributed environment. This distribution enables for scalability, reliability.
The following are the components:
  • A web server which provides the services of HTTP
  • A database server for data persistence
  • WebSphere Application Server (WAS)
WebSphere - Explain the architecture of Web Sphere - Nov 20, 2009, 15:00 pm by Amit Satpute

Explain the architecture of Web Sphere.

The WebSphere HTTP plug-in architecture has the following characteristics:
  • The Web server plug-in is implemented as a filter, which examines all incoming HTTP requests and routes them to other Web servers based on the composition of the URL.
  • Each Web server has it’s own API that allows filters to be implemented.
  • Standards-based protocols (HTTP/S) that are supported by firewall products are used.
  • SSL can be used within the DMZ to encrypt network traffic between the Web server and the application server.
  • The configuration file used by the plug-in is XML-based, and easy to administer. Multiple redirection rules may be defined to one or more application servers as dictated by the topology chosen.
  • The plug-in supports load balancing and failover capabilities, which offer further scalability with very little additional administrative effort.
WebSphere - State some of the features present in web sphere - Feb 24, 2009, 19:00 pm by Vidya Sagar

State some of the features present in web sphere.

The following are the features of WebSphere:
  • Suports the Servlet/JSP container functionality which runs on top of HTTP.
  • Supports HTTP servers such as IBM HTTP server, MS IIS and Netscape iPlanet server.
  • Supports HTML pages, Setvlets, Java Server Pages and XML.
  • Supports EJB component model, Workload Management. WLM supports multiple servers within a single administrative domain.
WebSphere - State some of the features present in web sphere - Nov 20, 2009, 15:00 pm by Amit Satpute

State some of the features present in web sphere.

WebSphere applications use the following kinds of technologies:
  • Java specifications and other open standards for developing applications
  • WebSphere programming model extensions to enhance application functionality
  • Containers and services in the application server, used by deployed applications, and which sometimes can be extended
WebSphere - What is Web sphere MQ JMS Provider? - Feb 24, 2009, 19:00 pm by Vidya Sagar

What is Web sphere MQ JMS Provider?

The usage of WebSphere MQ is employed to use as Java Message Service provider for JEE applications which are deployed in WebSphere Application Server.
The WebSphere MQ JMS is message service provider for WebSphere MQ systems. It is a set of Java classes. These classes allow the usage of JMS applications to access WebSphere MQ systems. The models point-to-point and publish/subscribe of JMS are supported by MQ JMS provider.
WebSphere - What is Web sphere MQ JMS Provider? - Nov 20, 2009, 13:00 pm by Amit Satpute

What is Web sphere MQ JMS Provider?

  • IBM WebSphere MQ classes for Java Message Service are a set of Java classes that enables the JMS applications to access WebSphere MQ systems.
  • Both the point-to-point and publish/subscribe models of JMS are supported.
  • These Java classes are available as part of the IBM WebSphere MQ client support.



http://wcsbasics.blogspot.in/

Promotions in WCS. 

Promotions provide the ability to attract the customers to purchase the items from the site and make them visit once again once the promotions are available. WCS supports 3. types of promotions which play the vital role for any site which is developed in WCS, the following are the types of promotions that WCS supports
  1. Catalog-Entry level
  2. Order level
  3. Shipping level
Catalog-Entry Level Promotions: Under this type the WCS supports some kind of promotions that are related to the catalog,category.
For example : Buy Catalog entry A,Get Catalog Entry B free
                      Buy Catalog Entry A, Get some percentage off on the purchase of Catalog entry B.
                      Percentage off on the total amount on purchase of catalog entries fro a category.
                      Amount off on the subtotal of catalog entries of a category.
                      Buy X & Y , get a percentage off on both, etc.

Order level Promotions: Under this type of promotions we deal the promotions which are enabled during when the order is getting placed by a customer in the site.
For example : Percentage off on an order
                      Certain amount off on the order being placed
                      Free gift with an order.
Shipping level Promotions: This type of promotions deals with the shipping of the item that is being placed for order.
For Example : Free Shipping of the order
                      Discounted Shipping for an order using a selected shipping mode.
                      Discounted Shipping for an item using a selected shipping mode.

Data Model and the tables related to Promotions:

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2QhPcsPZTNCN3VR-5XEcrThhgPde1FrpHW0DBAHqefTM4LJmu-ztxeDKn0LYfJU1DVnKyHETCS5CWRQyqecV0F3JgGiyNmVz0gZ1nJADk08R5DbNsIQ3rDwGuMrommrI7KhgS5lU3CZ58/s1600/Promotionspic.gif
Promotion Data Model

The main tables in Promotion data model are :
  1. PX_PROMOTION: this table contains Promotions and its status (i.e. Active & Inactive),Starttime and Endtime ,Code-that is is related to that particular promotion.
  2. PX_POLICY: this table tells about the promotion policies.
  3. PX_USAGE: this table tells about statistics  the promotion usage. also contains the ORDERS_ID of the orders to which the promotion was applied.
  4. CLCD_PROMO: this table stores information about the relationship between the Calculation Framework and the promotion standalone infrastructure. Each calculation code matches one promotion in the PX_PROMOTION table.



You might also like:
·         WCS Organisation Structures
·          
Reactions: 

Monday, 24 June 2013

Insertion of ACPOLCIES using SQL commands...

SQL Insertion of ACPOLCIES for a newly Created Command :

1.insert into acrescgry (ACRESCGRY_ID,RESCLASSNAME) values ((select counter from keys where tablename='acrescgry'),'com.sample.commands.PaypalForwardCmd');


2.insert into acresact (ACRESCGRY_ID, ACACTION_ID) values ((select counter from keys where tablename='acrescgry'),(select ACACTION_ID from acaction where action='Execute'));


3.insert into acresgpres (ACRESGRP_ID, ACRESCGRY_ID) values ((select ACRESGRP_ID from acresgrp where MEMBER_ID in (select orgentity_id from orgentity where orgentityname='Root Organization') and GRPNAME='AllSiteUserCmdResourceGroup'), (select counter from keys where tablename='acrescgry'));


4.UPDATE KEYS SET COUNTER = COUNTER+1 WHERE TABLENAME = 'acrescgry';


5.Commit;


Finally Check for these tables for the entries :
  1. ACRESCGRY
  2. ACRESACT
  3. ACRESGPRES
SQL Insertion of ACPOLCIES for a newly Created VIEW :

1.insert into acaction (acaction_id, action) values ((select counter from keys where tablename='acaction'), 'PaypalForwardView');

2.insert into acactactgp (ACACTGRP_ID,ACACTION_ID) values ((SELECT ACACTGRP_ID FROM ACACTGRP WHERE GROUPNAME = 'AllSiteUsersViews' 
and member_id in (select orgentity_id from orgentity where orgentityname='Root Organization') 
), (select acaction_id from acaction where action='PaypalForwardView'));

3.UPDATE KEYS SET COUNTER = COUNTER+1 WHERE TABLENAME = 'acaction';

4.commit;

Finally Check for these tables for the entries :
  1. ACACTION
  2. ACACTACTGP
You might also like:
·         Access Control Policies
·          
Reactions: 

Tuesday, 12 February 2013

WCS Organisation Structures


Organization Structures

Types of Organizations in WCS are :
  1. Consumer Direct Organization.
  2. B2B direct Organization.
  3. Demand Chain Organization.
  4. Extended Sites Organization.
  5. Supply Chain Organization 

  1.  Consumer Direct Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-eaXWLIbpi0qaB3sNAAo7vvAwNbebbWwzUnFGMSmqIlIuHJqeHXB5t2uWTsOiy-wTVChfRmRAvr0rsU602A27JbUcyQ9nri-rQ2uUiN6XaZrWE47TAK_lib5tp3NC1lVvX56pYab0-z8u/s400/ConsummerOrg.gif
Consumer Direct Organization.
 

     2.  B2B direct Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBCUbhv8rqsramtpALfT99TIet8rXwy_tcCgUzKgmnimL8YM4gH_Zys05PSXbgF25bBu7-L06GmJCyL-2K2ly0alInHRdluGIA49FlHVR3dYj8V9SE3Zw-xsnJUmGrKtvtx1TW-v5enb1h/s400/B2BorgStructure.gif
B2B direct Organization.
  
    3. Demand Chain Organization.



https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdvdLDSPnK-qBYPTlxgRZZPZnuXQXXo5i3m-oG09qXEVycOfXf-MF_7hosAElTk1FFDq1oGbZ8H84MkIcJwxIqCUXXWITRahy5S1oI1up3rjLViAjcjsuLQAC5Vr7OTzzOdUS7JCCtpdqu/s400/demandorg.gif
Demand Chain Organization.


    4. Extended Sites Organization.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSS65cjREriADhU-Z9cai3io54WsKbPFNjKdoqL29HoOD4fMf5nzgwDrV8dPMOrjcCQxKlDk2FV0q6RRlXnTdU0-kTA0ofKZF09ZpwFRyLDToltg-CFDDHk6cdX2BNjHVFtA-7QeJAhgK/s640/ExtendedSite.gif
Extended Sites Organization.

    
     5. Supply Chain Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4_1OWyFYVMV7m5marYyKkOSX_gu93CVrycFEiCfX50vvDoaCkm26OSR0_HiKS4Cx-YqvXo88WHBCOvmbttyIvV9bkAu9FGdhmYBCn6S0nN-XKQ0dh2ICyafky0FPt07YO_Jk9rcNp5VkH/s640/supplyChain.gif
Supply Chain Organization.


    
You might also like:
·          
·         Access Control Policies
·          
Reactions: 

Tuesday, 25 December 2012


Access Bean 
    
     WCS commands interact with access beans rather than directly with the entity beans. Access beans behave like Java beans, & hide all enterprise bean-specific programming interfaces from the client.

Types of Access beans are:
  1. Copy Helper  methods.
  2. Finder methods.
  3. EJB methods.

There are 2 types of  Copy Helper methods:
  1. refreshCopyHelper()
  2. commitCopyHelper()

  • refreshCopyHelper():  refresh copy helper is treated as "find for update” and it locks that particular row unless or until you are done with entire transaction. So you read something with refreshcopyHelper and you keep doing n no of things and when you are finally done then only these locks are released.

          refreshCopyHelper reads the database to update the access bean.

  • commitCopyHelper():   commitCopyHelper() takes the current state of the access bean and updates the database with it.

         Updates the database with the contents of the access bean.  


You might also like:
·          
·         Access Control Policies
·         WCS Organisation Structures
Access BeansBeansIBMWCS
Reactions: 

Location: Karnataka, India

Tuesday, 11 December 2012

The Design patterns Present in WCS

Design patterns
The Design patterns Present in WCS:

  1. Model-View-Controller design pattern.
  2. Display design patterns.
  3. Command design patterns.
Model-View-Controller design pattern:

The model-view-controller (MVC) design pattern specifies that an application consist of a data model, presentation information, and control information.
The model (for example, the data information) contains only the pure application data; it contains no logic describing how to present the data to a user.
The view (for example, the presentation information) presents the model's data to the user. The view knows how to access the model's data, but it does not know what this data means or what the user can do to manipulate it.
Finally, the controller (for example, the control information) exists between the view and the model. It listens to events triggered by the view (or another external source) and executes the appropriate reaction to these events. In most cases, the reaction is to call a method on the model. Since the view and the model are connected through a notification mechanism, the result of this action is then automatically reflected in the view.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit6jsSlks8G3OZzIM7zdVIYpzHGn5Ps40NQJUckjwY1jJeahvZRDDlIm0D0KvAgvP0GyykdRFkSfqJTDoy5n6hLagDFTsOWs64A9y43NIjzEKUO6zJ55tv28lqB9BTcf6UwFqjw6rx_Ilh/s400/DesignPattrens.JPG


Command design pattern:

WebSphere Commerce Server accepts requests from browser-based thin-client applications; from applications such as the Sales Center; and remote applications. For example, a request may come from a remote procurement system, or from another commerce server.
  • Task command: These implement discrete pieces of a business task such as address verification or ensuring passwords comply to the defined password policies. For example, during executing of the Registration controller command a callout may be made to a task command to validate the address entered.
  • Controller command: These implement business tasks such as user registration and allocation of inventory. Use these to implement high-level process logic for the business task.
Display design pattern:

Display pages return a response to a client. Typically, display pages are implemented as JSP pages. In order to support multiple device types, a URL access to a page should use a view name, not the name of the actual JSP file.
The main rationale behind this level of indirection is that the JSP page represents a view. The ability to select the appropriate view (for example, based on locale, device type, or other data in the request context) is highly desirable, especially since a single request often has multiple possible views. Consider the example of two shoppers requesting the home page of a store, one shopper using a typical Web browser and the other using a cellular phone. Clearly, the same home page should not be displayed to each shopper. The Web controller's responsibility is to accept the request, then based upon information in the command registration framework, determine the view that each shopper receives.



Description about Controller Command.

The abstract class and interface are both found in the com.ibm.commerce.command package.


A new controller command should extend the abstract controller command class ( com.ibm.commerce.command.ControllerCommandImpl). When writing a new controller command, you should override the following methods from the abstract class:


isGeneric()
In the standard WebSphere Commerce implementation there are multiple types of users. These include generic, guest, and registered users. Within the grouping of registered users there are customers and administrators.
The generic user has a common user ID that is used across the entire system. This common user ID supports general browsing on the site in a manner that minimizes system resource usage. It is more efficient to use this common user ID for general browsing, since the Web controller does not need to retrieve a user object for commands that can be invoked by the generic user.
The isGeneric method returns a Boolean value which specifies whether the command can be invoked by the generic user. The isGeneric method of a controller command's superclass sets the value to false (meaning that the invoker must be either a registered customer or a guest customer). If your new controller command can be invoked by generic users, override this method to return true.
You should override this method to return true if your new command does not fetch or create resources associated with a user. An example of a command that can be invoked by a generic user is the ProductDisplay command. It is sensible to allow any user to be able to view products. An example of a command for which a user must be either a guest or registered user (and hence, isGeneric returns false) is the OrderItemAdd command.
When isGeneric returns a value of true, the Web controller does not create a new user object for the current session. As such, commands that can be invoked by the generic user run faster, since the Web controller does not need to retrieve a user object.

isRetriable()

The isRetriable method returns a Boolean value which specifies whether the command can be retried on a transaction rollback exception. The isRetriable method of the new controller command's superclass returns a value of false. You should override this method and return a value of true, if your command can be retried on a transaction rollback exception.
An example of a command that should not be retried in the case of a transaction exception is the OrderProcess command. This command invokes the third party payment authorization process. It cannot be retried, since that authorization cannot be reversed. An example of a command that can be retried is the ProductDisplay command.
setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqParms)

The setRequestProperties method is invoked by the Web controller to pass all input properties to the controller command. The controller command must parse the input properties and set each individual property explicitly within this method. This explicit setting of properties by the controller command itself promotes the concept of type safe properties.


validateParameters()

The validateParameters method is used to do initial parameter checking and any necessary resolution of parameters. For example, it could be used to resolve orderId=*. This method is called before both the getResources and performExecute methods.

getResources()

This method is used to implement resource-level access control. It returns a vector of resource-action pairs upon which the command intends to act. If nothing is returned, no resource-level access control is performed.

performExecute()

The performExecute method contains the business logic for your command. It should invoke the performExecute method of the command's superclass before any new business logic is executed. At the end, it must return a view name.


Details about Beans Present in WCS..

A data bean is a java bean that is used within a jsp page to provide dynamic contect to the jsp page. A data bean normally provides a simple representaion of a WebSphere Commerce Entity bean.
There are 3 types of data beans:
 1.Smart databean.
 2.Command databean
 3. Input data bean

  • Smart data bean: When a smart data bean is activated, the data bean manager invokes the data bean's populate method. Using the populate method, the data bean can retrieve all attributes, except attributes from associated objects.
  • Command data bean: A data bean implementing the CommandDataBean interface retrieves data from a data bean command. A data bean of this type is a lightweight object; it relies on a data bean command to populate its data. The data bean must implement the getCommandInterfaceName() method which returns the interface name of the data bean command.
  • Input data bean: A data bean implementing the InputDataBean interface retrieves data from the URL parameters or attributes set by the view.
Attributes defined in this interface can be used as primary key fields to fetch additional data. When a JSP page is invoked, the generated JSP servlet code populates all the attributes that match the URL parameters, and then activates the data bean by passing the data bean to the data bean manager. The data bean manager then invokes the data bean's setRequestProperties() method (as defined by the com.ibm.commerce.InputDataBean interface) to pass all the attributes set by the view.
Access Bean
WCS commands interact with access beans rather than directly with the entity beans. Access beans behave like Java beans, & hide all enterprize bean-specific programming interfaces from the client.
Types of Access beans are:
1. Copy Helper methods.
2. Finder methods.
3. EJB methods.
There are 2 types of Copy Helper methods:
1. refreshCopyHelper()
2. commitCopyHelper()
refreshCopyHelper(): refresh copy helper is treated as "find for update” and it locks that particular row unless or until you are done with entire transaction. So you read something with refreshcopyHelper and you keep doing n no of things and when you are finally done then only these locks are released.
refreshCopyHelper reads the database to update the access bean.
commitCopyHelper(): commitCopyHelper() takes the current state of the access bean and updates the database with it.
Updates the database with the contents of the access bean.

Entity Bean: The persistence layer within the WebSphere Commerce architecture is implemented according to the EJB component architecture.
A small number of stateless session beans are used to handle intensive database operations, such as performing a sum of all the rows in a particular column. One advantage of using entity beans is that developers can utilize the EJB tools provided in WebSphere Commerce Developer. These tools allow developers to define Java objects and their database table mappings. The tools automatically generate the required persisters for the entity beans. Persisters are Java objects that persist Java fields to the database and populate Java fields with data from the database.



Commands Present in Order Subsystem.

Some of the commands related to Order Sub-system are:
· com.ibm.commerce.order.commands.OrderDeleteCmd
· com.ibm.commerce.order.commands.OrderCancelCmd
· com.ibm.commerce.order.commands.OrderProfileUpdateCmd
· com.ibm.commerce.order.commands.OrderUnlockCmd
· com.ibm.commerce.order.commands.OrderScheduleCmd
· com.ibm.commerce.order.commands.ScheduledOrderCancelCmd
· com.ibm.commerce.order.commands.ScheduledOrderProcessCmd
· com.ibm.commerce.order.commands.OrderItemAddCmd
· com.ibm.commerce.order.commands.OrderItemDeleteCmd
· com.ibm.commerce.order.commands.OrderItemUpdateCmd
· com.ibm.commerce.order.commands.PayResetPMCmd
The tables in Order Sub-system are:
1. Orders
2. OrderMGP: Relation between Order & Member.
3. OrderItem
4. ORDITEMCONF: Relation between order items & order item shipment confirmation.
5. Ffmcenter
6. ORDUSERS: Contains information about users that worked with an order.
7. OrdTax: Represents the total tax for all order items in an order.
a. ORDSTAT: Contains information about the status of an Order Status Update inbound message.
b. ORDISTAT: This table contains information about the items within a single order for an Order Status Update inbound message.
8. SCHORDERS: Contains the entries for scheduled orders.
a. SUBORDERS: Contains subtotals of amounts for all the OrderItems of an Order with the same shipping address.
b. ORDPAYINFO: Holds a name-value pair representing payment information for a particular Order.
c. ORDPAYMTHD: The Order Payment Method table contains order payment or refund methods selected for an order.


Details About Order SubSystem.

ORDER SUBSYSTEM
  • Order Sub-system is a component of WCS that provides shopping carts, order capture, order fulfillment, inventory & payment function support.
  • An order includes one or more products, billing & shipping addresses, payment details & the total cost including shipping charges & taxes.
  • From a customer persective an order is a list of selected products.
  • Each product in a list is called an order item.
  • From a store perspective an order is a list of order items.
  • Orders are associated with a single store.
  • An order profile is a special type of order that can be associated with either a store or a store group.
  • The order profile holds default information about a customer such as payment information, shipping address, shipping mode & billing address.
Ø There are 4 inventory systems, they are:
1. ATP inventory.
2. Non-ATP inventory.
3. No inventory.
4. External inventory.
ATP Inventory: The ATP inventory model enables you to allocate stock from existing inventory or backorder from expected inventory. You can also obtain an estimated availability time for each order item once it has been 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.
External Inventory: External inventory is used for Websphere Commerce and some external inventory systems integration. For integration with other inventory systems, you might select ATP, non-ATP, or No-inventory inventory system based on the specific inventory system and integration scenario.
 The shipping codes for an order sub-system are:
  • A - Payment Authorization requires review.
  • B - Backordered.
  • C - Payment Authorization complete.
  • D - Deposited.
  • E - CSR Edit.
  • F - Ready for remote fulfillment.
  • G - Pending remote fulfillment.
  • H - Error in remote fulfillment.
  • I - Submitted.
  • J - Trashcan.
  • L - No inventory.
  • M - Either a part or total amount is approved.
  • N - Approval denied.
  • P - Pending Order.
  • Q - Quick order profile.
  • R - Released.
  • S - Shipped.
  • T - Temparory.
  • W - Pending approval.
  • X - Cancelled.
  • Y - Private requisition list.
  • Z – Sharable requisition list.

Types of SUBSYSTEMS IN WCS.

Types of SUBSYSTEMS IN WCS.
  • Catalog Subsystem.
  • Order Subsystem.
  • Trading Subsystem.
  • Merchandising Subsystem.
  • Marketing Subsystem.
  • Member Subsystem.
  • Payment Subsystem.

Types of WCS

There were 2 types of wcs they are:
WCS Server: It is used throughout the world.
WCS Developer: It is installed by the individual user in his/her system.

Consoles/Tools in WCS :

They were 5 consoles in wcs they are:
1. Management Center: Manages data related to stores.
2. Accelerator: It is related to marketing, merchandising, catalog management etc.
3. Organization Administration Console: Creates users & assign roles and categorize users based
into a group.
4. Workspace Administration Console: Managing business sites like adding products, site up, site
down etc.
5. Administration Console: Store publishing, registries etc.

Access Control Policies

          An Access Control Policies authorizes a group of users to perform a set of actions on a set of resources.

An access control policy has 4 elements, they are:
  1. User.
  2. Action.
  3. Resource.
  4. Relationship.

User:  The Users are the people that use the system. For access control purposes, users must be grouped into relevant access groups. 

Action: Actions are the activities that users can perform on the resource.

Resource: Resources are the entities that are protected. A resource group might include business objects like contract or order, or a set of related commands.

Relationship: Relationships are the relationship between the user and the resource. Access control policies may require that a relationship between the user and the resource be satisfied. Each resource class can have a set of relationships associated with it. Each resource can have a set of users that fulfill each relationship.


There are 2 types of access control policies, they are:

  1. Groupable standard policies(policy type-2).
  2. Groupable template policies(policy type-3).

     A Groupable standard policy is applied, once, at organizations that subscribe to a policy group that contains the policy.

     A Groupable template policies are dynamic in nature in that they have an access group that is scoped, when the system is running, to the organization that owns the resource.


The table updated in access control poliies are:

  1. ACACTION: Stores actions that are to be performed on the resources in the system.
  2. ACPOLICY: Stores all the access control policies in a system.
  3. ACRESGRP: Stores all access control resource groups in a system.
  4. ACPOLDESC: Stores local specific information for ACPOLICY.
  5. ACRELATION: Relation between resources and members in system.
  6. ACRESREL: Associates a resource and relationships that it supports.


        WebSphere Commerce allows you to determine, through access control, which tasks a particular user, be they customers, buyers, administrators, distributors, manufacturers, or suppliers, can perform in relation to your business.

To facilitate database management and ensure security, access to WebSphere Commerce must be restricted to specific individuals and organizations. The process of restricting access is referred to as access control or authorization. Authorization can be defined as security guidelines that:

Allow or deny a user of a system access to the resources managed by a system.
Specify what actions the user can perform on each resource.

The authorization model for WebSphere Commerce is based upon the enforcement of access control policies. Access control policies are enforced by the access control Policy Manager. In general, when a user attempts to access a protected resource, the access control policy manager first determines what access control policies are applicable for that user and then, based upon the applicable access control policies, it determines if the user is allowed to perform the requested operation on the given resource.

NOTE: The Site Administrator manages the access control policies that apply to a site or store.

The Design patterns Present in WCS

Design patterns
The Design patterns Present in WCS:

  1. Model-View-Controller design pattern.
  2. Display design patterns.
  3. Command design patterns.
Model-View-Controller design pattern:

The model-view-controller (MVC) design pattern specifies that an application consist of a data model, presentation information, and control information.
The model (for example, the data information) contains only the pure application data; it contains no logic describing how to present the data to a user.
The view (for example, the presentation information) presents the model's data to the user. The view knows how to access the model's data, but it does not know what this data means or what the user can do to manipulate it.
Finally, the controller (for example, the control information) exists between the view and the model. It listens to events triggered by the view (or another external source) and executes the appropriate reaction to these events. In most cases, the reaction is to call a method on the model. Since the view and the model are connected through a notification mechanism, the result of this action is then automatically reflected in the view.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit6jsSlks8G3OZzIM7zdVIYpzHGn5Ps40NQJUckjwY1jJeahvZRDDlIm0D0KvAgvP0GyykdRFkSfqJTDoy5n6hLagDFTsOWs64A9y43NIjzEKUO6zJ55tv28lqB9BTcf6UwFqjw6rx_Ilh/s400/DesignPattrens.JPG


Command design pattern:

WebSphere Commerce Server accepts requests from browser-based thin-client applications; from applications such as the Sales Center; and remote applications. For example, a request may come from a remote procurement system, or from another commerce server.
  • Task command: These implement discrete pieces of a business task such as address verification or ensuring passwords comply to the defined password policies. For example, during executing of the Registration controller command a callout may be made to a task command to validate the address entered.
  • Controller command: These implement business tasks such as user registration and allocation of inventory. Use these to implement high-level process logic for the business task.
Display design pattern:

Display pages return a response to a client. Typically, display pages are implemented as JSP pages. In order to support multiple device types, a URL access to a page should use a view name, not the name of the actual JSP file.
The main rationale behind this level of indirection is that the JSP page represents a view. The ability to select the appropriate view (for example, based on locale, device type, or other data in the request context) is highly desirable, especially since a single request often has multiple possible views. Consider the example of two shoppers requesting the home page of a store, one shopper using a typical Web browser and the other using a cellular phone. Clearly, the same home page should not be displayed to each shopper. The Web controller's responsibility is to accept the request, then based upon information in the command registration framework, determine the view that each shopper receives.


WCS Organisation Structures


Organization Structures

Types of Organizations in WCS are :
  1. Consumer Direct Organization.
  2. B2B direct Organization.
  3. Demand Chain Organization.
  4. Extended Sites Organization.
  5. Supply Chain Organization 

  1.  Consumer Direct Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-eaXWLIbpi0qaB3sNAAo7vvAwNbebbWwzUnFGMSmqIlIuHJqeHXB5t2uWTsOiy-wTVChfRmRAvr0rsU602A27JbUcyQ9nri-rQ2uUiN6XaZrWE47TAK_lib5tp3NC1lVvX56pYab0-z8u/s400/ConsummerOrg.gif
Consumer Direct Organization.
 

     2.  B2B direct Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBCUbhv8rqsramtpALfT99TIet8rXwy_tcCgUzKgmnimL8YM4gH_Zys05PSXbgF25bBu7-L06GmJCyL-2K2ly0alInHRdluGIA49FlHVR3dYj8V9SE3Zw-xsnJUmGrKtvtx1TW-v5enb1h/s400/B2BorgStructure.gif
B2B direct Organization.
  
    3. Demand Chain Organization.



https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdvdLDSPnK-qBYPTlxgRZZPZnuXQXXo5i3m-oG09qXEVycOfXf-MF_7hosAElTk1FFDq1oGbZ8H84MkIcJwxIqCUXXWITRahy5S1oI1up3rjLViAjcjsuLQAC5Vr7OTzzOdUS7JCCtpdqu/s400/demandorg.gif
Demand Chain Organization.


    4. Extended Sites Organization.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSS65cjREriADhU-Z9cai3io54WsKbPFNjKdoqL29HoOD4fMf5nzgwDrV8dPMOrjcCQxKlDk2FV0q6RRlXnTdU0-kTA0ofKZF09ZpwFRyLDToltg-CFDDHk6cdX2BNjHVFtA-7QeJAhgK/s640/ExtendedSite.gif
Extended Sites Organization.

    
     5. Supply Chain Organization.


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4_1OWyFYVMV7m5marYyKkOSX_gu93CVrycFEiCfX50vvDoaCkm26OSR0_HiKS4Cx-YqvXo88WHBCOvmbttyIvV9bkAu9FGdhmYBCn6S0nN-XKQ0dh2ICyafky0FPt07YO_Jk9rcNp5VkH/s640/supplyChain.gif
Supply Chain Organization.

The 10 WebSphere Commerce Tables You Should Be Familiar With

1 comment
One of my most popular posts that’s specific to WebSphere Commerce is The 10 Commerce Tables You Should Be Familiar With. This is an updated version of that post, since the preferred method of dealing with attributes has changed. As a result, this post is only applicable to WebSphere Commerce 7 and above, and some of the content is identical between the two posts.
So there are 800+ tables in the typical WebSphere Commerce database – you’re never going to know them all. And getting a start on understanding the data model – even in the more limited way needed when you’re playing primarily the system dba role can be daunting. But developer and dba alike should at least be familiar with these 10.
Note all table details are copied from the WebSphere Commerce 7 Info Center.

MEMBER

Column Name
Column Type
Description
MEMBER_ID
BIGINT NOT NULL
ID for the member, a unique primary key for this table.
TYPE
CHAR(3) NOT NULL
The type of member as follows:
O = OrgEntity
U = User
G = MemberGroup
STATE
INTEGER
The registration approval status as follows:
0 = pending approval
1 = approved
2 = rejected
Null = the approval is not applicable
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
So maybe I’m just a geek, but I think of this as “one table to rule them all”. The main reason being that almost every table in the database has a column that has a foreign key to either Member or Users. Deleting a row from one of these tables easily cascades to 300 tables. Try explaining a delete from member sometime if you’re bored – the results are amusing.
USERS and MEMBER are closely related. Every USER has a single MEMBER, but not every MEMBER has a USER. USERS.USERS_ID is a foreign key to MEMBER.MEMBER_ID. Most tables reference the USERS_ID.
The Commerce Info Center tells me there are currently 99 Foreign Keys referencing the MEMBER table.
Generally, MEMBERs that do not have USERS associated with them should not be deleted – they are part of the Commerce system and not actual end-users.
I’ve got one of the pruning areas for this table documented - Guest Users - but there are others.

USERS

Column Name
Column Type
Description
USERS_ID
BIGINT NOT NULL
ID for the user member. Foreign key to MEMBER_ID in MEMBER table.
DN
VARCHAR(1000)
The distinguished name of the user, for example, uid=wcsadmin,o=root organization. It must be in lower case, and should not have any spaces immediately before or after the , or = symbols. When using LDAP, this value must correspond with the DN of the user in the LDAP server.
REGISTERTYPE
CHAR(4) NOT NULL
The user registration type. Valid values are as follows:
R – registered user
G – guest user
A – administrator
S – site administrator
The default member group called Administrators defines the list of administrative roles.
PROFILETYPE
CHAR(2)
Identifies whether the user has a profile, and if so, the profile type. Valid values are as follows:
Null – no profile data
C – base profile data
B – business profile data
LANGUAGE_ID
INTEGER
Preferred language. For a list of language components, see the LANGUAGE table. Foreign key relationship to LANGUAGE table.
FIELD1
VARCHAR(254)
Customizable.
SETCCURR
CHAR(3)
Preferred currency in 3-character alphabetic code as per ISO 4217. This is a currency code as per ISO 4217 standards. Compare with the SHPREFERREDCURR column of the SHOPPER table provided with previous versions of WebSphere Commerce or WebSphere Commerce Suite.
FIELD3
VARCHAR(254)
Customizable.
FIELD2
VARCHAR(254)
Customizable.
LASTORDER
TIMESTAMP
The date and time that the user last placed an order at this site.
REGISTRATION
TIMESTAMP
The date or time that the user was registered, directly by way of UserRegistrationAdd, during synchronization from LDAP to the WebSphere Commerce database.
LASTSESSION
TIMESTAMP
The date and time that the user last visited the WebSphere Commerce site. Last visited means last logon to the WebSphere Commerce site.
REGISTRATIONUPDATE
TIMESTAMP
The date or time the user last changed registration information. This value is set during UserRegistrationAdd and UserRegistrationUpdate ResetPassword synchronization with LDAP during logon.
REGISTRATIONCANCEL
TIMESTAMP
Reserved for IBM internal use.
PREVLASTSESSION
TIMESTAMP
Reserved for IBM internal use.
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
PERSONALIZATIONID
VARCHAR(30)
The Personalization ID associated with the user

Usually the number of USERS is within a hundred of the number of MEMBERs. Some of the system users are in here, and some don’t have entries. All of the site users are represented here (assuming you don’t use AD tie-in, I have no idea what that looks like). The USERS table has 25 Foreign Keys referencing it.

USERREG

Column Name
Column Type
Description
USERS_ID
BIGINT NOT NULL
ID for the user member. Foreign key to the USERS table.
STATUS
INTEGER
Allows the user to have the logon ID disabled without removing the user from the system. Valid values are as follows:
  • 1=enabled
  • 0=disabled
PLCYACCT_ID
INTEGER
The account policy for this user, foreign key to the PLCYACCT table.
LOGONID
VARCHAR(254) NOT NULL
The user logon ID.
LOGONPASSWORD
BINARY
The encrypted user logon password. Compare with the SHLPSWD column of the SHOPPER table provided with previous versions of WebSphere Commerce or WebSphere Commerce Suite.
PASSWORDEXPIRED
INTEGER
Specifies whether or not the user password has expired. Valid values are 0 (not expired) or 1 (expired).
CHALLENGEQUESTION
VARCHAR(254)
Challenge question for confirmation of the user identity. Compare with the SCHAQUE column of the SHOPPER table provided with previous versions of WebSphere Commerce or WebSphere Commerce Suite.
CHALLENGEANSWER
VARCHAR(254)
Answer to challenge question. Compare with the SHCHAANS column of the SHOPPER table provided with previous versions of WebSphere Commerce or WebSphere Commerce Suite.
TIMEOUT
BIGINT NOT NULL DEFAULT -1
Time for which the user cannot log in after failed attempts to log in.
PASSWORDRETRIES
INTEGER DEFAULT 0
The number of times consecutively the password is entered incorrectly.
SALT
VARCHAR(254)
The value that is appended to the password before hashing.
PASSWORDCREATION
TIMESTAMP
The last time the password for the user was created or updated.
PASSWORDINVALID
TIMESTAMP
Timestamp of the last failed attempt to log in.
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
The USERREG table is one of the places you can connect identifying data with the less-informative sequential ids used in the USERS and MEMBER tables. The LOGONID column usually represents the email address of the user, and passwords are stored here in an encrypted format. You can reset the configadmin password here manually (by also using the encryptPW function that Commerce provides). As a side note, for other IDs, you should not have to reset passwords for other users – that should be done through the Commerce tooling.

ORDERS

Column Name
Column Type
Description
ORDERS_ID
BIGINT NOT NULL
Generated unique key.
ORMORDER
CHAR(30)
A merchant-assigned order reference number, if any.
ORGENTITY_ID
BIGINT
The immediate parent organization ID of the creator.
TOTALPRODUCT
DECIMAL (20,5) DEFAULT 0
The sum of ORDERITEMS.TOTALPRODUCT for the OrderItems in the Order.
TOTALTAX
DECIMAL (20,5) DEFAULT 0
The sum of ORDERITEMS.TAXAMOUNT for the OrderItems in the Order.
TOTALSHIPPING
DECIMAL (20,5) DEFAULT 0
The sum of ORDERITEMS.SHIPCHARGE for the OrderItems in the Order.
TOTALTAXSHIPPING
DECIMAL (20,5) DEFAULT 0
The sum of ORDERITEMS.SHIPTAXAMOUNT for the OrderItems in the Order.
DESCRIPTION
VARCHAR(254)
A mnemonic description of the order, entered by the customer, suitable for display to the customer.
STOREENT_ID
INTEGER NOT NULL
The store entity the order is part of. This is normally a store unless STATUS is Q, in which case it is normally a store group.
CURRENCY
CHAR(10)
The currency for monetary amounts associated with this order. This is the currency code according to ISO 4217 standards.
LOCKED
CHAR(1)
Reserved for IBM internal use.
TIMEPLACED
TIMESTAMP
The time this order was processed by the OrderProcess command.
LASTUPDATE
TIMESTAMP
The time this order was most recently updated.
SEQUENCE
DOUBLE NOT NULL DEFAULT 0
Can be used by a user interface to control the sequence of orders in a list.
STATUS
VARCHAR(3)
The status of the order. This is similar to order states. For specific values of status and their descriptions, refer to the order states page, but omit states ‘Y’ and ‘Z’.
MEMBER_ID
BIGINT NOT NULL
The customer that placed the order.
FIELD1
INTEGER
Customizable.
ADDRESS_ID
BIGINT
This column is deprecated. In versions 5.6.1 and earlier, this column contained the billing address. In version 6 and later, the billing address is part of payment data and is stored in PPCEXTDATA table as encrypted data.
FIELD2
DECIMAL (20,5)
Customizable.
PROVIDERORDERNUM
INTEGER
Reserved for IBM internal use.
SHIPASCOMPLETE
CHAR(1) NOT NULL DEFAULT ‘Y’
Reserved for IBM internal use.
FIELD3
VARCHAR(254)
Customizable.
TOTALADJUSTMENT
DECIMAL (20,5) DEFAULT 0
The sum of ORDERITEMS.TOTALADJUSTMENT for the order items in the order. This column also includes all kinds of shipping charge adjustments like discount, coupon, shipping adjustment and surcharge.
ORDCHNLTYP_ID
BIGINT
Reserved for IBM internal use.
COMMENTS
VARCHAR(254)
Comments from the customer.
NOTIFICATIONID
BIGINT
Notification identifier referring to the rows in the NOTIFY table that store notification attributes. These attributes override the defaults for notifications related to this order.
TYPE
CHAR(3)
For an order, TYPE indicates whether it is a regular order (ORD), private requisition list order (PRL), shareable requisition list order (SRL), standing order (STD), quotation order (QUT), quote (QOT), profile order (QUK), recurring order (REC), or subscription (SUB).
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
EDITOR_ID
BIGINT
Stores the ID of the person editing the order.
BUSCHN_ID
INTEGER
The Business Channel ID of the order.
SOURCEID
BIGINT
This field indicates the sources from which this order came, if any. This field is relevant for orders that were generated from a previously saved quote, for example. In that situation, the QuoteId would be saved here.
EXPIREDATE
TIMESTAMP
This entry is only relevant when the row refers to a quote, type “QOT”. This field then indicates the expiration date for that quote.
BLOCKED
SMALLINT DEFAULT 0
Indicates if this order has a block placed against it or not.
OPSYSTEM_ID
INTEGER
This field indicates the Order Processing system for the order.
TRANSFERSTATUS
SMALLINT
Order transferring status: 0, it is in the initial status. 1, it is in the transferring status. 2, it is in the transferred status. null, the same as 0.
BUYERPO_ID
BIGINT
The Buyer PO Number Id related to an order
As the name implies, this table holds orders placed in the database. It also includes shopping carts (orders that have not been submitted yet). Note especially the STATUS column – this can tell you where in the process the order is – submitted, completed, shipped, etc. There are a limited set of values and you should understand what they mean in your database.
The total $ is stored here, which is nice when you need to look for $ of orders during certain periods or find the largest orders by $.
Note that many of the columns here reference other tables to pull in the details – 9 of the columns are Foreign Keys to other tables.

ORDERITEMS

Column Name
Column Type
Description
ORDERITEMS_ID
BIGINT NOT NULL
Generated unique key.
STOREENT_ID
INTEGER NOT NULL
The store entity the order (this order item is part of) is part of. This is normally a store unless STATUS is Q, in which case it is normally a store group.
ORDERS_ID
BIGINT NOT NULL
The order of which this order item is part.
TERMCOND_ID
BIGINT
The TermAndCondition, if known, that determined the price for this order item.
TRADING_ID
BIGINT
The TradingAgreement, if known, that determines the TermAndCondition objects (including how the price is determined) that apply to this order item.
ITEMSPC_ID
BIGINT
The specified item to be allocated from available inventory and shipped to the customer.
CATENTRY_ID
BIGINT
The catalog entry, if any, of the product being purchased.
PARTNUM
VARCHAR(64)
The part number of the catalog entry(CATENTRY.PARTNUMBER) for the product.
SHIPMODE_ID
INTEGER
The shipping mode, if still known.
FFMCENTER_ID
INTEGER
The fulfillment center, if known, from which the product will ship.
MEMBER_ID
BIGINT NOT NULL
The customer of the order item (which is the same as the customer of the order).
ADDRESS_ID
BIGINT
The shipping address, if any, for this order item.
ALLOCADDRESS_ID
BIGINT
The shipping address used when inventory for this order item was allocated or backordered.
PRICE
DECIMAL (20,5)
The price for the nominal quantity of the product (CATENTSHIP.NOMINALQUANTITY).
LINEITEMTYPE
CHAR(4)
If specified, indicates the type of the order item.ALT = the order item represents an alternative item (might not be exactly what the customer requested).
STATUS
CHAR(1) NOT NULL
The status for the order item. It may not be the same as the status in the order.
OUTPUTQ_ID
BIGINT
Reserved for IBM internal use.
INVENTORYSTATUS
CHAR(4) NOT NULL DEFAULT ‘NALC’
The allocation status of inventory for this order item:NALCInventory is not allocated nor on back-order.BOInventory is on back-order.
ALLC
Inventory is allocated.
FUL
Inventory has been released for fulfillment.
AVL
Inventory is available.
LASTCREATE
TIMESTAMP
The time this order item was created.
LASTUPDATE
TIMESTAMP
The most recent time this order item was updated. Changing inventory allocation related information does not cause this timestamp to be updated (refer to the LASTALLOCUPDATE column).
FULFILLMENTSTATUS
CHAR(4) NOT NULL DEFAULT ‘INT’
The fulfillment status of the order item:
INT = not yet released for fulfillment.
OUT = released for fulfillment.
SHIP = shipment confirmed.
HOLD = a temporary status between INT and OUT status.
LASTALLOCUPDATE
TIMESTAMP
The most recent time inventory was checked (for unallocated order items), allocated, or backordered, for this order item.
OFFER_ID
BIGINT
The offer, if any, and if it still exists, from which PRICE was obtained.
TIMERELEASED
TIMESTAMP
The time this order item was released for fulfillment.
TIMESHIPPED
TIMESTAMP
The time this order item was manifested for shipment.
CURRENCY
CHAR(10)
The currency of order item monetary amounts other than BASEPRICE. This is the same as the currency of the order, ORDERS.CURRENCY. This is a currency code according to ISO 4217 standards.
COMMENTS
VARCHAR(254)
Comments from the customer, such as a greeting for a gift.
TOTALPRODUCT
DECIMAL (20,5) DEFAULT 0
PRICE times QUANTITY.
QUANTITY
DOUBLE NOT NULL
The result of multiplying QUANTITY by CATENTSHIP.NOMINALQUANTITY must be a multiple of CATENTSHIP.QUANTITYMULTIPLE. And it represents the actual quantity being purchased, in the unit of measurement specified by CATENTSHIP.QUANTITYMEASURE.
TAXAMOUNT
DECIMAL (20,5)
The total sales taxes associated with this order item, in the currency specified by CURRENCY.
TOTALADJUSTMENT
DECIMAL (20,5) DEFAULT 0
The total of the monetary amounts of the order item adjustments for this order item, in the currency specified by CURRENCY. This column also includes all kinds of shipping charge adjustments like discount, coupon, shipping adjustment and surcharge.
SHIPTAXAMOUNT
DECIMAL (20,5)
The total shipping taxes associated with this order item, in the currency specified by CURRENCY.
ESTAVAILTIME
TIMESTAMP
An estimate of when sufficient inventory will be available to fulfill this order item. This estimate does not include the shipping offset.
FIELD1
INTEGER
Customizable.
DESCRIPTION
VARCHAR(254)
A mnemonic description of the order Item, suitable for display to the customer. This field is usually NULL when CATENTRY_ID is not NULL, since in that case the CatalogEntry description can be displayed.
FIELD2
VARCHAR(254)
Customizable.
ALLOCATIONGROUP
BIGINT
Reserved for IBM internal use.
SHIPCHARGE
DECIMAL (20,5)
The base shipping charge associated with the order item, in the currency specified by CURRENCY, it is the shipping charge before any adjustments. The shipping charge adjustment will be persisted in the ORDERITEMS.TOTALADJUSTMENT column with other adjustments including discount and surcharge. The total shipping charge is the sum of base shipping charge in ORDERITEMS.SHIPCHARGE column and the shipping charge adjustment in ORDERITEMS.TOTALADJUSTMENT column.
BASEPRICE
DECIMAL (20,5)
If PRICE was converted from a currency different from the order item currency, BASEPRICE is the price that was converted to determine the PRICE.
BASECURRENCY
CHAR(3)
The currency of BASEPRICE.
TRACKNUMBER
VARCHAR(64)
Reserved for IBM internal use.
TRACKDATE
TIMESTAMP
Reserved for IBM internal use.
PREPAREFLAGS
INTEGER NOT NULL DEFAULT 0
Contains bit flags indicating special processing to be performed by the OrderPrepare command.PREPAREFLAGS column
CORRELATIONGROUP
BIGINT
Normally this is the same as ORDERITEMS_ID, except:1. When an order item is split by the AllocateInventory task command, the newly created OrderItem inherits the CORRELATIONGROUP value from the original order item.2. when the PREPAREFLAGS column indicates “quotation”, the OrderItem inherits the CORRELATIONGROUP value from the corresponding OrderItem in the parent order.
PROMISEDAVAILTIME
TIMESTAMP
When an order is placed (using the OrderProcess command), this would be set to EstAvailTime. After that it would normally not be updated, although a CSR could manually update this to reflect a verbal commitment made to the customer.
SHIPPINGOFFSET
INTEGER NOT NULL DEFAULT 0
An estimate of how many seconds it will take to ship this item once the order is placed and inventory has been allocated.
NEEDEDQUANTITY
INTEGER NOT NULL DEFAULT 0
Quantity needed for fulfillment. If CATENTRY is not NULL, this is QUANTITY times CATENTSHIP.NOMINALQUANTITY, converted from CATENTSHIP.QUANTITYMEASURE to BASEITEM.QUANTITYMEASURE, divided by BASEITEM.QUANTITYMULTIPLE and rounded to the nearest integer.
ALLOCQUANTITY
INTEGER NOT NULL DEFAULT 0
Quantity allocated or backordered for this order item. The quantity in BASEITEM.QUANTITYMEASURE units can be calculated by multiplying this value by BASEITEM.QUANTITYMULTIPLE, for the base item of the specified item indicated by ITEMSPC_ID.
ALLOCFFMC_ID
INTEGER
The fulfillment center from which inventory for this order item is allocated or backordered.
ORDRELEASENUM
INTEGER
The associated order release, if any.
CONFIGURATIONID
VARCHAR(128)
The identifier that is provided by an external product configurator. This identifier represents a list of order item components that are stored in the OICOMPLIST table.
SUPPLIERDATA
VARCHAR(254)
Opaque to WebSphere Commerce. This attribute can be returned with a quotation, and sent when an order is placed on an external system. For example, it could contain a supplier distribution center ID.
SUPPLIERPARTNUMBER
VARCHAR(254)
The supplier part number, if known. Suitable for display to the customer.
AVAILQUANTITY
INTEGER
If specified, indicates the quantity available for purchase.
ISEXPEDITED
CHAR(1) NOT NULL DEFAULT ‘N’
Indicates that the item should receive expedited handling in fulfillment. Y indicates that it should receive expedited handling. N indicates that it should not (this is the default).
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
REQUESTEDSHIPDATE
TIMESTAMP
The ship date that has been requested for the order item. When no date (null) is specified, the ship date will be whenever the item is available to be shipped. When a date is specified, the ship date will be no sooner than the requested date. This is because a backorder could delay the ship date beyond the requested date. See the definition of ALLOCATIONOFFSET and MAXFOOFFSET in the STORE table.
TIECODE
SMALLINT
TieCode used for items that are shipping at the same time (Ship Together).
For every item on an order, there is a row in the ORDERITEMS table. This is a common structure in OLTP databases, but may not be as familiar to those used to working with DW/DSS databases. Much like orders, there are many Foreign Keys pulling in data from other tables – 14 columns reference other tables. The CATENTRY_ID can help connect the ORDERITEM to an item in the catalog.
Sometimes you’ll need to look for ORDERS with the most items – ORDERS with large numbers of items can cause performance issues. For example, you might have a monitor that tries to add an item to a cart. If you haven’t also implemented proper data pruning, that monitoring process could be adding items to the same ORDER over and over and never checking out – this can cause site-wide performance issues.
Pruning junk ORDERITEMS is also one of the more critical data pruning areas.

STAGLOG

Column Name
Column Type
Description
STGRFNBR
BIGINT NOT NULL
The reference number for the staging row.
STGSTMP
TIMESTAMP NOT NULL
The time stamp.
STGTABLE
CHAR(18) NOT NULL
The name of the table with staged changes.
STGOP
CHAR(1) NOT NULL
The change operator:IinsertUupdate
D
delete
STGMENBRNAME
CHAR(32)
Reserved for IBM internal use.
STGMENBR
INTEGER
Indicates whether the table is a:
0 = site table or 1 = merchant table.
STGPKEYNAME
CHAR(32)
The name of the primary key.
STGPKEY
BIGINT
The value of the primary key.
STGKEY1NAME
CHAR(32)
First column name for the unique index of the table defined in STGTABLE. For example, if STGTABLE is ‘catentry’, then STGKEY1NAME is ‘partnumber’
STGKEY2NAME
CHAR(32)
Second column name for the unique index of the table defined in STGTABLE. For example, if STGTABLE is ‘catentry’, then STGKEY1NAME is ‘member_id’.
STGKEY3NAME
CHAR(32)
Third column name for the unique index of the table defined in STGTABLE.
STGKEY4NAME
CHAR(32)
Fourth column name for the unique index of the table defined in STGTABLE.
STGKEY5NAME
CHAR(32)
Fifth column name for the unique index of the table defined in STGTABLE.
STGOKEY1
BIGINT
Old value for first column of the unique index.
STGOKEY2
BIGINT
Old value for second column of the unique index.
STGOKEY3
VARCHAR(254)
Old value for third column of the unique index.
STGOKEY4
BIGINT
Old value for fourth column of the unique index.
STGOKEY5
VARCHAR(254)
Old value for fifth column of the unique index.
STGNKEY1
BIGINT
New value for first column of the unique index.
STGNKEY2
BIGINT
New value for second column of the unique index.
STGNKEY3
VARCHAR(254)
New value for third column of the unique index.
STGNKEY4
BIGINT
New value for fourth column of the unique index.
STGNKEY5
VARCHAR(254)
New value for fifth column of the unique index.
STGPROCESSED
INTEGER DEFAULT 0
Indicate if the corresponding record has been processed by StagingProp. 0 = not processed, 1 = processed.
STGRESERVED1
INTEGER DEFAULT 0
Reserved for IBM internal use.
STGLDPTH
VARCHAR(254)
Reserved for IBM internal use.
STGLDCOLS
VARCHAR(4000)
Reserved for IBM internal use.
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
STGFILTER
INTEGER
This column is used for Staging by filter value. When a filter value is specified in StagingProp parameters, all the corresponding STAGLOG records with this STGFILTER value matching the filter value will be processed.
The STAGLOG table holds all of the changes captured by stagingprop to be copied from the staging database to the production database. It is only populated in a staging-role database and not in a production-role database. You’ll find many more details on it in my entries on stagingprop and on dbclean for staglog.

CATENTRY

Column Name
Column Type
Description
CATENTRY_ID
BIGINT NOT NULL
The internal reference number of the catalog entry.
MEMBER_ID
BIGINT NOT NULL
The reference number that identifies the owner of the catalog entry. Along with the PARTNUMBER, these columns are a unique index.
ITEMSPC_ID
BIGINT
The specified item that this catalog entry relates to. This column should only be populated for catalog entries that are of type “ItemBean”, “PackageBean”, or “DynamicKitBean”. Specified items are used for fulfillment.
CATENTTYPE_ID
CHAR(16) NOT NULL
Identifies the type of catalog entry. Foreign key to the CATENTTYPE table. The supported default types are: ProductBean, ItemBean, PackageBean, BundleBean and DynamicKitBean.
PARTNUMBER
VARCHAR(64) NOT NULL
The reference number that identifies the part number of the catalog entry. Along with the MEMBER_ID, these columns are a unique index.
MFPARTNUMBER
VARCHAR(64)
The part number used by the manufacturer to identify this catalog entry.
MFNAME
VARCHAR(64)
The name of the manufacturer of this catalog entry.
MARKFORDELETE
INTEGER NOT NULL
Indicates if this catalog entry has been marked for deletion:
0 = No.
1 = Yes.
URL
VARCHAR(254)
The URL to this catalog entry, which can be used as a download URL for soft goods.
FIELD1
INTEGER
Customizable.
FIELD2
INTEGER
Customizable.
LASTUPDATE
TIMESTAMP
Indicates the last time the catalog entry was updated.
FIELD3
DECIMAL (20,5)
Customizable.
ONSPECIAL
INTEGER
This flag identifies if this catalog entry is on special.
ONAUCTION
INTEGER
This flag identifies if this catalog entry is on auction.
FIELD4
VARCHAR(254)
Customizable.
FIELD5
VARCHAR(254)
Customizable.
BUYABLE
INTEGER
Indicates whether this catalog entry can be purchased individually: 1=yes and 0=no.
OID
VARCHAR(64)
Reserved for IBM internal use.
BASEITEM_ID
BIGINT
The base item to which this catalog entry relates. This column should only be populated for catalog entries that are of type ProductBean, PackageBean or DynamicKitBean. Base items are used for fulfillment.
STATE
CHAR(1) DEFAULT ’1′
Reserved for IBM internal use.
STARTDATE
TIMESTAMP
The date when this catalog entry is introduced. This column is for your interpretation and information only.
ENDDATE
TIMESTAMP
The date when this catalog entry is withdrawn. This column is for your interpretation and information only.
RANK
DOUBLE
Reserved for IBM internal use.
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
AVAILABILITYDATE
TIMESTAMP
The date that the product is available to customers for purchase. This column is for your interpretation and information only.
LASTORDERDATE
TIMESTAMP
The final date that the product is available for order. This is the latest date a customer can order the product. This column is for your interpretation and information only.
ENDOFSERVICEDATE
TIMESTAMP
The date when the product is no longer in service. For example, this date can be the date that a software manufacturer stops providing upgrades for a version of their product. This column is for your interpretation and information only.
DISCONTINUEDATE
TIMESTAMP
The date when the product is discontinued. For example, this date can be the date the manufacturer stops producing the product, or the date your store stops selling the product. It is recommended that this column be used consistently to avoid confusion. This column is for your interpretation and information only.
This is one of the master tables in the catalog. And when I say catalog, I mean the list of items the site/store sells, not the DB2 System Catalog. There are plenty of others in this data model, and you may get familiar with them depending on the work needed.
This is where things start to differ from my previous version of this post

ATTR

Column Name
Column Type
Description
ATTR_ID
BIGINT NOT NULL
The unique identifier for this attribute.
IDENTIFIER
VARCHAR(254) NOT NULL
An external identifier for the attibute
ATTRTYPE_ID
CHAR(16) NOT NULL
The attribute type. For example, INTEGER, STRING, or FLOAT.
ATTRDICT_ID
BIGINT
The reference number of the attribute dictionary to which this attribute belongs. Null for a localattribute.
STOREENT_ID
INTEGER NOT NULL
The reference number of the store entity to which this attribute belongs.
SEQUENCE
DOUBLE NOT NULL DEFAULT 0
The display order of attributes in an attribute group or in the root of the attribute dictionary.
DISPLAYABLE
INTEGER
This flag identifies if this attribute is displayable on the store front. This flag can be used to temporarily hide an attribute on the store front. It can also used for attributes that belong to a web crawler (such as Google’s web crawling robot), that is not for display to customer. A value of 1 or null indicates that the attribute is displayable, while a value of 0 indicates that the attribute is not displayable.
SEARCHABLE
INTEGER
This flag identifies if this attribute can be searched. Searchable attributes can be indexed to search engine. A value of 1 indicates that theattribute is searchable, while a value of 0 or null indicates that the attribute is not searchable.
COMPARABLE
INTEGER
This flag identifies if this attribute can be used for comparison. A value of 1 indicates that theattribute can be used for comparison, while a value of 0 or null indicates that the attribute cannot be used for comparison. For example,attribute “Auto On/Off” is marked as comparable for all coffee makers. If a shopper selects thisattribute on the store front page, only coffee makers that have the “Auto On/Off” feature will be displayed.
FIELD1
INTEGER
Customizable field.
FIELD2
INTEGER
Customizable field.
FIELD3
VARCHAR(254)
Customizable field.
OPTCOUNTER
SMALLINT NOT NULL DEFAULT 0
Reserved IBM Internal Use.
ATTRUSAGE
INTEGER
No ATTRUSAGE external description assigned yet
This table holds attribute DICTIONARY attributes. So while the old attribute table had a row for every combination of catentry_id and a particular attribute, now we instead have attr as a list of all possible attributes, but without associating them with a particular catentry. In DBA-speak, it is a fact table. This makes attr much smaller than attribute was in most cases. Possible values are stored in ATTRVAL, and the table CATENTRYATTR is used to relate a catentry to it’s corresponding ATTRs and ATTRVALs. This is a better model than before. I find that the CATENTRYATTR table seems to be the largest of this set of tables now in terms of cardinality, which is great considering the maximum row width is only about 300, as compared to close to 1,300 for the old ATTRIBUTE table.

KEYS

Column Name
Column Type
Description
KEYS_ID
INTEGER NOT NULL
The internally generated unique ID.
TABLENAME
VARCHAR(18) NOT NULL
The table into which the next key value is inserted.
COLUMNNAME
VARCHAR(18) NOT NULL
The column into which the next key value is inserted.
COUNTER
BIGINT NOT NULL
The next starting key value to be fetched by the server from the database.
PREFETCHSIZE
BIGINT DEFAULT 20
The size of the block of keys prefetched by the server.
LOWERBOUND
BIGINT DEFAULT 0
The lower bound of the range of key values available for this table.
UPPERBOUND
BIGINT DEFAULT 2147483648
The upper bound of the range of valid key values for this table.
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
Nearly every Primary Key in a Commerce database is a generated key. Up through Commerce 6, all of those values came from this table – each table with a generated key had a row in KEYS, and Commerce would query the KEYS table to get the right value on insert. In Commerce 7, they started making more significant use of sequences, but the KEYS table is still used for some things.
Often as data is loaded into a new Commerce database, different ranges are chosen to avoid key conflicts. There are also some interesting articles out there on key-splitting and what scenarios you might use that in. I have a few developers who call me every time they get SQL0803, and tell me to check the keys entries for the tables they’re working with. It’s rarely the problem, but it is possible for the value in the keys table to get behind the values in the actual table and end up with PK conflicts as a result. The solution if that happens is simply to increase the value of the COUNTER for that table.

SITE

Column Name
Column Type
Description
DATABASEVENDOR
VARCHAR(32)
Reserved for IBM internal use.
EDITION
VARCHAR(16)
Reserved for IBM internal use.
VERSION
SMALLINT
Reserved for IBM internal use.
RELEASE
SMALLINT
Reserved for IBM internal use.
MOD
SMALLINT
Reserved for IBM internal use.
FIXPACK
SMALLINT
Reserved for IBM internal use.
COMPNAME
VARCHAR(32) NOT NULL DEFAULT ‘BASE’
Reserved IBM Internal Use
OPTCOUNTER
SMALLINT
Reserved for IBM internal use.
This table is not one that Commerce itself uses a lot, but it does store the version and FixPack and Feature Pack information, so can be very useful if you somehow have a mismatch between the Commerce application and the Commerce database, or if you need to verify Commerce versions at the database level. It is not one you will generally update.


Tutorial: Create JSP custom tag library

A Custom tag is a user defined JSP language element. When a JSP page containing custom tag is translated into a Servlet, the tag is converted to operations on an object called tag handler. The Web container then invokes those operations when the JSP page’s servlet is executed. It speeds up web application development because of code reuse feasibility. Custom tags can access all the objects available in JSP pages. Custom tags can modify the response generated by the calling page. Custom tags can be nested.
Custom tag library consists of one or more Java classes called Tag Handlers and an XML tag library descriptor file (tag library).
A class which has to be a tag handler needs to implement Tag interface or IterationTag interface or BodyTag interface or it can also extend TagSupport class or BodyTagSupport class. All the classes that support custom tags are present inside a package called javax.servlet.jsp.tagext.
Let us create a custom tag which will does substring operation on given input. For this we will first create our Tag Handler class. Create a class called SubstrTagHandler and copy/paste following code in it.
package net.viralpatel.jsp.custom.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class SubstrTagHandler extends TagSupport {
    private String input;
    private int start;
    private int end;
     
    @Override
    public int doStartTag() throws JspException {
         
        try {
            //Get the writer object for output.
            JspWriter out = pageContext.getOut();

            //Perform substr operation on string.
            out.println(input.substring(start, end));

        } catch (IOException e) {
            e.printStackTrace();
        }
        return SKIP_BODY;
    }
    public String getInput() {
        return input;
    }
    public void setInput(String input) {
        this.input = input;
    }
    public int getStart() {
        return start;
    }
    public void setStart(int start) {
        this.start = start;
    }
    public int getEnd() {
        return end;
    }
    public void setEnd(int end) {
        this.end = end;
    }
}
In above code we have created three attributes: input, start and end. These are the inputs that we will get when the custom tag will be invoked from a JSP file. Also note that, these attributes have getter and setter methods which will be used to set the property values.
Now we will create the tag descriptor file also called TLD. Create a file called SubstrDescriptor.tld in WEB-INF directory of your web project and copy / paste following content in it.
<?xml version="1.0" encoding="UTF-8"?>
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>substr</shortname>
<info>Sample taglib for Substr operation</info>
<uri>http://viralpatel.net/blogs/jsp/taglib/substr</uri>
<tag>
    <name>substring</name>
    <tagclass>net.viralpatel.jsp.custom.taglib.SubstrTagHandler</tagclass>
    <info>Substring function.</info>
    <attribute>
      <name>input</name>
      <required>true</required>
  </attribute>
    <attribute>
      <name>start</name>
      <required>true</required>
  </attribute>
    <attribute>
      <name>end</name>
      <required>true</required>
  </attribute>
</tag>
</taglib>
In above tld file, <tag> is used to define a custom tag. Each new tag will have its own tag handler class which we specify in <tagclass> tag. Also <name> tag in <tag> represents the tag name that we use in jsp file. We have provided the three attributes with this tag: input, start and end. input is the String whose sub string needs to be parsed. start is the start index and end is the end index.
We have just created our first Custom Taglib for JSP. Now let us use the custom taglib in a JSP file. For this create index.jsp in your web application (if it exists, modify it and add this code) and add following code in it. <required> true make these attribute mandatory.
<%@taglib prefix="test" uri="/WEB-INF/SubstrDescriptor.tld"%>
<html>
<head>
    <title>JSP Custom Taglib example: Substr function</title>
</head>
<body>
    SUBSTR(GOODMORNING, 1, 6) is
    <font color="blue">
    <test:substring input="GOODMORNING" start="1" end="6"/>
    </font>
</body>
</html>
Following is the screenshot of the output.
http://img.viralpatel.net/2008/12/jsp-custom-taglib-tag-example.png