OS1 Services
Dispatch Service
Jobs and Objectives
11 min
introduction to jobs a job is the sequence of workflows to be executed to complete a single leg of an expected path of an order (point to point) an expected path is a path/route for the movement of the participants and/or containers to fulfill an order each segment of the route is referred to as a job (legs) examples for the order ‘pickup shipment from location a and deliver it to location b’, the expected path could have three legs/jobs for the order ‘go to location b and install the refrigerator, the expected path could have just one leg/job to create a job, call the create a new job endpoint request bodies are specified in json format the following examples show a request body for creating a job true false 173,159,157false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the attributes marked with ( ) are mandatory attributes { "jobworkflowid" "jobworkflow\ e768f61e 42bf 4aa6 8ff6 5030114d4307", "jobtypeid" "pickuptest 44d87031 f1f7 56b8 9a47 783dc874d2b6", "jobref" "jobref 02", "objectives" \[ { "objectiveref" "pickup", "contact" { "name" "worldlogistic", "phone" { "countrycode" "+91", "number" "9900889900", "ismobile" true, "areacode" "+91" } }, "location" { "address" { "buildingnumber" "746", "apartmentnumber" "1234", "addressline1" "housing board colony", "addressline2" "new housing board colony", "addressline3" "old street late", "city" "pune", "state" "maharashtra", "zipcode" "112356", "country" { "code" "ind", "name" "india" } }, "geolocation" { "lat" "86 74739", "long" "24 7283" } }, "input" { "items" \[ { "skuid" "id1" } ], "title" "title1" } } ] } attributes of a job a job has the following attributes true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type to create a custom job attribute, call the post attribute config for job endpoint request bodies are specified in json format the following examples show a request body for creating a custom job attribute here's your data converted into a markdown table true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type { "attributes" \[ { "name" "job attribute", "description" "description of job attribute", "tags" \[ "job" ], "datatype" "number", "indexed" false, "defaultvalue" { "no" 10 }, "validation" { "range" { "min" 1, "max" 50 }, "required" true } } ] } objectives an objective is one or more execution tasks to be performed as a workflow for a container or set of containers at a given location it is possible that an objective can consist of one or more service ids and service ids in turn can contain one or more containers for example, a warehouse pickup can have multiple service ids and associated containers to pick up to complete a shipment, the operator needs to execute a sequence of jobs (set of actions) associated with it a job has the following entities in it customer, location, and time slot the following describes two different jobs pick up shipment s1 from location a (between 9 am & 10 am) and deliver to location b pick up shipment s2 from location a (between 9 am & 10 am) and deliver to location c if we examine these two jobs, we can see that they contain common areas such as location a and the time slot for pick up based on these common areas, we can convert these jobs into objectives the objective can then be defined as a group of jobs to be performed at a particular location in this example 4 different jobs are converted into objectives job 1 pick up shipment s1 from location a (between 9 am & 10 am) and deliver to location b job 2 pick up shipment s2 from location a (between 9 am & 10 am) and deliver to location c job 3 pick up shipment s3 from location d and deliver to location c job 4 pick up shipment s4 from location a (between 3 pm & 4 pm) and deliver it to location e these jobs are now converted into objectives based on location & time slots true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type 📘 info the objectives are grouped together by the customer, location, and time slot for simplicity of explanation, the customer part has been excluded in the above examples the purpose of creating objectives is to enhance the working efficiency of operators and to eliminate areas of human errors you can pass multiple objectives within a workflow lifecycle of a job the platform provides a default of five states for an objective created this state denotes that an objective has been created assigned this state denotes that the objective has been assigned to a dispatch in progress the state denotes that the job is in progress the event store can give the exact sub state of this state completed this state denotes that the instruction list of the job was completed by the operator canceled this state denotes that the job has been canceled it simply states that the job the operator had to perform was added to a parent job