Plan Task

Request
Description Plans a task by assigning it to a specific resource, date and time.
Context https://<instance>.optimizemyday.com/omdservices-basic/rest/v1/services/task
URL /plan
Method GET
Response Code 200 when successful, another HTTP status code otherwise
Success Response The details of the trip into which the task is inserted.
Response Type XML or JSON
Parameter Datatype Description
configId Integer The identifier of the configuration.
taskId String The external identifier of the task.
resourceId String The external identifier of the resource.
date Date/Time The date and time of the position in the plan.
fixed Boolean Indicates if the planning is fixed (in time). Defaults to false if omitted.
cost Boolean Indicates if the response should contain the costs before and after the plan. Defaults to false if omitted.
abort Boolean Indicates if the planning must be aborted if a hard constraint failure occurs. Defaults to true if omitted.
persist String Indicates if the changes must be persisted to the database. Defaults to true if omitted.
_output String The requested output format being xml or json. If omitted, xml is assumed.

The trip to which the task is added will be normalized automatically.

If the task was planned before, it is removed from the former trip. In this case, both source and destination trips are normalized.

Sample Call

https://sandbox.optimizemyday.com/omdservices-basic/rest/v1/services/task/plan?configId=16167225&taskId=0000161996-1-1-2017-05-11&date=2017-10-10%2017:00:01&resourceId=10000024&abort=true&fixed=false&persist=true

Sample Result

<Result success="true">  <Trip resource="10000024" day="2017-10-10">
    <Stop stopType="4" starttime="2017-10-10 08:00:00" duration="0.0" travelDistance="286968" travelTime="179.304" busyTime="179.304" pauseTimeTravel="0.0" pauseTimeOnSite="0.0" travelUnknown="false" overlap="0.0" clone="false">
      <Address street="Grenzstr. 3" postalCode="08468" city="Reichenbach" country="DE" geocode="0_0_12290659_50615700 1"/>
    </Stop>
    <Stop task="0000161996-CL1-1-2015-01-01" stopType="2" starttime="2017-10-10 10:59:18" duration="30.0" travelDistance="286968" travelTime="179.304" busyTime="209.304" waitingTime="0.0" pauseTimeTravel="0.0" pauseTimeOnSite="0.0" travelUnknown="false" overlap="0.0" clone="false">
      <Address street="An der Unteren Söse 36" postalCode="37520" city="Osterode" country="DE" geocode="0_0_10226511_51749920 1"/>
      <Task id="22163240" lastUpdate="2017-10-09 01:00:49" configuration="16167225" account="0000161996" externalId="0000161996-CL1-1-2015-01-01" name="Malla Dechbeastaff GmbH" taskType="VISIT" territory="104" street="An der Unteren Söse 36" postalCode="37520" city="Osterode" country="DE" phone="+49552299100" geocode="0_0_10226511_51749920 1" earliest="2016-12-01 00:00:00" latest="2016-12-09 00:00:00" scheduledFor="10000024" scheduled="2017-10-10 10:59:18" status="IP" estimatedDuration="30.0" contractType="VISIT" taskGroupId="0000161996-CL1-2014-12-09-2" groupOffset="0" groupOffsetMargin="0" requiresParts="false" partsDelivered="false" planAutomatically="false" weight="10.0" volume="20.0" positionInTrip="1" acceptBeyondLatest="false" floating="false" standby="false" accountNumber="0000161996"/>
    </Stop>
    <Stop stopType="5" starttime="2017-10-10 17:00:00" duration="0.0" travelDistance="0" travelTime="0.0" busyTime="0.0" pauseTimeTravel="0.0" pauseTimeOnSite="0.0" travelUnknown="false" overlap="0.0" clone="false">
      <Address street="Grenzstr. 3" postalCode="08468" city="Reichenbach" country="DE" geocode="0_0_12290659_50615700 1"/>
    </Stop>
    <ResourceWorkPattern id="16176428" lastUpdate="2016-10-20 19:11:21" resource="10000024" workPattern="Standard" validFrom="2015-08-04 00:00:00" validTo="2040-08-04 00:00:00">
    <WorkPattern id="16169128" lastUpdate="2015-12-07 11:42:23" configuration="16167225" externalId="Standard" standby="false" zeroDistanceForDeparture="false" zeroDistanceForArrival="false"/>
    </ResourceWorkPattern>
    <Cost costValue="364241829">
    <CostComponent name="Waiting time" base="0.0" value="0"/>
    <CostComponent name="Busy time" base="388.608" value="0"/>
    <CostComponent name="Idle time" base="151.392" value="0"/>
    <CostComponent name="Travel time" base="358.608" value="537912"/>
    <CostComponent name="Travel distance" base="573936.0" value="0"/>
    <CostComponent name="Duration" base="30.0" value="0"/>
    <CostComponent name="Too late" base="3637.0" value="363700000"/>
    <CostComponent name="Best age" base="0.0" value="3917"/>
</Cost>
  </Trip>
</Result>

results matching ""

    No results matching ""