Dispatch Route Tasks
DispatchRoutes/Generate@1
Generates daily draft dispatch routes from enabled dispatch route templates. This task is intended for scheduled workflows.
steps:
- task: "DispatchRoutes/Generate@1"
name: generateRoutes
inputs:
organizationId: "{{ inputs.organizationId }}"
dispatchRouteStatusId: "{{ inputs.dispatchRouteStatusId }}"
routeDate: "{{ inputs.routeDate }}"
dispatchRouteTemplateId: "{{ inputs.dispatchRouteTemplateId }}"
outputs:
- name: createdCount
mapping: "createdCount"
- name: skippedCount
mapping: "skippedCount"
- name: createdRouteIds
mapping: "createdRouteIds"
| Input | Required | Description |
|---|---|---|
organizationId | Yes | Organization ID |
dispatchRouteStatusId | Yes | Status assigned to newly generated routes |
routeDate | No | Route date in yyyy-MM-dd; defaults to today UTC when omitted |
dispatchRouteTemplateId | No | Generate from one template; omit for all matching templates |
| Output | Description |
|---|---|
createdCount | Number of routes created |
skippedCount | Number of matching templates skipped because a route already exists |
createdRouteIds | IDs of newly created routes |
Generation copies template name, route type, division, and stops. Generated routes start as drafts and are idempotent for the same template/date.