Skip to main content

GetOrderDetails

Contents

There are four web service calls that can be used to return order details from specified branches:

  • GetOrderDetailByDate returns a full day’s orders or just all of the orders that were planned to start between the times within the given fromDateField and toDateField provided in the call. This call is best used if the request is sent manually by a user as it will likely return much more data than GetOrderDetailByModifiedDate.

  • GetOrderDetailByModifiedDate returns order details for all orders that have been modified within a selected date range. This call is best used on a recurring basis (i.e. 5-minute intervals) to return orders that have been changed/modified within the given fromDateField and toDateField provided in the call. An order is defined as “modified” if a new entry in the order audit is updated with a new event. Results can be filtered using OrderDetailReturnOptionsFilters.

  • GetOrderDetailsByEventsAndOrderIDs fetches orders based on changes detected in our audits for a specific order(ID’s).

  • GetOrderDetailsByModifiedDateAndBranchIds lets you synchronize by using time ranges and narrowing down to specific branches if needed.

Schema (GetOrderDetailByDate)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:app="http://schemas.datacontract.org/2004/07/Appian.DRTrack.Entity.Schema.WebService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetOrderDetailByDate>
         <!--Optional:-->
         <tem:auth>
            <app:authenticationTokenField>Auth-Token-Example999</app:authenticationTokenField>
         </tem:auth>
         <!--Optional:-->
         <tem:requestEnvelope>
            <app:branchIDField>MAIN</app:branchIDField>
            <!--Optional:-->
            <app:externalIdField/>
            <app:fromDateField>2006-08-19T12:27:14</app:fromDateField>
            <app:orderDetailReturnOptionsField>
               <app:filtersField>
                  <app:accountIDListField/>
                  <app:formListField/>
                  <app:orderIDListField/>
                  <app:orderTypeField>AllOrder</app:orderTypeField>
                  <app:quantityFieldListField/>

                  <app:userFieldListField/>
               </app:filtersField>
               <app:populateAccountDetailsField>true</app:populateAccountDetailsField>
               <!--Optional:-->
               <app:populateActualsDataField>false</app:populateActualsDataField>
               <app:populateLineItemField>true</app:populateLineItemField>
               <app:populateLineItemFormsField>true</app:populateLineItemFormsField>
               <app:populateOrderFormsField>true</app:populateOrderFormsField>
               <app:populatePlannedDataField>true</app:populatePlannedDataField>
               <app:populateQuantityFieldField>false</app:populateQuantityFieldField>
               <!--Optional:-->
               <app:populateShipToDetailsField>false</app:populateShipToDetailsField>
               <!--Optional:-->
               <app:populateStopNotesField>true</app:populateStopNotesField>
               <app:populateUserFieldField>false</app:populateUserFieldField>
            </app:orderDetailReturnOptionsField>
            <app:orderEventTypeField>
               <!--Zero or more repetitions:-->
               <app:OrderEventType>All</app:OrderEventType>
            </app:orderEventTypeField>
            <!--Optional:-->
            <app:pageField>3</app:pageField>
            <app:toDateField>2006-09-14T03:07:34</app:toDateField>
         </tem:requestEnvelope>
      </tem:GetOrderDetailByDate>
   </soapenv:Body>
</soapenv:Envelope>

Schema (GetOrderDetailByModifiedDate)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:app="http://schemas.datacontract.org/2004/07/Appian.DRTrack.Entity.Schema.WebService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetOrderDetailByModifiedDate>
         <!--Optional:-->
         <tem:auth>
            <app:authenticationTokenField>Auth-Token-Example</app:authenticationTokenField>
         </tem:auth>
         <!--Optional:-->
         <tem:requestEnvelope>
            <app:branchIDField>MAIN</app:branchIDField>
            <!--Optional:-->
            <app:externalIdField/>
            <app:fromDateField>2006-08-19T12:27:14-05:00</app:fromDateField>
            <app:orderDetailReturnOptionsField>
               <app:filtersField>
                  <app:accountIDListField/>
                  <app:formListField/>
                  <app:orderIDListField/>
                  <app:orderTypeField>AllOrder</app:orderTypeField>
                  <app:quantityFieldListField/>
                  <app:userFieldListField/>

               </app:filtersField>
               <app:populateAccountDetailsField>true</app:populateAccountDetailsField>
               <!--Optional:-->
               <app:populateActualsDataField>false</app:populateActualsDataField>
               <app:populateLineItemField>true</app:populateLineItemField>
               <app:populateLineItemFormsField>true</app:populateLineItemFormsField>
               <app:populateOrderFormsField>true</app:populateOrderFormsField>
               <app:populatePlannedDataField>true</app:populatePlannedDataField>
               <app:populateQuantityFieldField>false</app:populateQuantityFieldField>
               <!--Optional:-->
               <app:populateShipToDetailsField>false</app:populateShipToDetailsField>
               <!--Optional:-->
               <app:populateStopNotesField>true</app:populateStopNotesField>
               <app:populateUserFieldField>false</app:populateUserFieldField>
            </app:orderDetailReturnOptionsField>
            <app:orderEventTypeField>
               <!--Zero or more repetitions:-->
               <app:OrderEventType>Finalized</app:OrderEventType>
            </app:orderEventTypeField>
            <!--Optional:-->
            <app:pageField>0</app:pageField>
            <app:toDateField>2006-09-14T03:07:34</app:toDateField>
         </tem:requestEnvelope>
      </tem:GetOrderDetailByModifiedDate>
   </soapenv:Body>
</soapenv:Envelope>

Schema (GetOrderDetailsByEventsAndOrderIDs)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:app="http://schemas.datacontract.org/2004/07/Appian.DRTrack.Entity.Schema.WebService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <soapenv:Header/>
  <soapenv:Body>
    <tem:GetOrderDetailsAndEventsByOrderIDs>
      <!-- Optional: -->
      <tem:auth>
        <app:authenticationTokenField>stag-appi-20240530135035-SWZS3X</app:authenticationTokenField>
      </tem:auth>
      <!-- Optional: -->
      <tem:requestEnvelope>
        <app:branchIDField>MAIN</app:branchIDField>
        <app:orderIdListField>
          <!-- Zero or more repetitions: -->
          <arr:string>661</arr:string>
          <arr:string>443</arr:string>
        </app:orderIdListField>
      </tem:requestEnvelope>
    </tem:GetOrderDetailsAndEventsByOrderIDs>
  </soapenv:Body>
</soapenv:Envelope>

Schema (GetOrderDetailsByModifiedDateAndBranchIds)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:app="http://schemas.datacontract.org/2004/07/Appian.DRTrack.Entity.Schema.WebService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <soapenv:Header/>
  <soapenv:Body>
    <tem:GetOrderDetailsByModifiedDateAndBranchIds>
      <!-- Optional: -->
      <tem:auth>
        <app:authenticationTokenField>stag-appi-20240530135035-SWZS3X</app:authenticationTokenField>
      </tem:auth>
      <!-- Optional: -->
      <tem:requestEnvelope>
        <app:branchIDsField>
          <!-- Zero or more repetitions: -->
          <arr:string>09722</arr:string>
        </app:branchIDsField>
        <!-- Optional: -->
        <app:externalIdField/>
        <app:fromDateField>2024-05-02</app:fromDateField>
        <app:orderDetailReturnOptionsField>
          <app:filtersField>
            <app:accountIDListField/>
            <app:formListField/>
            <app:orderIDListField>
              <!-- Zero or more repetitions: -->
              <arr:string>00110-R</arr:string>
              <arr:string>09801-R</arr:string>
            </app:orderIDListField>
            <app:orderTypeField>AllOrder</app:orderTypeField>
            <app:quantityFieldListField/>
            <app:userFieldListField/>
          </app:filtersField>
          <app:populateAccountDetailsField>true</app:populateAccountDetailsField>
          <!-- Optional: -->
          <app:populateActualsDataField>false</app:populateActualsDataField>
          <app:populateLineItemField>true</app:populateLineItemField>
          <app:populateLineItemFormsField>false</app:populateLineItemFormsField>
          <app:populateOrderFormsField>false</app:populateOrderFormsField>
          <app:populatePlannedDataField>true</app:populatePlannedDataField>
          <app:populateQuantityFieldField>true</app:populateQuantityFieldField>
          <!-- Optional: -->
          <app:populateShipToDetailsField>true</app:populateShipToDetailsField>
          <!-- Optional: -->
          <app:populateStopNotesField>false</app:populateStopNotesField>
          <app:populateUserFieldField>true</app:populateUserFieldField>
        </app:orderDetailReturnOptionsField>
        <app:orderEventTypeField/>
        <!-- Optional: -->
        <app:pageField>1</app:pageField>
        <app:toDateField>2024-05-03</app:toDateField>
      </tem:requestEnvelope>
    </tem:GetOrderDetailsByModifiedDateAndBranchIds>
  </soapenv:Body>
</soapenv:Envelope>

Request Parameters

Each call uses the same request. Any required parameter that is not a string must have a valid value. If the parameter is a string, the value can be “null.” All timestamps must be sent in UTC time.

Boolean parameter values should be lowercase true or false.

GetOrderDetailByModifiedDate, GetOrderDetailByDate

Name Description Type Required Sample Value
auth Authentication token for access to the web service. Authentication No See Authentication
requestEnvelope The request envelope elements described in the tables below. OrderDetailRequestEnvelope No See OrderDetailRequestEnvelope

Authentication

Name Description Type Required Sample Value
AuthenticationTokenField Retrieved from WS Call GetAuthenticationToken.
string
Yes dev1-appi-20160617175057-XXIB8E

OrderDetailRequestEnvelope

Name Description Type Required
branchIDField The Branch ID. Determines which branch in DRTrack is being queried.
string
Yes
fromDateField The “from” date for the date range
dateTime
Yes
toDateField The “to” date for the date range
dateTime
Yes
orderDetailReturnOptionsField The details you would like returned for the order OrderDetailReturnOptions Yes
orderEventTypeField See table ArrayofOrderEventType Yes
pageField Page number
int
Yes

OrderDetailReturnOptions

All of the populate fields determine whether that type of information will be returned, if available, for the orders returned by the web service call. The fields are used to limit or get back more information for each order.

Name Description Type Required
filtersField A selection of filters for the order details OrderDetailReturnOptionsFilters Yes
populateAccountDetailsField true or false
boolean
Yes
populateActualsDataField true or false
boolean
Yes
populateLineItemField true or false
boolean
Yes
populateLineItemFormsField true or false
boolean
Yes
populateOrderFormsField true or false
boolean
Yes
populatePlannedDataField true or false
boolean
Yes
populateQuantityFieldField true or false
boolean
Yes
populateShipToDetailsField true or false
boolean
Yes
populateUserFieldField true or false
boolean
Yes

OrderDetailReturnOptionsFilters

Name Description Type Required
accountIDListField Account ID. This is the unique customer ID in DRTrack. It filters for only orders for a specific customer. Array of
string
Yes
formListField Filters by orders that have a certain form filled out and returned. Array of
string
Yes
orderIDListField An array of specific order IDs to look for within the time frame given. Array of
string
Yes
orderTypeField The types of orders to return. OrderType Yes
quantityFieldListField A list of quantity fields that are populated so that only orders that have those quantities provided for the order are returned. Array of
string
Yes
userFieldListField A list of user fields used in the order to return orders that only have those fields populated. Array of
string
Yes

OrderType

Name Description
AllOrder All Orders
OrdersWithActuals Order Type
OrdersWithoutActuals Order Type

ArrayofOrderEventType

Name Description Type Required
OrderEventType OrderEventType Yes

OrderEventType

Name
All
Exported_To_OBC
Scheduled
Uploaded
Imported
Stop_Arrival
Stop_Departure
Unloaded
Moved
Delivered
Downloaded
Geocoded
Duplicated
Duplicate
Unlocked
Email_Sent
Rescheduled
Added_To_Route
Negative_Route_Creation
Init_And_Load
Optimized
Branch_Transfer
Finalized

Sample Code

GetOrderDetailByModifiedDate()
OrderDetailRequestEnvelope request = new OrderDetailRequestEnvelope
{
branchIDField = "Main",
fromDateField = DateTime.TryParse("01/01/2019", out fromDate)? fromDate : DateTime.Today,
toDateField = DateTime.TryParse("01/02/2019", out toDate)? toDate :
DateTime.Today.AddDays(1).AddSeconds(-1),
orderEventTypeField = new[] {OrderEventType.All},
orderDetailReturnOptionsField = new OrderDetailReturnOptions
{
filtersField = new OrderDetailReturnOptionsFilters
{
accountIDListField = null,
formListField = null,
orderIDListField = null,
orderTypeField = OrderType.AllOrder,
quantityFieldListField = null,
userFieldListField = null
},
populateActualsDataField = true,
populateLineItemField = true,
populateLineItemFormsField = true,
populateOrderFormsField = true,
populatePlannedDataField = true,
populateQuantityFieldField = true,
populateUserFieldField = true
}
GetOrderDetails(request, authentication);
OrderDetailResponseEnvelope response = wc.GetOrderDetailByModifiedDate(authentication, request);

Response Parameters

Name Description Type
orderDetailListField Elements as described in the tables below. ArrayOfOrderDetailType
paginationByDateRangeAndPageField Elements as described in the tables below. PaginationByDateRangeAndPage
responseStatusField Elements as described in the tables below. ResponseStatus

OrderDetailType

Name Description Type
accountIDField
string
lineItemListField
ArrayOfLineItemType
orderIDField
string
orderKeyIDField
int
x003C_stopNotesField_x003E_k__BackingField
string
actualField
OrderDetailActualType
eventDetailField
ArrayOfEventDetail
orderStatusField
OrderDetailTypeStatusType
planField
OrderDetailPlanType

PaginationByDateRangeAndPage 

Name Description Type
fromDateField The “from” date for the date range
dateTime
toDateField The “to” date for the date range
dateTime
pageField Page number
int
totalAvailablePagesField Total number of pages
int
Last updated May 30, 2024.
Contents