Submit a pending form
form_submitComplete a form step and advance the ONDC flow by submitting either form fields (for auto sessions) or a human-provided submission ID (for manual sessions), saving the returned ID for the next step.
Instructions
Complete the form step and advance the flow. In llm_auto sessions pass fields (the names come from form_fetch) and this posts them to the participant and reads back the submission id it issues. In manual sessions pass the submission_id the person was given instead. Either way the id is saved where the next step's payload expects it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Field name → value, for llm_auto. Use the names from form_fetch. | |
| step_key | No | Which form step. Omit to use the one the flow is waiting on. | |
| session_id | Yes | Session returned by session_create. | |
| submission_id | No | The id the counterparty issued. Supply this in manual mode, after a human has submitted the form. | |
| transaction_id | Yes | Transaction the form belongs to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| events | No | What has happened in this session since your last call — the participant's callbacks, steps sent automatically, refusals, form submissions. Attached to every session-scoped result and delivered exactly once, so read it here instead of polling. Absent when nothing happened. `more` above zero means call record_get_events for the rest. | |
| outcome | Yes | Where the flow stands now the form is done. | |
| step_key | Yes | ||
| raw_response | No | The counterparty's answer, when it was not in the expected {success, submission_id} shape. Read it if the id looks wrong. | |
| submission_id | Yes | What the counterparty issued for this submission. |