Overview

AdMagic receives orders from various channels, such as EDI and Shopify Store integration. All these orders are brought in by automatic routines. Once the order is in the GFERP, users will need to manually allocate and create shipments for those orders. However, due to the volume of orders, manual allocation and creating warehouse shipments is not feasible for AdMagic. Therefore, an automatic/scheduled process needs to be implemented.

Process

Sales Order Allocation Challenge

Issue:

AdMagic states that they will have more than 50,000 order lines with the same item in the same warehouse open at any given time, especially for those Kickstarter items. This will cause the out-of-the-box GFERP allocation routine to fail because the routine calculates the item quantity available by subtracting the quantity allocated from the item Quantity on Hand. The system accomplishes this by looping through all allocation lines, which will trigger a 'too many query rows' error, a limitation imposed by Salesforce governor limits. Salesforce restricts querying up to 50,000 rows per transaction.

Solution: