WaitWait for approval
- Step kind
- Wait
- Operation
- Clarification
- Question
- This refund is over $500. Approve it?
Inputs
- OperationstringRequired
- A declared wait the question goes through, usually Clarification. Its registration decides what an answer may be.
- QuestionstringRequired
- The question put to the person, as written.
Outputs
- <answer>string | object
- The answer, checked against the wait’s schema. Through Clarification it is the person’s text, or a decline:
- Declinedtrue
- Present when the person said no.
- Reasonstring
- Why, where they said.
Example
Operations:
- Wait: Clarification
Locator: embedded://momor.ai/services/tools/clarification
Steps:
- Wait: Approve
Operation: Clarification
Question: This refund is over $500. Approve it?
- Branch: Decision
Cases:
- When: { Exists: { Field: Approve.Declined } }
Then:
- ModelCall: Declined
Instructions: Say the refund was declined, and why.
Output: Content
Else:
- ExecuteTool: Pay
Operations: [IssueRefund]A decline is an answer, not a failure: the step completes with it, and the workflow decides what follows. Here Exists holds only for a decline, because a text answer has no Declined field.
Answering
The raised question appears on the run’s event stream as wait.intervention.raised, with its waitId and the question. Answer it with POST /workflow/runs/{runId}/waits/{waitId}. The run’s owner answers: the signed-in person or the API key that started it.
Not in the stepThe step names no approver and no time limit. Momor does not deliver the question to anyone; the system that started the run shows it to the right person and posts their answer. A question stays open until it is answered or the turn ends.