Japan has faced challenges with the SFCC Business Manager due to large orders exceeding 5,000 XML lines, which surpasses the 5,000 api.dw.io.XMLStreamReader.getXMLObject().maxElements set by SFCC. These oversized orders create significant obstacles, affecting not only the problematic order itself but also preventing other normal orders from being exported to NetSDL. In this user guide, we will outline the steps the Tech Team can take to address this issue and resolve the blockage.
Prerequisites
1. Demandware with Ease - Chrome Web Store
This extension for Salesforce Commerce Cloud B2C (Demandware) enables you to perform WebDav file actions, allowing you to upload reprocessed files. Without this extension, you can only view files but cannot edit them.
Click here to know more about how to install and generate key for WebDav file access.
2. Notepad ++
Notepad++ helps you easily identify each <order> element in the XML and see how many lines correspond to each order by using the "Find All in Current Document" feature.
Click here to access the link to download.
Steps
1. In SFCC Business Manager production instance, navigate to Administration > Operations > Jobs, click on Export Placed Orders. Disable this function by unchecking the Enabled option to prevent the system from attempting to export additional orders every 3 minutes while large orders are blocking the process and causing recurring job failures.
2. Go to Administration > Site Development > Development Setup, click on Folder Browser
3. Navigate to Impex > src > order > ToysRUs_JP as follows, click on tmp
4. A list of xml will be there, Download the latest xml file.
5. Open the xml file using Notepad ++. Press Ctrl+F and search for order order-no, click on Find All in Current Document
6. In the bottom window, view all Line numbers corresponding to each <order> element.
7. Identify which Line numbers exceed 5000 lines for these elements. Copy this data into an Excel spreadsheet for analysis. Use Excel's Find/Replace function, Text to Columns feature, and create a formula to calculate the line count difference for each order number.
8. Having identified that order number 4700975636 consists of 9909 lines, we can now proceed with the next steps.
9. In SFCC Business Manager production instance, navigate to Merchant Tools > Ordering > Orders, search and find the problematic order.
10. Clear all the values in Export After in the Attributes tab. Hit Apply to save the changes. Also inform the Japan teammates for this order number to handle separately.
11. Return to your XML file, remove the entire <order order-no: 4700975636> element (from the opening tag to the closing </order> tag), and then save the document.
12. Go to Administration > Site Development > Development Setup, click on Copy WebDav URL
13. Open another browser tab and paste the URL. Delete all other existing files if there are any. Then drop the reprocessed XML file that you have just updated. Hit save to continue.
14. Go to Impex > src > order > ToysRUs_JP > orders and remove the existing xml file.
15. Navigate to Administration > Operations > Jobs, click on JP - Process Exported Orders, hit Run Now
16. Go to Impex > src > order > ToysRUs_JP > tmp and confirm that the file you uploaded has been removed from this location.
18. Navigate to Administration > Operations > Jobs, click on JP - Generate Export Order XML, hit Run Now
18. Verify with the Japan IT team that the order has been successfully exported to NetSDL.
19. Now you need to process the backorders that have been accumulated during the pause of the job Export Placed Orders, go to Impex > src > order > ToysRUs_JP > orders and download the latest xml file. Then you can download the one that exist in this folder.
20. Examine the XML file's size. If it exceeds 1MB, divide it into multiple smaller XML files, each under 1MB. For instance, if the file is 5.2MB, split it into 6 separate files.
21. Upload each file individually to Impex > src > order > ToysRUs_JP > tmp and run the "JP - Process Exported Orders" job after each upload. For example, if you have 3 files, upload the first file, run the job, then repeat this sequence for each remaining file.
22. Run the job for JP - Generate Export Order XML
23. Verify with the Japan IT team that those orders have been successfully exported to NetSDL.
24. If orders can be exported successfully, you can now enable the Export Placed Orders job again.
