TrackingNumbers

From DevWiki

Jump to: navigation, search

TrackingNumbers Intro

Importing Tracking numbers gives the ability to import two extra columns that are not really in data but rather are commands to Volusion.

Sending the MarkOrderShipped column with a "true" value will change the order status of the OrderID referenced as Shipped.

Sending the SendShippedEmail column with a "true" value with send the stores order has shipped email to that customer.

The minimum columns required to import tracking numbers are the Tracking Number itself along with the OrderID for which to reference that Tracking Number to.

The TrackingNumber Column is a unique key and can not be duplicated. Multiple tracking numbers may be applied to a single OrderID.

TrackingNumbers does not support the Delete command. To remove a tracking number from an order simply run an update and include the tracking number and OrderID 0. This will remove the assignment of the tracking number from the order and effectively delete it.

TrackingNumbers XSD

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="xmldata" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
<xs:element name="xmldata" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
 <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="TrackingNumbers">
        <xs:complexType>
          <xs:sequence>
              <xs:element msprop:TableNameXsd="TrackingNumbers" name="Form" msprop:maxLength="100" msprop:SqlDbType="VarChar"
minOccurs="0" />
             <xs:element name="Gateway" msprop:maxLength="15" msprop:SqlDbType="VarChar" minOccurs="0" />
             <xs:element name="OrderID" msprop:SqlDbType="Int" minOccurs="0" />
             <xs:element name="Package" msprop:maxLength="35" msprop:SqlDbType="VarChar" minOccurs="0" />
             <xs:element name="ShipDate" msprop:SqlDbType="SmallDateTime" minOccurs="0" />
             <xs:element name="Shipment_Cost" msprop:SqlDbType="Money" minOccurs="0" />
             <xs:element name="ShippingMethodID" msprop:SqlDbType="Int" minOccurs="0" />
             <xs:element name="TrackingNumber" msprop:maxLength="30" msprop:SqlDbType="VarChar" minOccurs="1" />
             <xs:element name="MarkOrderShipped" msprop:maxLength="5" msprop:SqlDbType="VarChar" minOccurs="0" />
             <xs:element name="SendShippedEmail" msprop:maxLength="5" msprop:SqlDbType="VarChar" minOccurs="0" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:choice>
    </xs:complexType>
 </xs:element>
</xs:schema>

Sample Code

POST http://yourdomain.com/net/WebService.aspx?Login=you@yourdomain.com&EncryptedPassword=YOURPASS&Import=Insert-Update
Content-Length: 365
Content-Type: application/x-www-form-urlencoded
<?xml version="1.0" encoding="utf-8" ?>
<xmldata>
  <TrackingNumbers>
    <gateway>UPS</gateway>
    <MarkOrderShipped>true</MarkOrderShipped>
    <OrderID>XXXX</OrderID>
    <SendShippedEmail>false</SendShippedEmail>
    <Shipment_Cost>0</Shipment_Cost>
    <ShippingMethodID>141</ShippingMethodID>
    <TrackingNumber>XXXXXXXXXXXXX</TrackingNumber>
  </TrackingNumbers>
</xmldata>
Navigation