Request and response for Optimizer API and Idle Optimizer API

The Optimizer API and Idle Optimizer API accept requests for a promise order from IBM® Sterling Order Management System.

Optimizer API request and response

The Optimizer API request is accepted in XML format. For more information about the Optimizer API request input, see Optimizer API.


<Promise OrderDate="" OrderNo="">
    <PromiseLines>
        <PromiseLine CarrierServiceCode="" ItemID="" LineId="" ProductClass="" RequiredQty="" UnitOfMeasure="" DeliveryMethod="" IsPreDefinedNode="">
            <ShipToAddress Country="" State="" ZipCode="" />
            <PossibleAssignments>
                <Assignment AssignmentKey="" CapacityConsumed="" CapacityUtilization="" Distance="" Quantity="" ShipNode="" IsExternalNode="" DeliveryDate="" ShipDate="">
                    <Supplies>
                        <Supply AvailableQuantity="" FirstShipDate="" LastShipDate="" SafetyQuantity="" Track="" /> </Supplies>
                </Assignment>
            </PossibleAssignments>
        </PromiseLine>
    </PromiseLines>
    <SuggestedOption>
        <Option FirstDate="" HasAnyUnavailableQty="" LastDate="" TotalShipments="">
            <PromiseLines>
                <PromiseLine LineId="">
                    <Assignments>
                        <Assignment DeliveryDate="" Distance="" EmptyAssignmentReason="" InteractionNo="" Quantity="" ShipDate="" ShipNode="" /> </Assignments>
                </PromiseLine>
            </PromiseLines>
            <Interactions>
                <Interaction Carrier="" CarrierServiceCode="" DeliveryDate="" DeliveryMethod="" InteractionNo="" Node="" ShipDate="">
                    <PersonInfoShipTo Country="" State="" ZipCode="" /> </Interaction>
            </Interactions>
        </Option>
    </SuggestedOption>
</Promise>

The Optimizer API response is returned in XML format.


<Promise OrderNo="" OrderDate="">
   <PromiseLines>
      <PromiseLine LineId="" ItemID="">
         <PossibleAssignments>
            <Assignment AssignmentKey="" Quantity="" IsExternalNode="" RejectChoice="" RejectionReason="" FirstShipDate="">
               <PossibleCarriers>
                  <Carrier CarrierServiceCode="" Scac="" ExpectedShipDate=""></Carrier>
               </PossibleCarriers>
               <Costs AssignmentPriority=""></Costs>
            </Assignment>
         </PossibleAssignments>
      </PromiseLine>
   </PromiseLines>
</Promise>

The CapacityConsumed attribute is required when the fulfillment network load balancing cost configuration is set to greater than 0. Otherwise, it is optional. For more information, see Managing optimization profiles.

Idle Optimizer API request and response

The Idle Optimizer API accepts JSON format in the request body and returns JSON format in the response. For more information on the Idle Optimizer API request input, see Idle Optimizer API.

Optimizing orders with vendor (direct ship-to vendor) nodes

If you have vendor nodes in your fulfillment network, ensure that they are specified with Use For Fulfillment as Y in the Fulfillment network node data type (FN). For more information on FN node data type, see Fulfillment network node data type (FN).

