# OptimoRoute

> Create and look up orders, pull route plans and monitor dispatch and driver activity.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/optimo-route

## Actions

### Create order

Create order.

**Inputs**

- Order no (`order_no`, text, required): Order no.
- Date (`date`, date, required): Date.
- Type (`type`, text, required): Type. One of: `D`, `P`, `T`.
- Address (`address`, text, required): Address.
- Location name (`location_name`, text): Location name.
- Duration (`duration`, number): Duration.
- Notes (`notes`, text): Notes.
- Time windows (`time_windows`, list): Time windows.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "id": "example",
    "success": false
  }
}
```

### Delete order

Delete order.

**Inputs**

- Order no (`order_no`, text, required): Order no.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "success": false
  }
}
```

### Get dispatch status

Get dispatch status.

**Inputs**

- Date (`date`, date): Date.
- Include route changes (`include_route_changes`, true/false): Include route changes.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "date": "example",
    "live": false,
    "routes": {
      "state": "example"
    },
    "success": false
  }
}
```

### Get mobile events

Get mobile events.

**Inputs**

- After tag (`after_tag`, text): After tag.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "events": [],
    "remainingEvents": 1,
    "success": false,
    "tag": "example"
  }
}
```

### Get order scheduling information

Get order scheduling information.

**Inputs**

- Order no (`order_no`, text): Order no.
- Id (`id`, text): Id.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "orderScheduled": false,
    "scheduleInformation": {
      "driverExternalId": "example",
      "driverSerial": "example"
    },
    "success": false
  }
}
```

### Get planning status

Get planning status.

**Inputs**

- Planning ID (`planning_id`, number, required): Planning ID.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "success": false
  }
}
```

### Get routes for a date

Get routes for a date.

**Inputs**

- Date (`date`, date, required): Date.
- Driver external ID (`driver_external_id`, text): Driver external ID.
- Driver serial (`driver_serial`, text): Driver serial.
- Vehicle registration (`vehicle_registration`, text): Vehicle registration.
- Include route polyline (`include_route_polyline`, true/false): Include route polyline.
- Include route start end (`include_route_start_end`, true/false): Include route start end.
- Include dispatch status (`include_dispatch_status`, true/false): Include dispatch status.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "routes": [],
    "success": false
  }
}
```

### Merge fields into order

Merge fields into order.

**Inputs**

- Order no (`order_no`, text, required): Order no.
- Date (`date`, date, required): Date.
- Type (`type`, text, required): Type. One of: `D`, `P`, `T`.
- Address (`address`, text, required): Address.
- Location name (`location_name`, text): Location name.
- Duration (`duration`, number): Duration.
- Notes (`notes`, text): Notes.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "id": "example",
    "success": false
  }
}
```

### Search orders

Search orders.

**Inputs**

- Orders (`orders`, list): Orders.
- Start date (`start_date`, date): Start date.
- End date (`end_date`, date): End date.
- Order status (`order_status`, list): Order status. One or more of: `unscheduled`, `scheduled`, `on_route` (On route), `servicing`, `success`, `failed`, `rejected`, `cancelled`.
- Include order data (`include_order_data`, true/false): Include order data.
- Include schedule information (`include_schedule_information`, true/false): Include schedule information.
- After tag (`after_tag`, text): After tag.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "after_tag": "example",
    "orders": [],
    "success": false
  }
}
```

### Stop route planning

Stop route planning.

**Inputs**

- Planning ID (`planning_id`, number, required): Planning ID.

**Outputs**

- `data` (object): The response from OptimoRoute.

**Example output**

```json
{
  "data": {
    "success": false
  }
}
```
