Develop > Presentation layer > Customize IBM Sales Center > Customizing Sales Center support for large shopping carts


Pagination framework

The pagination framework provides a generic user interface and behavior that lets you extend editor pages to incorporate page navigation tools. The framework adds a new bar to the top of pagination-enabled editor pages. Using these buttons, Customer Service Representatives (CSRs) can move to the next, previous, first, and last page. They can also jump to any page by entering the page number. Labels display the current and total number of pages. Pagination is incorporated into the order items, comments, and history pages of the Order editor, and the items and comments pages of the Quote editor by default.


Pagination support for the Order items page

The framework introduces the following flags which can be specified by the Sales Center when sending request Business Object Documents (BODs) to WebSphere Commerce:

Order items Pagination flag

This flag only applies when an order is in the edit state, and the CSR is working on the order items page. When this flag is true, it enables pagination buttons on the order items page, and the CSR can go to any of the pages. This flag becomes false whenever the CSR makes any changes on the order items page. Once those changes are applied, the flag is enabled again, and the CSR can go to any page.

GetOrderLevelDetails

This flag is used by the GetSalesOrderRequest. If the flag is true, ShowSalesOrder will contain order header info.

GetOrderItems

This flag is used by the GetSalesOrderRequest. If the flag is true, ShowSalesOrder will contain order items details by page.

To support pagination on the order items page, a new Widget Manager was added to handle the order items page. When a CSR searches an order, the widget manager returns the order details and the first page of order items. The number of items listed on the page is defined in the user preferences page.

The fix pack separates synchronize or create requests from the order items user interface, into two distinct actions, whereas both used to be performed at the same time. For any Sync or Create actions, the response indicates only whether the action was success or failure. A separate action is then necessary to retrieve the order level details or order items levels details to update the user interface.

The Sync and Create actions now pass a Confirm parameter, which can be set to either always or never. Setting this value to always means that the response will always contains detail information. Setting it to never means that never contain detail information, and it will only contain a success or failure status message. There are two additional attributes introduced which determine whether the server returns order level information or order items information.


Order items level adjustments for paginated items

The Order Payment page only displays order level adjustments and the total adjustment for an order.

To display the adjustments for all of the order items, another call is required.

To see order item level adjustments, which may span multiple pages, select one or more order items from the current page, and then select View adjustments from the More actions list on the Order Items page. The Item Level Adjustment dialog displays with the order item level adjustments in detail. If there are pending updates to the order items, apply these changes before you can view the adjustments. If there are applicable adjustments, they will display in the View Adjustment page.

Pagination also supports displaying order item level adjustments. The order level adjustments dialog displays the following details:

A new order item level adjustment dialog displays the order item level adjustments in detail.


Tie and Untie functions for paginated items

After providing pagination, CSRs may need to tie or untie items from different pages, to arrange that they ship together.

To support tie and untie functions from different pages, a tie container was added. When a CSR selects items from one page, they can add them to the container, which serves to temporarily store the items. Once all of the items from various pages are added, the CSR can then view the tie container, and tie or untie items as if they were viewing the items on a single order item page. CSRs can also clear the container of items by clicking Clear in the dialog.


Pagination support for the Order comments page

The Order comments page pagination implementation uses a separate service request than the order request classes to get the order comments from the Websphere Commerce server. It uses support from the newly introduced pagination widget manager to provide pagination support in the page. When a CSR requests order comments for a specific order, the widget manager returns the order comments based on the startIndex and maxThreshold being passed as part of the request. The GetOrderCommentRequest command is invoked by the com.ibm.commerce.telesales.findOrderComments service request that creates the BOD request and unmarshalls the response.

Whenever a user adds a new comment, it invokes a "CreateSalesOrderCommentRequest" request. In response, the server sends a "ConfirmSalesOrderComment" which does not contain any comment details. It only confirms whether the status is either success or failure.

To get the comment details, a second GET request has to be made. That is, to display the comments in the user interface, a "GetSalesOrderCommentRequest" request must be called, using "RefreshOrderCommentAction". The response is a "ShowSalesOrderComment", which contains the comment details.


Pagination support for the Order history page

