Orders - OrderDetails Intro

Orders and OrderDetails are the only tables which are restricted to an import mode of Insert only. The reason for this is that an update command and delete can be very dangerous and require much more work which the API can not at this time handle.

An insert into TrackingNumbers does give the ability to update the order status of the order for which the tracking number was inserted for and also send the Order Has Shipped email.

Custom Fields

If Custom Fields are changed for orders you must do the following to have access to those fields.

The store owner must FTP into their store and go to the /vspfiles/schema/ directory and delete a file called Orders.xsd. Once this file is deleted the next time the API is called it will generate that file with the new Custom Fields. If this step is not done the API will have no access to those columns. This also applies to Customers.

Note that if you try to run the API after deleting a custom field but before deleting the previous Orders.xsd file, you will receive the following exception in the XML returned:

<ReturnResult>
<Success>False</Success>
 <Message>System.Data.SqlClient.SqlException: Invalid column name '"Name of missing field"'</Message>
</ReturnResult>

This message will also include a full stack trace as well as the SQL Select statement that was attempted.

Orders - OrderDetails 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="Orders">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" msprop:SqlDbType="Int" msprop:IsIdentity="true" name="OrderID" msprop:SQLTableAlias="o" msprop:TableNameXsd="Orders" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AccountNumber" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AccountType" msprop:SQLTableAlias="o" msprop:maxLength="10" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AddressValidated" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Affiliate_Commissionable_Value" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AuthHash" msprop:SQLTableAlias="o" msprop:maxLength="40" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AVS" msprop:SQLTableAlias="o" msprop:maxLength="25" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BankName" msprop:SQLTableAlias="o" msprop:maxLength="128" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="BatchNumber" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingAddress1" msprop:SQLTableAlias="o" msprop:maxLength="75" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingAddress2" msprop:SQLTableAlias="o" msprop:maxLength="75" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingCity" msprop:SQLTableAlias="o" msprop:maxLength="45" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingCompanyName" msprop:SQLTableAlias="o" msprop:maxLength="100" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingCountry" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingFaxNumber" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingFirstName" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingLastName" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingPhoneNumber" msprop:SQLTableAlias="o" msprop:maxLength="35" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingPostalCode" msprop:SQLTableAlias="o" msprop:maxLength="15" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="BillingState" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CardHoldersName" msprop:SQLTableAlias="o" msprop:maxLength="128" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="CashTender" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CC_Last4" msprop:SQLTableAlias="o" msprop:maxLength="4" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CheckNumber" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="CreditCardAuthorizationDate" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CreditCardAuthorizationNumber" msprop:SQLTableAlias="o" msprop:maxLength="60" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CreditCardExpDate" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CreditCardIssueDate" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CreditCardIssueNumber" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CreditCardTransactionID" msprop:SQLTableAlias="o" msprop:maxLength="60" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Custom_Field_Custom1" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Custom_Field_Custom2" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Custom_Field_Custom3" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Custom_Field_Custom4" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Custom_Field_Custom5" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Customer_IPAddress" msprop:SQLTableAlias="o" msprop:maxLength="15" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="CustomerID" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CVV2_Response" msprop:SQLTableAlias="o" msprop:maxLength="25" />
<xs:element minOccurs="0" msprop:SqlDbType="UniqueIdentifier" name="DV_CreditCardNumber" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="GiftCardIDUsed" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="GiftWrapNote" msprop:SQLTableAlias="o" msprop:maxLength="255" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="IsAGift" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Bit" name="IsGTSOrder" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="LastModBy" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="LastModified" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Locked" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="MICR" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="Text" name="Order_Comments" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Order_Entry_System" msprop:SQLTableAlias="o" msprop:maxLength="15" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="OrderDate" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="OrderID_Third_Party" msprop:SQLTableAlias="o" msprop:maxLength="40" />
<xs:element minOccurs="0" msprop:SqlDbType="Text" name="OrderNotes" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="OrderStatus" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="PaymentAmount" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="PaymentDeclined" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="PaymentMethodID" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="PCIaaS_CardId" msprop:SQLTableAlias="o" msprop:maxLength="32" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="PCIaaS_MaskedCardRef" msprop:SQLTableAlias="o" msprop:maxLength="22" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="PONum" msprop:SQLTableAlias="o" msprop:maxLength="20" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Printed" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Processed_AutoEvents" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="RoutingNumber" msprop:SQLTableAlias="o" msprop:maxLength="64" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="SalesRep_CustomerID" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="SalesTax1" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="SalesTax2" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="SalesTax3" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="SalesTaxRate" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="SalesTaxRate1" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="SalesTaxRate2" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="SalesTaxRate3" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipAddress1" msprop:SQLTableAlias="o" msprop:maxLength="75" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipAddress2" msprop:SQLTableAlias="o" msprop:maxLength="75" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipCity" msprop:SQLTableAlias="o" msprop:maxLength="45" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipCompanyName" msprop:SQLTableAlias="o" msprop:maxLength="100" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipCountry" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="ShipDate" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipFaxNumber" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipFirstName" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipLastName" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Shipped" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipPhoneNumber" msprop:SQLTableAlias="o" msprop:maxLength="35" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Shipping_Locked" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="ShippingMethodID" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipPostalCode" msprop:SQLTableAlias="o" msprop:maxLength="15" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipResidential" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ShipState" msprop:SQLTableAlias="o" msprop:maxLength="30" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallInt" name="Stock_Priority" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax1_IgnoreNoTaxRules" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax1_Title" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax2_IgnoreNoTaxRules" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="TinyInt" name="Tax2_IncludePrevious" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax2_Title" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax3_IgnoreNoTaxRules" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="TinyInt" name="Tax3_IncludePrevious" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Tax3_Title" msprop:SQLTableAlias="o" msprop:maxLength="50" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="TaxRate_IsVat" msprop:SQLTableAlias="o" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Total_Payment_Authorized" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Total_Payment_Received" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="TotalShippingCost" msprop:SQLTableAlias="o" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="VendorID" msprop:SQLTableAlias="o" />
<xs:element name="OrderDetails" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="Orders_OrderDetails" msdata:parent="Orders" msdata:child="OrderDetails" msdata:parentkey="OrderID"
 msdata:childkey="OrderID" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="OrderDetailID" msprop:TableNameXsd="OrderDetails" msprop:SQLFrom="FROM vMerchant.OrderDetails od INNER JOIN
 vMerchant.Orders o ON od.OrderID = o.OrderID" msprop:SqlDbType="Int" minOccurs="0" msprop:LogTableColumnName="od.OrderID"
 msprop:SQLTableAlias="od" msprop:IsIdentity="true" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Additional_Handling_Indicator" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Affiliate_Commissionable_Value" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="AutoDropShip" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="CategoryID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CouponCode" msprop:SQLTableAlias="od" msprop:maxLength="25" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="CustomLineItem" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="DiscountAutoID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="TinyInt" name="DiscountType" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="DiscountValue" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="DownloadFile" msprop:SQLTableAlias="od" msprop:maxLength="100" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Fixed_ShippingCost" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Fixed_ShippingCost_Outside_LocalRegion" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="FreeShippingItem" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="GiftTrakNumber" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="GiftWrap" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="GiftWrapCost" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="GiftWrapNote" msprop:SQLTableAlias="od" msprop:maxLength="255" />
