The Import Orders web service call imports all of the orders listed in the call into DRTrack. You can enter as many orders in one call as you would like.
When the orders pass SOAP validation, they are placed in an Order Import Queue until a recurring scheduled task processes the orders (typically set to run every 5 minutes). The Order Import Queue enables frequent calls without tying up resources and eliminates processing duplicated or previously sent orders.
If the account listed in the order already exists, the account will be updated with any new information (in accordance with selected DRTrack settings). If the account listed in the order does not already exist, it will be added in DRTrack.
Schema
<soapenv:Envelopexmlns: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:ImportOrders><!--Optional:--><tem:auth><!--type: string--><app:authenticationTokenField></app:authenticationTokenField></tem:auth><!--Optional:--><tem:requestEnvelope><app:dRStopEnvelopeField><!--Zero or more repetitions:--><app:DRStop><!--type: short--><app:aMAdjField>0</app:aMAdjField><!--type: dateTime--><app:aMEndField>0001-01-01T00:00:00</app:aMEndField><!--type: dateTime--><app:aMStartField>0001-01-01T00:00:00</app:aMStartField><!--type: string--><app:address2Field/><!--type: string--><app:addressField>6994 NE 23rd St</app:addressField><!--type: string--><app:branchField>BAKERY TEST OKC</app:branchField><!--type: string--><app:cityField>Oklahoma City</app:cityField><!--type: boolean--><app:closeTWField>false</app:closeTWField><!--type: string--><app:colorField/><app:contactField>John Doe</app:contactField><app:dRAccountScheduleField><!--type: dateTime--><app:activationDateField>0001-01-01T00:00:00</app:activationDateField><!--type: float--><app:frequencyField>0</app:frequencyField><!--type: int--><app:maxDaysBtwnDeliveriesField>0</app:maxDaysBtwnDeliveriesField><!--type: int--><app:minDaysBtwnDeliveriesField>0</app:minDaysBtwnDeliveriesField><app:profilesField/><!--type: int--><app:servicesPerDayField>0</app:servicesPerDayField><!--type: dateTime--><app:terminationDateField>0001-01-01T00:00:00</app:terminationDateField></app:dRAccountScheduleField><app:dRMasterStopEnvelopeField/><app:dRTimeWindowField><!--Zero or more repetitions:--><app:DRTimeWindow><!--type: dateTime--><app:closeField>0001-01-01T17:00:00</app:closeField><!--type: dateTime--><app:openField>0001-01-01T08:00:00</app:openField><!--type: string--><app:patternField>MTWRF</app:patternField></app:DRTimeWindow></app:dRTimeWindowField><app:dRUserFieldField><app:DRUserField><app:nameField>Order Instructions</app:nameField><app:valueField>Deliver to side door.</app:valueField></app:DRUserField></app:dRUserFieldField><app:dRVolumeField><!--Zero or more repetitions:--><app:DRVolume><!--type: string--><app:nameField>Trays</app:nameField><!--type: boolean--><app:noField>0</app:noField><app:noFieldSpecified>false</app:noFieldSpecified><!--type: decimal--><app:unloadRateField>0</app:unloadRateField><!--type: decimal--><app:valueField>48</app:valueField></app:DRVolume></app:dRVolumeField><!--type: int--><app:earlyBufferField/><app:eqCodeField>@COLD</app:eqCodeField><app:fixedTimeField>15</app:fixedTimeField><app:geoFenceField>0</app:geoFenceField><!--type: string--><app:geoResultField>Level1</app:geoResultField><app:iD1Field>2240400</app:iD1Field><!--type: ImportAccountType - enumeration: [MODIFY,ADD]--><app:importAccountTypeField>MODIFY</app:importAccountTypeField><!--type: decimal--><app:lateBufferField/><app:latitudeField>35.481918</app:latitudeField><!--type: decimal--><app:longitudeField>-97.508469</app:longitudeField><!--type: int--><app:maxSplitsField>0</app:maxSplitsField><app:nameField>AccountName</app:nameField><!--type: OnFinalize - enumeration: [DEFAULT,DELETE,LEAVE]--><app:onFinalizeField>DEFAULT</app:onFinalizeField><!--type: short--><app:pMAdjField>0</app:pMAdjField><!--type: dateTime--><app:pMEndField>0001-01-01T00:00:00</app:pMEndField><!--type: dateTime--><app:pMStartField>0001-01-01T00:00:00</app:pMStartField><!--type: decimal--><app:penaltyCostField>0</app:penaltyCostField><app:phoneField/><!--type: int--><app:rotationField>0</app:rotationField><app:sizeField>0</app:sizeField><!--type: decimal--><app:sizeRestrictionField>0</app:sizeRestrictionField><!--type: string--><app:stateField>OK</app:stateField><app:symbolField/><!--type: string--><app:zipField>73141-1016</app:zipField><!--type: int--><app:zoneField>0</app:zoneField><app:cumulativeDrvTmField/><app:cumulativeWrkTmField/><!--type: int--><app:legField>0</app:legField><!--type: int--><app:rtField>0</app:rtField><!--type: boolean--><app:selectedField>false</app:selectedField><!--type: int--><app:seqField>0</app:seqField><!--type: dateTime--><app:earliestDateField>0001-01-01T00:00:00</app:earliestDateField><!--type: string--><app:iD2Field>2091</app:iD2Field><!--type: dateTime--><app:latestDateField>0001-01-01T00:00:00</app:latestDateField><!--type: int--><app:priorityBumpField>0</app:priorityBumpField><!--type: int--><app:priorityField>0</app:priorityField><app:reservationIDField/><app:typeField/><!--type: string--><app:iD3Field/><!--type: dateTime--><app:estimatedDeliveryDateField>2017-08-11T00:00:00</app:estimatedDeliveryDateField><!--type: ImportOrderType - enumeration: [Add,Modify,Delete,DeleteAll]--><app:importOrderTypeField>Modify</app:importOrderTypeField><!--type: int--><app:keyField>1</app:keyField><!--type: boolean--><app:keyFieldSpecified>false</app:keyFieldSpecified></app:DRStop></app:dRStopEnvelopeField></tem:requestEnvelope></tem:ImportOrders></soapenv:Body></soapenv:Envelope>
Request Parameters
Any parameter that is required and not a string, must have a valid value. If it is a string, the value can be null. Also, all timestamps must be sent in UTC time.
(Note: Boolean parameter values should be lowercase true or false.)
ImportOrders
Name
Description
Type
Required
Sample Value
auth
Optional, but the import will not work without it.
The account will be added. If the account already exists, but another field is specified during the next transaction that doesn’t exists, the new field will be added.
OnFinalize
Name
Description
Default
The default behavior set in the DRTrack configuration.
Delete
The order will be deleted when finalized.
Leave
The order will stay on the route when finalized.
ImportOrderType
Name
Description
Add
The order will be added. If the order already exists, but a new field is specified during the next transaction that doesn’t exists, the new field will be added.
Modify
The order will be modified to what was sent in the transaction.
Delete
The order will be deleted. If a line item is specified, only the line item will be deleted.
DeleteAll
The order will be deleted and any line items attached to the order.