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:
- Created a new basket (the inflight change basket)
- Updated the order's basket reference from the original basket to the inflight change basket
- 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>'
Step 3: Find the order and check its current basket link
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__cfield 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.
Priyanka Bhotika
Comments