Drop Shipper Integration

Drop Shipper Integration

The requirement

Theoretically drop shipping offers enormous benefits for the online retailer in terms of inventory and cash flow management. My client wanted these benefits for three important product lines.

The key to making this happen was providing a smooth pathway through checkout for customers buying drop-ship products and seamless integration with the drop shipper in terms of transferring orders and getting fulfillment updates in return.

The solution

Provision of a table of updatable drop shipper delivery prices, separate from the prices for shipping internally sourced products. A route through cart and checkout for drop ship products showing separate totals and selectable shipping options for drop ship products. Presentation of drop ship delivery details in the Magento ‘success’ page, transactional emails, customer account and admin order pages. Dispatch of order details to drop shippers using their web service (REST or SOAP) or email with attached csv file. Reporting of drop ship delivery revenues and volumes and selection of drop ship newsletter subscribers for email targeting. Exclusion of drop ship products from the internal fulfillment workflow such as pick lists.

Technical Approach

The technical solution was provided for Magento Enterprise 1.13 and comprised the following key components:

  • As one of the three drop shippers specified a RESTFUL API, I built custom classes to build the request and process the response. The payload is XML, which I generated from a customised XSLT template. I used the Xtento Order Export extension to generate the XML when the appropriate order event was fired and hand off to the custom classes.
  • Separate shipping totals and order subtotals for drop ship order items in basket, checkout, transactional emails and Admin were provided by specifying new classes for custom ‘total collectors’. Drop ship shipping prices were collected from a custom table based on delivery address and the shipping type selected by the customer. New subtotal collectors filtered out internally sourced inventory items, and a new class for internally sourced item subtotals filtered out drop ship items. Both subtotals were excluded from the grand total but displayed, and the native subtotal collector was included in the grand total but not displayed.
  • Two approaches were taken for updating shipping prices. For one drop shipper with many price combinations and prices based on order quantity, the table could be updated by creating and uploading a new csv file. For another drop shipper with fewer shipping price combinations, shipping prices were entered through delivery options in Magento’s Admin backend by the ecommerce team (system.xml) . When the customer selected a shipping option, a lookup to a custom table provided a shipping price code based on the country code, and prices were then collected from Magento’s native ‘core_config_data’ table.