<xs:element minOccurs="0" msprop:SqlDbType="Decimal" name="Height" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="IsKitID" msprop:SQLTableAlias="od" msprop:maxLength="15" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="KitID" msprop:SQLTableAlias="od" msprop:maxLength="15" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="LastModBy" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="LastModified" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Decimal" name="Length" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Locked" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="OnOrder_Qty" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="OptionID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="OptionIDs" msprop:SQLTableAlias="od" msprop:maxLength="2048" />
<xs:element minOccurs="0" msprop:SqlDbType="Text" name="Options" msprop:SQLTableAlias="od" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="OrderID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Oversized" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Package_Type" msprop:SQLTableAlias="od" msprop:maxLength="20" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Product_Keys_Shipped" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="1" msprop:SqlDbType="VarChar" name="ProductCode" msprop:SQLTableAlias="od" msprop:maxLength="30" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="ProductID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ProductName" msprop:SQLTableAlias="od" msprop:maxLength="255" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="ProductNote" msprop:SQLTableAlias="od" msprop:maxLength="150" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="ProductPrice" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="ProductWeight" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="QtyOnBackOrder" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="QtyOnHold" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="QtyOnPackingSlip" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="QtyShipped" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="Quantity" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Returned" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="Returned_Date" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="Reward_Points_Given_For_Purchase" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="RMA_Number" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Int" name="RMAI_ID" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="SmallDateTime" name="ShipDate" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Shipped" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Ships_By_Itself" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="TaxableProduct" msprop:SQLTableAlias="od" msprop:maxLength="1" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="TotalPrice" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Float" name="VAT_Percentage" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="Money" name="Vendor_Price" msprop:SQLTableAlias="od" />
<xs:element minOccurs="0" msprop:SqlDbType="VarChar" name="Warehouses" msprop:SQLTableAlias="od" msprop:maxLength="255" />
<xs:element minOccurs="0" msprop:SqlDbType="Decimal" name="Width" msprop:SQLTableAlias="od" />
<xs:element name="OrderDetails_Options" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="OrderDetails_OrderDetails_Options" msdata:parent="OrderDetails" msdata:child="OrderDetails_Options"
 msdata:parentkey="OrderDetailID" msdata:childkey="OrderDetailID" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element msprop:LogTableColumnName="od.OrderID" minOccurs="1" msprop:SqlDbType="Int" name="OptionID" msprop:SQLTableAlias=
 "odo" msprop:TableNameXsd="OrderDetails_Options" msprop:SQLFrom=" FROM vMerchant.OrderDetails od INNER JOIN
 vMerchant.OrderDetails_Options odo ON od.OrderDetailID = odo.OrderDetailID INNER JOIN vMerchant.Orders o ON od.OrderID = o.OrderID" />
