Logistech now has a process by which we can submit updates to your server when the status of an order changes, using a standard XML format described here. Contact your customer service representative to set the process up.

Overview

In order to receive status updates, you must have a CGI script which we will post to when the status of an order changes. Currently this will be done as an hourly batch job.

The process will post an XML document (content type text/xml) describing the status of each order to the CGI at the URL you give to your customer service rep. Your script will then do the necessary updates in your system, and return an XML document to our server indicating success or failure for each order. If an update is not successful, it will be attempted again in the next batch until it is acknowledged.

For your convenience, we have provided an example CGI script, written in Perl and using our LSIxml Perl module :

  example_status_update.pl

Status List Document

The XML document posted by Logistech will have the following format :
  <status_list>
 
   <order_status>
    <order_id> </order_id>
    <cust_ref_id> </cust_ref_id>
    <status> </status>
 
    <item>
     <item_no> </item_no>
     <product_id> </product_id>
     <item_status>OPEN|PRINTED|BACKORD|SHIPPED|TRASHED</item_status>
    </item>
    ...
 
    <shipment>
     <order_id> </order_id>
     <ship_date> </ship_date>
 
     <package>
      <carrier> </carrier>
      <tracking_id> </tracking_id>
      <charges> </charges>
      <item>
       <product_id> </product_id>
       <quantity> </quantity>
      </item>
     </package>
     ...
 
    </shipment>
    ...
 
   </order_status>
  </status_list>
The <order_id> element will be the Logistech order ID. The <cust_ref_id> element will be the same as that submitted with the order, and may be an order ID specific to your system. The <status> element will be the LSI order status, as described in the order schema documentation. Possible carrier codes are listed in the shipments schema documentation.

The document may contain information you don't need for your process, which you can safely ignore. Additionally, you may ignore whichever statuses you don't need.

The status updates will be sent as when :
  • order is placed on HOLD or BACKHOLD
  • order is returned to OPEN status from HOLD or BACKHOLD
  • order is TRASHED (cancelled)
  • order is SHIPPED
  • order goes to BACKORD (either partially shipped or all items on backorder)

Status Acknowledge Document

Logistech's process that posts to your CGI will expect an XML document acknowledging the updates in return. Each order should have a corresponding success or error element. If an order was not successfully updated, it will be resubmitted with the next post.

The document should have the following format :
  <status_acknowledge>
 
    <status_success>
     <order_id> </order_id>
    </status_success>
    ...
 
    <status_error>
     <order_id> </order_id>
     <message> </message>
    </status_error>
    ...
 
  </status_acknowledge>
The <order_id> element should be the Logistech order ID submitted with the post. If an error occurred, the <message> element is an optional descriptive error message that will be logged on Logistech's side.

Examples

The following is an example post :
  <?xml version="1.0"?>
  <status_list>
   <order_status>
    <order_id>04-03228700</order_id>
    <status>SHIPPED</status>
    <item>
     <item_no>1</item_no>
     <product_id>VIRTUAL1</product_id>
     <item_status>SHIPPED</item_status>
    </item>
    <shipment>
     <ship_date>10/06/2004</ship_date>
     <package>
      <carrier>FEXE</carrier>
      <tracking_id>123123</tracking_id>
      <charges>2.75</charges>
      <item>
       <product_id>PART1</product_id>
       <quantity>1</quantity>
      </item>
      <item>
       <product_id>PART2</product_id>
       <quantity>1</quantity>
      </item>
     </package>
     <package>
      <carrier>FEXE</carrier>
      <tracking_id>123123</tracking_id>
      <charges>3.75</charges>
      <item>
       <product_id>PART1</product_id>
       <quantity>1</quantity>
      </item>
      <item>
       <product_id>PART2</product_id>
       <quantity>1</quantity>
      </item>
     </package>
    </shipment>
   </order_status>
   <order_status>
    <order_id>04-10209285</order_id>
    <status>HOLD</status>
    <item>
     <item_no>1</item_no>
     <product_id>XYZ-9999</product_id>
     <item_status>BACKORD</item_status>
    </item>
    <item>
     <item_no>2</item_no>
     <product_id>XYZ-6789</product_id>
     <item_status>BACKORD</item_status>
    </item>
   </order_status>
  </status_list>
The CGI could then return the following document :
  <?xml version="1.0"?>
  <status_acknowledge>
   <status_success>
    <order_id>04-03228700</order_id>
   </status_success>
   <status_error>
    <order_id>04-10209285</order_id>
    <message>Couldn't update status to HOLD - database error</message>
   </status_error>
  </status_acknowledge>