tascan_create_zone
Create a geofenced work zone. Delivery zones route workers who open the project Site Gate (geo.html?project=...) to this zone's task list when GPS places them inside the radius. Set enforce_on_list=true to zone-lock the task list — workers cannot start it from outside the zone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Zone center latitude | |
| lng | Yes | Zone center longitude | |
| kind | No | What the fence MEANS. work_site: expected here (auto clock-in, list on enter). hazard: enter allowed under conditions — required_ppe + photo checkpoint verified by AI vision, the OSHA row. containment: must stay inside; leaving = breach. restricted: must stay out; entering = breach. Default work_site. | |
| name | Yes | Zone name (e.g. "Stage Left", "Loading Dock") | |
| polygon | No | Polygon/rectangle zone instead of a circle: vertices as [[lat,lng], ...], at least 3. lat/lng/radius_m are then computed (centroid + bounding radius) — still pass lat/lng but they are overridden. | |
| radius_m | No | Radius in meters (default 150, min 10, max 100000) | |
| project_id | No | Project this zone belongs to | |
| description | No | Shown to workers on the Site Gate page | |
| notify_email | No | Alert recipient override — defaults to all org admins | |
| required_ppe | No | Hazard zones: PPE the worker must show at entry (pick-list so the audit reads the same words) | |
| task_list_id | No | Task list the Site Gate routes workers to when they are inside this zone | |
| auto_clock_in | No | Entering the zone writes a shift_start clock-in event | |
| enter_message | No | What the worker sees / is texted on entry (default is generated from the rule) | |
| auto_clock_out | No | Leaving the zone writes a shift_end clock-out event | |
| notify_on_exit | No | Email the manager when a worker leaves this zone (accountability — sign in then disappear) | |
| alert_on_breach | No | Email + SMS the admin on containment-exit / restricted-enter (default true) | |
| enforce_on_list | No | Zone-lock the task list — it cannot be started from outside the radius | |
| notify_on_enter | No | Email the manager when a worker enters this zone (danger areas) | |
| ppe_photo_required | No | Hazard zones: pop a photo checkpoint on entry (default true when required_ppe is set) | |
| sms_worker_on_exit | No | Text the worker on exit | |
| task_list_on_enter | No | Task list dispatched to the worker (in-app + SMS) when they cross into the zone | |
| sms_worker_on_enter | No | Text the worker the rule/list on entry, even if the app is closed |