Recued
Menu
← Back to recipes

Plan today's service day

by recued-core v3 38 views

Use “Plan today's service day” in Recued. Reads today's visits, fetches the forecast at each weather-sensitive site's stored coordinates, and records a verdict on every visit — holding the ones the weather will not allow and releasing the ones it will.

Complete workflow

Field Service Day Plan 7 pinned recipes

Use Field Service Day Plan in Recued for weather, geocoding, scheduling, and records. It includes 16 built-in actions and 5 ready-to-run workflows. Actions that change data use Recued's approval controls.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Use “Plan today's service day” in Recued. Reads today's visits, fetches the forecast at each weather-sensitive site's stored coordinates, and records a verdict on every visit — holding the ones the weather will not allow and releasing the ones it will.

pack:field-service-day-planfield-serviceweatheropen-meteo
by recued-core pinned v3

Use “Add a service site” in Recued. Geocode one service address once and store its coordinates.

pack:field-service-day-planfield-servicegeocodingnominatim
by recued-core pinned v3

Use “Schedule a site visit” in Recued. Book one visit to an existing site on a date and time window. The visit is keyed on site, date and window start, so re-running the same booking converges on the same row instead of double-booking the slot.

pack:field-service-day-planfield-serviceschedulingrecords
by recued-core pinned v2

Use “Show the day plan” in Recued. Reads one day's visits in window order and shows each with its site, work, weather verdict and status. It reads information without changing data in the connected service.

pack:field-service-day-planfield-serviceday-planboard
by recued-core pinned v2

Use “Close a site visit” in Recued. Mark one visit done or skipped, with an optional note.

pack:field-service-day-planfield-serviceday-planrecords
by recued-core pinned v3

Use “Tell the customer a visit is weather-held” in Recued. Records watcher for visits that move to weatherhold. Re-reads the visit and its site, mails the customer once, and stamps notifiedat.

pack:field-service-day-planfield-serviceweatherwatcher
by recued-core pinned v3
Show all 7 recipes
View pack details, dependencies, and permissions →

What it does

Schedule this as a dish that runs early each morning. It reads today's planned and weather_hold visits, looks up the forecast at each distinct weather-sensitive site, and writes a verdict onto every visit.

verdictWMO codeswhat happens
:--:--:--
clear0–3 and anything unlistedvisit stays / returns to planned
poorfog 45/48, drizzle 51–57, light rain 61–63, freezing rain 66, snow 71–77, showers 80–81/85held only if Hold on poor weather is on
severeheavy rain 65/67, heavy snow 75/86, violent showers 82, thunderstorm 95/96/99always held

⛔ It plans TODAY and only today. Open-Meteo returns the daily forecast as parallel columns (daily.time, daily.precipitation_sum, …) and the recipe language cannot index an array by a value computed at run time — {{step.x.daily.weather_code.{{step.offset}}}} is a nested template, which is an error, not a lookup. So the recipe reads index 0, which is today. Planning tomorrow the night before would silently read today's weather; refusing to offer it is the honest option. Tomorrow's plan is tomorrow's run.

⛔ It never geocodes. Coordinates come off the site row, written once by Add a service site. The Nominatim pack is explicit that it is not for periodic geocoding, and a daily planner is exactly the periodic caller it warns about.

⚠ A hold the customer was told about is NOT lifted automatically. If the forecast improves and notified_at is set on the visit, the visit stays held and the card lists it under "held, customer already notified". Reinstating it is a deliberate act — the alternative is a machine quietly contradicting a message you already sent. Holds that were never notified are released normally.

⚠ Indoor sites are never held. A site with Weather sensitive off gets the verdict indoor and is left alone whatever the sky is doing.

⚠ Forecast failures are visible, not silent. A site whose forecast call fails keeps its previous verdict and is counted under "forecast unavailable" on the card. It is not treated as clear.

⚠ Site-local vs server-local midnight. The pack sends timezone=auto, so index 0 of the forecast is the day it is at the site, verified live (a London coordinate returned timezone: Europe/London, daily.time[0] = today). But the visit list is filtered on the server's local date. Those agree for anyone whose sites share their server's timezone — which is every ordinary field-service operator — and diverge by a day only if you dispatch across timezones. If you do, run the plan mid-morning rather than just after midnight.

