Manage saved vehicles, depots and fleets
manage_catalogAdd or change a vehicle, a depot or a fleet saved in the account: master data that stays after this conversation. Call it only when the user asks to add, save, rename, move or edit one ('add a 1,500 kg Sprinter', 'make a fleet called norte with 6 vans'). Not for one plan: how many vehicles a run uses, a capacity or a depot for today only are plan settings: pass them to optimize_routes and save nothing. 'Use 25 vehicles' is a plan setting, never 25 new vehicles nor a fleet of 25. resource=vehicle takes name, max_weight_kg and max_volume_m3: one vehicle per call, it is a type with its capacity. resource=depot takes name, latitude and longitude: an address goes through geocode_addresses first; tell the user the matched address and never invent coordinates. resource=fleet takes name and vehicles: a vehicle_id from list_fleet and the units the fleet owns standing. It groups vehicles already saved: save the vehicle first and use the id it returns; on update, vehicles replaces the whole list. action=create needs the name (coordinates for a depot, vehicles for a fleet); a name the account already has returns that row (outcome=already_existed) when the values match and NAME_TAKEN when they differ: ask whether to update it or use another name. action=update needs resource_id (a vehicle_id, depot_id or fleet_id from list_fleet) and the fields to change; what is omitted stays as it is. Say what will be saved and get a yes first. Does not consume plan stops.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | What the user calls it, e.g. 'Sprinter' or 'Barracas'. Required to create. | |
| action | Yes | create saves a new one; update changes one the account already has. | |
| latitude | No | Depot only. Decimal degrees (WGS84). From geocode_addresses when given an address. Required to create a depot. | |
| resource | Yes | vehicle saves a vehicle the account owns; depot saves a place routes start from; fleet groups saved vehicles under one name. | |
| vehicles | No | Fleet only. What the fleet holds. Required to create one; on update it replaces the whole list. | |
| longitude | No | Depot only. Decimal degrees (WGS84). Send it with latitude. | |
| resource_id | No | For update: a vehicle_id or depot_id from list_fleet. | |
| max_volume_m3 | No | Vehicle only. Cargo volume in cubic meters. Omit when the user did not give one. | |
| max_weight_kg | No | Vehicle only. Payload capacity in kilograms. Omit when the user did not give one: never invent a capacity. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depot | No | The saved depot, when resource=depot. | |
| fleet | No | The saved fleet and what it holds, when resource=fleet. | |
| outcome | Yes | created, updated, or already_existed: the account had this exact one, so nothing was written. Say which to the user. | |
| vehicle | No | The saved vehicle, when resource=vehicle. | |
| resource | Yes | Which kind of row was written. | |
| account_url | No | Opens the account's saved vehicles and depots in the Vepathos dashboard. Requires signing in. |