The Order history page pagination implementation is very similar to the order comments page pagination implementation. It also uses separate service requests to get the order change comments from the Websphere Commerce server. This page also implements pagination support by using the pagination widget manager. No additional attributes are passed as part of the requests, and the widget manager returns the order change comments based on the startIndex and maxThreshold being passed as input. The GetSalesOrderChangeHistoryRequest command is invoked by the com.ibm.commerce.telesales.findSalesOrderChangeHistory service request that creates the BOD request and unmarshalls the response.

The pagination implementation provides order change comments on a version level and not on the comments on each version.


Pagination support for the Quote items page

The following flags are introduced for providing pagination support for Quote items page.

Quote items Pagination flag

This flag only applies when a quote is in the edit state, and the CSR is working on the quote items page. When this flag is true, it enables pagination buttons on the quote items page, and the CSR can go to any of the pages. This flag becomes false whenever the CSR makes any changes on the quote items page. Once those changes are applied, the flag is enabled again, and the CSR can go to any page.

GetQuoteLevelDetails

This flag is used by the GetSalesQuoteRequest. If the flag is true, ShowQuote will contain quote header info.

GetQuoteItems

This flag is used by the GetQuoteRequest. If the flag is true, ShowQuote will contain order items details by page.

To support pagination on the quote items page, a new Widget Manager was added to handle the quote items page. When a CSR searches a quote, the widget manager returns the details and the first page of quote items. The number of items listed on the page is defined in the user preferences page.

The fix pack separates synchronize or create requests from the quote items user interface, into two distinct actions, whereas both used to be performed at the same time. For any Sync or Create actions, the response indicates only whether the action was success or failure. A separate action is then necessary to retrieve the quote level details or quote items levels details to update the user interface.

If the client gets a successful 'Confirm' response after performing any action, then it makes another GET request to get the quote level details. If a refresh of the current page is required after performing any action on an quote, it notifies the pagination manager to refresh the current page, both for content as well as the number of records, if applicable.

The Sync and Create actions now pass a Confirm parameter, which can be set to either always or never. Setting this value to always means that the response will always contains detail information. Setting it to never means that never contain detail information, and it will only contain a success or failure status message. There are two additional attributes introduced which determine whether the server returns order level information or order items information.


Pagination support for the Quote comments page

The Quote comments page pagination implementation uses a separate service request than the order request classes to get the quote comments from the Websphere Commerce server. It uses support from the pagination widget manager to provide pagination support in the page. When a CSR requests quote comments for a specific quote, the widget manager returns the comments based on the startIndex and maxThreshold being passed as part of request. The GetQuoteCommentRequest command is invoked by the com.ibm.commerce.telesales.findQuoteComments service request that creates the BOD request and unmarshalls the response.

Whenever a user adds a new comment, it invokes a "CreateQuoteCommentRequest" request. In response, the server sends a "ConfirmQuoteComment" which does not contain any comment details. It only confirms whether the status is either success or failure.

To get the comment details, a second GET request has to be made. That is, to display the comments in the user interface, a "GetQuoteCommentRequest" request must be called, using "RefreshQuoteCommentAction". The response is a "ShowQuoteComment", which contains the comment details.


Pagination support for the View order version Page

Pagination is also provided at the order item level of the view order version page. This helps a CSR to view a previous order with a large number of items, page by page. The pagination widget manager was extended to provide pagination support to this page. Because a previously shipped order is just a sales order with an associated version and some other information removed, it's possible display the order information in read-only mode. Prior orders can only be viewed. They cannot be modified.

Two additional attributes are passed along with the request when requesting an earlier version of an order:

showHistoryOrder

This parameter identifies whether a request is for regular order or a history order. If this flag is set to "true", it means that an earlier version of the order is being requested. If the parameter is set to "false", the request is for a regular order.

historyOrderVersion

This parameter identifies the version of the order being requested.

The server side on the BOD is constructed based on these parameters being passed and the information populated from different place and the BOD would be constructed. The client side UI displays only the information those are relevant for a history order.


Related tasks

Add pagination to editor pages

Disable pagination support


+

Search Tips   |   Advanced Search