Skip to content

OrderFlow Magento Integration Guide

Realtime Despatch Software Ltd

Document Version: 4.0.6

Document Built: 2020-10-12

This document and its content is copyright of Realtime Despatch Software Limited. All rights reserved.
You may not, except with our express written permission, distribute, publish or commercially exploit the content.
Any reproduction of part or all of the contents in any form is prohibited.

Shipment Import

Shipment Import

Once the job of fulfilling an order has been completed, then OrderFlow needs to inform Magento that this has happened. This serves two purposes.

  • to allow the order to be closed off, so that it no longer appears as requiring fulfilment.
  • to pass back additional information that may be used for notifying customers of despatch, such as courier details and tracking references.

The shipment import on Magento is triggered at the point where the shipment is marked as picked and packed. Of course, the process of allocating stock, picking and packing will need to take place, but these operations are outside of the scope of this document.

There are a number of ways of marking a shipment as despatched on OrderFlow.

  • from the shipment detail screen, using the Despatch button. This allows a single shipment to be marked as despatched.
  • from the shipment search screen. This is only possible if configured correctly, and if the search has been limited to 'Packed' shipments. This option allows multiple shipments to be despatched manually.
  • manually, using the Despatch -> Bulk Operations -> Despatch menu. This allows all packed shipments to be despatched by courier via single operation.
  • automatically via a scheduled job, either at specific time intervals or after a configurable delay.

In the example below, we will navigate to a shipment that has been packed, and despatch it using the Despatch button below:

Orderflow shipment despatch

Once invoked, the outcome is similar to that of the Inventory Import, in that a new message is queued for sending, and will appear listed in the Integration -> Remote Messages -> Search menu.

The specific records will be easily found by applying the additional filters for Category ('API Integration') and Purpose ('Shipment despatched'). Once sent, the shipment will appear on the listing as shown below:

Orderflow shipment message

The body of the shipment despatch message contains details of the shipment despatch, the courier used, and the tracking number, if apppropriate.

It also contains a listing of the individual product and quantity combinations that have been included in the shipment.

This allows the extension to support partial fulfilments. If only a part of the initial order has been fulfilled, a shipment will be created for the order in Magento but the order will be kept open for further fulfilment updates.

   <?xml version="1.0" encoding="UTF-8"?>
   <SOAP-ENV:Envelope 
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
         <ns1:orderflowShipmentCreate>
            <sessionId xsi:type="xsd:string">[session_authentication_token]
            </sessionId>
            <orderIncrementId xsi:type="xsd:string">100000087
            </orderIncrementId>
            <skuQty SOAP-ENC:arrayType="ns1:skuQty[1]" xsi:type="ns1:skuQtyArray">
               <item xsi:type="ns1:skuQty">
                  <key xsi:type="xsd:string">aws006</key>
                  <value xsi:type="xsd:int">4</value>
               </item>
               <item xsi:type="ns1:skuQty">
                  <key xsi:type="xsd:string">hde001</key>
                  <value xsi:type="xsd:int">6</value>
               </item>
               <item xsi:type="ns1:skuQty">
                  <key xsi:type="xsd:string">hdd000</key>
                  <value xsi:type="xsd:int">5</value>
               </item>
            </skuQty>
            <comment xsi:type="xsd:string">Shipment Created</comment>
            <email xsi:type="xsd:int">1</email>
            <includeComment xsi:type="xsd:int">1</includeComment>
            <courierName xsi:type="xsd:string">Generic</courierName>
            <serviceName xsi:type="xsd:string"></serviceName>
            <trackingNumber xsi:type="xsd:string"></trackingNumber>
            <dateShipped xsi:type="xsd:date">2015-09-15 11:12:39</dateShipped>
            <messageSeqId xsi:type="xsd:int">[message_id]</messageSeqId>
         </ns1:orderflowShipmentCreate>
      </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>

As soon as the notification request has been sent to Magento, it will be visible in the Magento Admin Panel under the OrderFlow -> Requests menu, as shown below.

Magento shipment request

Again, as with the inventory import, the Import ID field is not populated immediately, but is only set once the request has been processed. The timing of this will depend on the configuration settings for the Shipment Import, as described in the Magento Configuration section.

Once Import ID link is available, navigating to this will show the details of the import, which will confirm, as shown below that the shipment has been created.

Magento shipment import

From the previous screen it is possible to navigate to the both the Magento Admin Panel order and the shipment detail screen, which give more details on the current status of the order. If no more items need to be fulfilled, the expected behaviour at this point is for the order to be marked as complete.

Magento order complete