<xs:element minOccurs="1" msprop:SqlDbType="Int" name="OrderDetailID" msprop:SQLTableAlias="odo" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

----------------------------------------------------------------------------------------------------
<?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="OrderDetails">
<xs:complexType>
<xs:sequence>
<xs:element msprop:TableNameXsd="OrderDetails" name="OrderDetailID" msprop:LogTableColumnName="od.OrderID" msprop:SqlDbType="Int" msprop:IsIdentity=
 "true" minOccurs="0" msprop:SQLFrom="FROM vMerchant.OrderDetails od" />
<xs:element name="Affiliate_Commissionable_Value" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="AutoDropShip" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="CategoryID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="CouponCode" msprop:maxLength="10" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="CustomLineItem" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="DiscountAutoID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="DownloadFile" msprop:maxLength="100" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="Fixed_ShippingCost" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="Fixed_ShippingCost_Outside_LocalRegion" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="FreeShippingItem" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="GiftTrakNumber" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="GiftWrap" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="GiftWrapCost" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="GiftWrapNote" msprop:maxLength="255" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="IsKitID" msprop:maxLength="15" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="KitID" msprop:maxLength="15" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="LastModBy" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="LastModified" msprop:SqlDbType="SmallDateTime" minOccurs="0" />
<xs:element name="Locked" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="OnOrder_Qty" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="OptionID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="OptionIDs" msprop:maxLength="255" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="Options" msprop:SqlDbType="Text" minOccurs="0" />
<xs:element name="OrderDetailID_EDI" msprop:maxLength="20" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="OrderID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="Product_Keys_Shipped" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="ProductCode" msprop:maxLength="30" msprop:SqlDbType="VarChar" minOccurs="1" />
<xs:element name="ProductID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="ProductName" msprop:maxLength="2000" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="ProductNote" msprop:maxLength="150" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="ProductPrice" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="ProductWeight" msprop:SqlDbType="Float" minOccurs="0" />
<xs:element name="QtyOnBackOrder" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="QtyOnHold" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="QtyOnPackingSlip" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="QtyShipped" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="Quantity" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="Returned" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="Returned_Date" msprop:SqlDbType="SmallDateTime" minOccurs="0" />
<xs:element name="RMA_Number" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="RMAI_ID" msprop:SqlDbType="Int" minOccurs="0" />
<xs:element name="ShipDate" msprop:SqlDbType="SmallDateTime" minOccurs="0" />
<xs:element name="Shipped" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="TaxableProduct" msprop:maxLength="1" msprop:SqlDbType="VarChar" minOccurs="0" />
<xs:element name="TotalPrice" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="Vendor_Price" msprop:SqlDbType="Money" minOccurs="0" />
<xs:element name="Warehouses" msprop:maxLength="255" msprop:SqlDbType="VarChar" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Did this answer your question?