Start a conversation

Order Appears Missing After Basket Submission Due to Inflight Change Re-Link

Symptom

After submitting a product basket, the customer reports that no order was generated. The basket shows status "Submitted" but there is no visible order linked to it.

However, upon investigation, the order was actually generated successfully but is no longer associated with the original basket.

Cause

The order was generated from the original basket and processed through the expected statuses (Incomplete -> Order Submitted -> In Progress). However, an inflight change was subsequently initiated against this order, which:

  1. Created a new basket (the inflight change basket)
  2. Updated the order's basket reference from the original basket to the inflight change basket
  3. Set the order status to Completed (or another terminal status)

As a result, the order no longer appears linked to the original basket, making it seem as though no order was generated.

Resolution

Step 1: Check the Ecommerce Order Request

Query the Ecommerce Order Request associated with the basket:

SELECT Id, Name, csoe__State__c, csoe__Processed__c,
  csoe__Contains_Errors__c, csoe__Processing_Step__c
FROM csoe__Ecommerce_Order_Request__c
WHERE csoe__API_Order_Reference__c = '<API_ORDER_REFERENCE>'

Verify whether the order request was processed successfully.

Step 2: Trace the order via Order Generation records

SELECT Id, Name, csordtelcoa__Status__c, CreatedDate,
  csordtelcoa__Linked_Object_Id__c
FROM csordtelcoa__Order_Generation__c
WHERE csordtelcoa__Linked_Object_Id__c = '<ORDER_REQUEST_ID>'
SELECT Id, Name, csord__Status__c, cscfga__Product_Basket__c,
  cscfga__Product_Basket__r.Name, csord__Identification__c
FROM csord__Order__c
WHERE csord__Identification__c LIKE '%<ORIGINAL_BASKET_SFDC_ID>%'

The csord__Identification__c field contains the original basket's SFDC ID, confirming the order originated from the reported basket. However, cscfga__Product_Basket__c now points to a different (inflight change) basket.

Step 4: Confirm the inflight change

Review the order's field history to see when the basket reference changed and when "Participating in In-flight Change" was set to TRUE.

Step 5: Advise the customer

Inform the customer that:
- The order was successfully generated from the original basket
- An inflight change created a new basket and re-linked the order
- They should check whether the inflight change was intentional
- If it was performed in error, the relevant artefacts (subscriptions, services, orchestration processes) should be cleaned up before resubmitting

Step 6: Clean up if needed

If the inflight change was unintentional, use the cleanup API on the inflight basket:

csordtelcoa.API_V1.cleanGeneratedOSObjectsFromBaskets(
  new List<Id>{ '<INFLIGHT_BASKET_ID>' }
);

Additional Notes

  • This pattern is common in environments where multiple users or automated processes can initiate inflight changes against active orders
  • The csord__Identification__c field on the Order record is the key for tracing an order back to its original basket, even after the basket reference has been updated
  • If the AfterOrderGenerated observer chain fails during order generation, the basket may show Sub Stage as empty and Service Agreement Generated as unchecked, even though the order was actually created. Always check for the existence of the order before concluding it was not generated.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments