Skip to main content

GetOrderDetails

Contents

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

  • 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.

  • 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.

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>

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

NameDescriptionTypeRequiredSample Value
authAuthentication token for access to the web service.
Authentication
NoSee Authentication
requestEnvelopeThe request envelope elements described in the tables below.
OrderDetailRequestEnvelope
NoSee OrderDetailRequestEnvelope

Authentication

NameDescriptionTypeRequiredSample Value
AuthenticationTokenFieldRetrieved from WS Call GetAuthenticationToken.
string
Yesdev1-appi-20160617175057-XXIB8E

OrderDetailRequestEnvelope

NameDescriptionTypeRequired
branchIDFieldThe Branch ID. Determines which branch in DRTrack is being queried.
string
Yes
fromDateFieldThe “from” date for the date range
dateTime
Yes
toDateFieldThe “to” date for the date range
dateTime
Yes
orderDetailReturnOptionsFieldThe details you would like returned for the orderOrderDetailReturnOptionsYes
orderEventTypeFieldSee tableArrayofOrderEventTypeYes
pageFieldPage 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.

NameDescriptionTypeRequired
filtersFieldA selection of filters for the order detailsOrderDetailReturnOptionsFiltersYes
populateAccountDetailsFieldtrue or false
boolean
Yes
populateActualsDataFieldtrue or false
boolean
Yes
populateLineItemFieldtrue or false
boolean
Yes
populateLineItemFormsFieldtrue or false
boolean
Yes
populateOrderFormsFieldtrue or false
boolean
Yes
populatePlannedDataFieldtrue or false
boolean
Yes
populateQuantityFieldFieldtrue or false
boolean
Yes
populateShipToDetailsFieldtrue or false
boolean
Yes
populateUserFieldFieldtrue or false
boolean
Yes

OrderDetailReturnOptionsFilters

NameDescriptionTypeRequired
accountIDListFieldAccount ID. This is the unique customer ID in DRTrack. It filters for only orders for a specific customer.Array of
string
Yes
formListFieldFilters by orders that have a certain form filled out and returned.Array of
string
Yes
orderIDListFieldAn array of specific order IDs to look for within the time frame given.Array of
string
Yes
orderTypeFieldThe types of orders to return.OrderTypeYes
quantityFieldListFieldA 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
userFieldListFieldA list of user fields used in the order to return orders that only have those fields populated.Array of
string
Yes

OrderType

NameDescription
AllOrderAll Orders
OrdersWithActualsOrder Type
OrdersWithoutActualsOrder Type

ArrayofOrderEventType

NameDescriptionTypeRequired
OrderEventTypeOrderEventTypeYes

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

NameDescriptionType
orderDetailListFieldElements as described in the tables below.ArrayOfOrderDetailType
paginationByDateRangeAndPageFieldElements as described in the tables below.PaginationByDateRangeAndPage
responseStatusFieldElements as described in the tables below.ResponseStatus

OrderDetailType

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

PaginationByDateRangeAndPage 

NameDescriptionType
fromDateFieldThe “from” date for the date range
dateTime
toDateFieldThe “to” date for the date range
dateTime
pageFieldPage number
int
totalAvailablePagesFieldTotal number of pages
int
Last updated July 28, 2023.
Contents