⚠ The visit cap bounds the weather calls. At most Max visits visits are read per run (default 40). If your day is longer than that, the card says so — it does not quietly plan half a day.

How it works 54 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (54 steps)
■ now_iso date_add
Add 0 seconds to
■ today date_format
Format as a date
■ read_cap clamp
Clamp setting max visits between 1 and 100
◆ planned recued-core.field-service-day-plan.visit.search
Search visit on field service day plan
◆ held recued-core.field-service-day-plan.visit.search
Search visit on field service day plan
■ defaults defaults
Apply defaults
■ visit_rows_all flatten
Flatten nested lists in
■ visit_rows_all_sorted sort
Sort by window_start
■ read_count count
Count items in visit rows all sorted
■ visit_rows slice
Take a subset of
■ visit_count count
Count items in visit rows
■ has_visits compare
Check if visit count is greater than 0
■ cap_reached compare
Check if read count is greater than read cap
■ dropped_count math
Calculate read count minus visit count
■ visits_keyed map
Extract site_ref from each item
■ site_ids_all pluck
Extract site_id from each item
■ site_ids unique
Remove duplicates from
◆ sites recued-core.field-service-day-plan.site.get_many
Get many site on field service day plan
skip: step.has_visits equal false
■ site_rows default
Apply default
■ visits_joined enrich_by
Apply enrich_by
■ sensitive_sites filter
Filter by condition
◆ forecasts recued-core.open-meteo.weather.forecast
Forecast weather on open meteo
skip: step.has_visits equal false
■ forecast_list default
Apply default
■ forecast_rows map
Extract from each item
■ forecast_ok filter
Filter by condition
■ forecast_ok_count count
Count items in forecast ok
■ sensitive_site_count count
Count items in sensitive sites
■ forecast_failed_count math
Calculate sensitive site count minus forecast ok count
■ visits_wx enrich_by
Apply enrich_by
■ indoor_visits filter
Filter by condition
■ outdoor_visits filter
Filter by condition
■ outdoor_forecast filter
Filter by condition
■ outdoor_unknown filter
Filter by condition
■ visits_verdict map
Extract weather_code from each item
■ severe_rows filter
Filter by condition
■ poor_rows filter
Filter by condition
■ poor_hold_rows ternary
Apply ternary
■ hold_rows flatten
Flatten nested lists in
■ hold_ids pluck
Extract id from each item
■ release_candidates filter
Filter by condition
■ release_rows filter
Filter by condition
■ reinstatable_rows filter
Filter by condition
■ notified_hold_rows filter
Filter by condition
■ clearing_rows flatten
Flatten nested lists in
◆ hold_update recued-core.field-service-day-plan.visit.update
Update visit on field service day plan
◆ clear_update recued-core.field-service-day-plan.visit.update
Update visit on field service day plan
◆ indoor_update recued-core.field-service-day-plan.visit.update
Update visit on field service day plan
■ hold_count count
Count items in hold rows
■ clearing_count count
Count items in clearing rows
■ reinstated_count count
Count items in reinstatable rows
■ notified_hold_count count
Count items in notified hold rows
■ indoor_count count
Count items in indoor visits
■ unknown_count count
Count items in outdoor unknown
■ card to_summary
Format results as a summary card
▼
Output
summary card
Settings 2 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

max visits setting = 40
hold on poor setting = false

Uses (4 operations)

Pack operation Search visit on field service day plan recued-core.field-service-day-plan.visit.search
Pack operation Get many site on field service day plan recued-core.field-service-day-plan.site.get_many
Pack operation Forecast weather on open meteo recued-core.open-meteo.weather.forecast
Pack operation Update visit on field service day plan recued-core.field-service-day-plan.visit.update

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Write Pack Field Service Day Plan external change
Read: visit.search · No approvalRead: site.get_many · No approvalWrite: visit.update · No approval

1 more isn't listed here. You'll see it at install.

About

Tags

pack:field-service-day-planfield-serviceweatheropen-meteoday-planrecordsv2

Details

54 steps 2 configurable settings recipe_id: plan-service-day