Skip to main content

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"
InputRequiredDescription
organizationIdYesOrganization ID
dispatchRouteStatusIdYesStatus assigned to newly generated routes
routeDateNoRoute date in yyyy-MM-dd; defaults to today UTC when omitted
dispatchRouteTemplateIdNoGenerate from one template; omit for all matching templates
OutputDescription
createdCountNumber of routes created
skippedCountNumber of matching templates skipped because a route already exists
createdRouteIdsIDs 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.