IBM Support

How to retrieve orderlist in paginated form using 'MaximumRecords' attributes from getOrderList API in scenario where 'MaximumRecords' count is lesser than total records count

Question & Answer


Question

Let us consider that the customer has 500 orders and if user uses the MaximumRecords=100 in getOrderList API input with PaginationStrategy="GENERIC", then user gets results for only 100 records. User is not able to see the remaining 101 - 500 orders records in IBM Sterling Order Management System.  So, question here is how customer can  see the complete orders (say 101 - 200 ) in 2nd call and 201 - 300 in third call, and so on.  
The sample API input XMLs used which does not return the 101 - 200 records is  -
API : getPage API internally calls getOrderList API
Input XML -
<Page PageNumber="1" PageSetToken="" PageSize="100" PaginationStrategy="GENERIC" Refresh="N" >
    <PreviousPage PageNumber="1"/>
    <API IsFlow="Y" Name="GetOrderListService">
        <Input>
            <Order CustomerEMailID="--masked--" CustomerFirstName="" CustomerLastName="" MaximumRecords="100">
                <OrderBy>
                    <Attribute Desc="Y" Name="OrderDate"/>
                </OrderBy>
            </Order>
        </Input>
        <Template/>
    </API>
</Page>

Cause

PaginationStrategy used here in this scenario does not help fulfill the requirement.

Answer

The mentioned requirement can be achieved by making use of PaginationStrategy="ROWNUM".
With ROWNUM, following input pulls records from 101 onward because we are on page number 2.
<Page PageNumber="2" PageSetToken="" PageSize="100" PaginationStrategy="ROWNUM" Refresh="Y" XMLPath="">
    <ReferenceData/>
    <PreviousPage PageNumber=""/>
    <API IsFlow="N" Name="getOrderList">
        <Input>
            <Order MaximumRecords="100">
                <OrderBy>
                    <Attribute Desc="Y" Name="OrderDate"/>
                </OrderBy>
            </Order>
        </Input>
        <Template>
            <OrderList>
                <Order DocumentType="" OrderDate="" OrderNo="" OrderPurpose="" OrderType="" Status="">
                </Order>
            </OrderList>
        </Template>
    </API>
</Page>

NOTE -
As per, API Java Docs for getPage API - 
By default, only 'Generic' strategy is supported by List APIs. Support for any other strategy for an API, has to be evaluated and documented by the respective API.

Hence, request you to do thorough testing around this area in your lower environments to avoid any unforeseen issues, if you are using mentioned approach.

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"ARM Category":[{"code":"a8m0z000000cy01AAA","label":"Performance"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
31 May 2022

UID

ibm16590941