Preview workflow
preview_workflowResolve a workflow run into a non-committable birth preview for entries, corrections, or invalidations; returns structured field and domain issues before commit.
Instructions
Resolve one workflow run into a non-committable preview without creating livestock records. Use operation record_birth with template_id and inputs, or operation amend_birth with record_id, expected_revision, reason and changes (amendment_operation amend or entered_in_error) to preview a birth correction or invalidation. Resolves literal and today defaults once and returns structured field/domain issues. Show the producer the complete review before seeking approval for commit_workflow. Never guess a missing required answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bundle | No | Untemplated record_birth only: a complete birth bundle (observation-only, existing animal links, or inline new profiles). Mutually exclusive with template_id/inputs. | |
| inputs | No | ||
| reason | No | ||
| changes | No | ||
| farm_id | No | Farm UUID; defaults to the active farm. | |
| timezone | No | IANA timezone used once to resolve the "today" date default; never guessed. | |
| operation | No | Defaults to record_birth. Use amend_birth to correct or mark entered in error an existing BIRTH record. | |
| record_id | No | amend_birth: the canonical BIRTH record being corrected. | |
| request_id | Yes | Stable request UUID. Retrying the identical payload returns the same snapshot. | |
| template_id | No | ||
| template_version | No | ||
| expected_revision | No | amend_birth: the record revision the producer reviewed. | |
| amendment_operation | No | amend_birth: correct facts (amend) or invalidate the event (entered_in_error). | |
| replaces_preview_id | No |