Use isExternalNode to identify assignments that are fulfilled from vendor (direct ship-to vendor) nodes.
  • Valid values are Y or N.
    • By default, the value is set to N.
    • If a vendor node is specified as not active (Use For Fulfillment = N in the Fulfillment Network Data feed, IBM Sterling Order Management System returns a rejection reason of Ship node is not active for fulfillment in the response.
    • When Use For Fulfillment and IsExternalNode are set to Y, the vendor node's assignment is given preference over other assignments for an order line.
      • When the vendor node can fulfill the order line completely, it is marked as selected and other assignments are rejected.
      • When the vendor node can fulfill order line partially, the vendor node is marked as selected and other assignments are optimized for remaining quantity.

Orders with pre-selected nodes

Use IsPredefinedNode in the request to specify order lines where the shipping node is already selected for sourcing and optimization is not required.
  • Valid values are Y or N. It is assumed that lines with delivery method PICK or CARRY and lines marked for Same Day Delivery have isPredefinedNode Y when sent from the Order Management System.
  • By default, the value is considered as N if it is not specified.
  • Lines marked Y are not optimized.

Carrier information

The response contains the carrier information only if isExternalNode is set to N in the request and if RejectChoice is N.

Supply information

Supply information for a specific point in time is required as part of the Optimizer API call when the Inventory Model is turned on. There can be multiple pieces of supply information for a single ship node assignment. Supply information is added for all the supplies of a ship node assignment. Each supply contains AvailableQuantity and SafetyQuantity, which are added together to get the total available supply at the time of optimization.

Supply information is used to calculate days of supply, which is used in stockout and markdown predictions.

For example, when the input of the Optimizer API has the below information, the total available supply considered is 12.

<Supplies> <Supply AvailableQuantity="10" FirstShipDate="2020-06-08" LastShipDate="2020-06-12"
SafetyQuantity="2" SupplyID="ONHAND" Track="Y"/> </Supplies>

Shipping Benefit calculation for OMS sourcing choice

In order for you to view the KPIs for the OMS sourcing choice, you must configure your order management system to send the IBM Sterling Order Management System Suggested Option in the request to the Idle Optimizer API and Optimization API. The KPIs for the OMS sourcing choice are used to derive the Shipping benefit that is displayed in the Benefits Report.

External Delivery Dates calculation

For information about the external delivery dates calculation, see Estimated ship date calculation.

Enquiry mode

If the request to the API contains the isEnquireMode attribute, the order line will not be considered for any KPI calculations or alternate optimization. Use this attribute to make Optimization calls from Order Management APIs like the findInventory API.

The following examples demonstrate what the API input looks like with and without the isEnquireMode attribute.

Example 1: Input with isEnquireMode attribute, where the order line will not be considered for any KPI calculations or alternate optimization:

<Promise OrderDate="2016-07-18T07:41:33+00:00" OrderNo="test_defect11" IsEnquireMode="Y">
    <PromiseLines>
        <PromiseLine ItemID="1111111" LineId="l01" ProductClass="Good" RequiredQty="1" UnitOfMeasure="EACH" CarrierServiceCode="Standard Ground">
            <ShipToAddress Country="US" State="MA" ZipCode="36100"/>
            <PossibleAssignments>
                <Assignment AssignmentKey="37::::20160529000000" CapacityUtilization="" Distance="71.04858709" Quantity="1.00" ShipNode="37" CapacityConsumed="100" TotalAvailableQuantity="3" DeliveryDate="2020-05-09T10:00:00-04:00" ShipDate="2020-05-08T10:00:00-04:00">
                    
                </Assignment>   
            </PossibleAssignments>
        </PromiseLine>
    </PromiseLines> 
</Promise>

Example 2: Input without the isEnquireMode attribute, where the order line will be considered for any KPI calculations or alternate optimization:

<Promise OrderDate="2016-07-18T07:41:33+00:00" OrderNo="test_defect11" 
    <PromiseLines>
        <PromiseLine ItemID="1111111" LineId="l01" ProductClass="Good" RequiredQty="1" UnitOfMeasure="EACH" CarrierServiceCode="Standard Ground">
            <ShipToAddress Country="US" State="MA" ZipCode="36100"/>
            <PossibleAssignments>
                <Assignment AssignmentKey="37::::20160529000000" CapacityUtilization="" Distance="71.04858709" Quantity="1.00" ShipNode="37" CapacityConsumed="100" TotalAvailableQuantity="3" DeliveryDate="2020-05-09T10:00:00-04:00" ShipDate="2020-05-08T10:00:00-04:00">
                    
                </Assignment>   
            </PossibleAssignments>
        </PromiseLine>
    </PromiseLines> 
</Promise>

For more information about enquiry mode, see the Idle API topic in IBM Developer.