The historical purchase and purchase item exports as well as the delta purchase and purchase item exports all use the OrderMgr.searchOrders() function to retrieve orders from SFCC:
|
if(empty(lastRunDate)){ |
|
ordersToProcess = OrderMgr.searchOrders(orderStatusForExport.join(' OR '), 'creationDate asc'); |
|
}else{ |
|
ordersToProcess = OrderMgr.searchOrders(orderStatusForExport.join(' OR ') + ' AND creationDate >= {0}', 'creationDate asc', lastRunDate); |
|
} |
But this function is documented to only retrieve up to 1000 orders:
https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_order_OrderMgr.html#dw_order_OrderMgr_searchOrders_String_String_Object_DetailAnchor
- the result is limited to a maximum of 1000 orders
This will certainly cause a problem for the historical data load, and also may cause a problem for delta loads when order volume is high.
ADDITIONALLY - We've discovered with our production deployment that this function doesn't always work - With 11 million orders on our PROD instance to export, the function returns almost immediately with a timeout exception.
Recommend using OrderMgr.processOrders() instead - It won't work for a chunked job so you can't see progress or how many orders are being sent from the BM UI, but it should at least resolve both of the issues mentioned above.
The historical purchase and purchase item exports as well as the delta purchase and purchase item exports all use the
OrderMgr.searchOrders()function to retrieve orders from SFCC:bloomreach-salesforce-commercecloud-b2c-integration/cartridges/int_bloomreach_engagement/cartridge/scripts/helpers/BloomreachEngagementGenerateCSVHelper.js
Lines 291 to 295 in ec43840
But this function is documented to only retrieve up to 1000 orders:
https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_order_OrderMgr.html#dw_order_OrderMgr_searchOrders_String_String_Object_DetailAnchor
This will certainly cause a problem for the historical data load, and also may cause a problem for delta loads when order volume is high.
ADDITIONALLY - We've discovered with our production deployment that this function doesn't always work - With 11 million orders on our PROD instance to export, the function returns almost immediately with a timeout exception.
Recommend using
OrderMgr.processOrders()instead - It won't work for a chunked job so you can't see progress or how many orders are being sent from the BM UI, but it should at least resolve both of the issues mentioned above.