Skip to main content

Hi all. Reaching out to you for input on a hiccup we’re trying to solve for. We are implementing B2B and OMS. Here is my scenario. 

I must ship to an account with 1000 locations.  2 different products are being shipped to each location at a qty that varies according to the customer’s request. 

The current solution is to create 2000 staging orders (custom object) that are grouped into orders per Contact Point Address. Once the 1k orders/order summaries are ready to go to the shipping vendor, 1k fulfillment orders are created via a custom button. Shipping confirmation back from the shipping vendor changes the status of the fulfilment orders and set the order summaries status to closed. (Fyi, a job runs nightly to delete the staging orders).

This gives us row lock error while creating order summaries from a large number of orders at one time. What is the best practice here? I am new to OMS so trying to understand better the implications. Since we have a high volume of orders every day, should we be creating orders summaries the way we do? One suggestion is to create fulfillment orders directly. I’m curious. How are you handling high volume order creation via OMS? Thank you in advance for your input. 

  #Order Management

2 Antworten
  1. 28. Okt. 2023, 13:37

    Hi @Astie Yovo-Kpela,

    When there are multiple Apex transactions that are creating Order Summary records by Connect API, the related Account of the Order will be queried by that Connect API which will cause the lock row issue. If it was B2C, I'd say go with multiple Apex Batches since most of the time the Account will be different but in your case, I'd go with Apex Batch but one at a time/serial (in order to prevent having lock issues).

     

    Regarding Fulfillment Order creation, I'd separate that process from the Order Summary creation process by creating another Apex Batch.

     

    Also please check this Salesforce Architect article which provides useful information for Record-Triggered Automation | Salesforce Architects

0/9000