Salesforce Order Management Administrator AP study materials
Salesforce Order Management Administrator AP study resources

Order Activation Fails for Multi-Warehouse Fulfillment

Salesforce Order Management Administrator AP · Put your knowledge to work in context.

All case studies

Order Activation Fails for Multi-Warehouse Fulfillment

A retailer configures Order Management to fulfill orders from two warehouses. Each warehouse is set up as a separate location with its own fulfillment order. The order activation process fails for 20% of orders, with the error: 'Unable to create fulfillment order: No delivery group assigned.' The orders have multiple line items, some with different ship-from locations. The fulfillment order creation is triggered by a flow that runs after order activation. The administrator notices that the delivery group assignment logic uses a custom Apex class that queries inventory by location. The inventory records show sufficient stock at both locations. The error occurs more frequently for orders with more than three line items.

1. What is the most likely root cause of the activation failures, and how would you diagnose it?

Read the worked answer

The error indicates that the delivery group is not being assigned to the fulfillment order. Since the fulfillment order creation is triggered after order activation, and the delivery group assignment relies on a custom Apex class, the issue likely stems from that class not properly handling orders with multiple line items or multiple ship-from locations. The class might be designed to assign a single delivery group per order, but when line items have different ship-from locations, it may fail to create the necessary delivery groups. Diagnosis: 1) Review the Apex class logic to see how it determines delivery groups. 2) Check debug logs for the failing orders to see if the class throws an exception or returns null. 3) Verify that the class correctly groups line items by ship-from location. 4) Test with orders having line items from different locations to reproduce the error.

2. What configuration change would you recommend to ensure reliable delivery group assignment?

Read the worked answer

Instead of relying on a custom Apex class for delivery group assignment, use Salesforce's standard Order Management features. Configure the order activation process to automatically create delivery groups based on ship-from location. This can be done by setting up the fulfillment order creation flow to use the 'Create Delivery Groups' action, which groups line items by the specified criteria (e.g., ship-from location). Ensure that the fulfillment order creation process is configured to handle multiple delivery groups per order. Additionally, review the order activation settings to ensure that the 'Assign Delivery Groups' checkbox is enabled. This reduces custom code and leverages standard functionality, which is more reliable and maintainable.