create_chute_session
Creates a proposed chute session from a work description, building a widget grid for weights, scores, treatments, and photos. The draft is reviewed and confirmed at the chute before data is recorded.
Instructions
Propose a chute-mode work session from a description of the day's work. Creates a PROPOSED session only — the user reviews, edits, and starts it at the chute (the in-app confirmation); proposing never records any data by itself. Build the widget grid from these types: weight (scale readout; options.unit), score (tap row; options.min/max, BCS defaults 1–5), select (tap chips; options.choices), boolean (yes/no tap, e.g. "Feet trimmed" for work done only if needed), number (options.unit), treatment (product checklist; options.presets), text (notes/dictation), photo. Arrangement rules (hipster/design chute_widget_grid): weight first with size "full"; tap-only widgets (score, select, boolean) size "half", grouped after weight; number/treatment next; text and photo last with size "full"; keep it to ~6 widgets or fewer. EID scanning is the identify step of every session — never add a widget for it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Session name, e.g. "Weigh Day". Defaults to "Chute — <today>". | |
| farm_id | No | The ID of the farm (optional if a default is set). | |
| widgets | Yes | The widget grid, in display order. | |
| group_name | No | Group the processed animals join; created if it does not exist. | |
| record_type | No | RecordType for the per-animal pass records (e.g. HEALTH for vaccination). | |
| new_animal_fields | No | Identity fields on the new-animal form (tag, name, sex, color, dob). |