Sunday, January 6, 2019

Partially Fulfilling Items via Web Service

On various cases, there can be multiple Item Fulfillments that should be created for one transaction. This usually happens when account has Multiple Locations and Multiple Shipping Routes enabled.

Using WSDL versions 2009.2 and older, sample SOAP Request:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<platformMsgs:add
 <platformMsgs:record xsi:type="s0:ItemFulfillment">
 <s0:createdFrom internalId="12031981"/>
 <s0:itemList>
  <s0:item>
  <s0:quantity>1</s0:quantity>
  <s0:item internalId="390" />
  <s0:orderLine>2</s0:orderLine>
  </s0:item>
 </s0:itemList>
 </platformMsgs:record>
</platformMsgs:add>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Using WSDL versions 2010.1 and above, sample SOAP Request:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 <platformMsgs:add
          <platformMsgs:record xsi:type="s0:ItemFulfillment">
            <s0:createdFrom internalId="12031981" />
            <s0:itemList replaceAll="false">
               <s0:item>
                  <s0:quantity>0</s0:quantity>
                  <s0:item internalId="680" />
                  <s0:orderLine>1</s0:orderLine>
               </s0:item>
               <s0:item>
                  <s0:quantity>1</s0:quantity>
                  <s0:item internalId="390" />
                  <s0:orderLine>2</s0:orderLine>
               </s0:item>
               <s0:item>
                  <s0:quantity>0</s0:quantity>
                  <s0:item internalId="349" />
                  <s0:orderLine>3</s0:orderLine>
               </s0:item>
               <s0:item>
                  <s0:quantity>0</s0:quantity>
                  <s0:item internalId="746" />
                  <s0:orderLine>4</s0:orderLine>
               </s0:item>
            </s0:itemList>
         </platformMsgs:record>
      </platformMsgs:add>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
NOTES:
- Items on orderLine 1, 3 and 4 are all unfulfilled.
- No need to specify the item if it is already fulfilled.
- Set the quantity to zero(0) for the item(s) you do not intend to fulfill.

On Accounts that has Multiple Locations enabled, fulfill the items coming from the same location. An Item Fulfillment record cannot be coming from multiple locations.
Same as for Multiple Shipping Routes enabled, please note that the items should be fulfilled separately based on the address it will be shipped to.

 

No comments:

Post a Comment