Wait for User Answer
wait_for_answerPoll once for the user's answer to a previously created question: after ask_user times out, after ask_user with wait:false, or with a linkedCorrelationId from send_notification. Each call blocks until the answer arrives or timeoutMs expires (default 30 seconds, max 55). If a live question is still unanswered after this poll, handoffAction is "cancel_then_ask_in_current_client": cancel the phone question before asking in the current chat or client. If cancellation returns handoffAction "stop", stop. Otherwise, if cancellation returns false, poll once for 1 second and honor the answer that won the race. The response distinguishes pending, cancelled, expired, missing, and unavailable states; cancelled and unavailable mean stop rather than re-ask. nextAction retains only its original values for older clients. Returns { answered:true, status:"answered", value } once the user responds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeoutMs | No | How long this one poll blocks, in milliseconds (default 30000, max 55000). Follow handoffAction when present, otherwise nextAction. | |
| correlationId | Yes | The correlationId from an earlier ask_user response, or the linkedCorrelationId from a send_notification with an embedded askQuestion |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | What to do next, when there is a next step. | |
| note | No | Free text the user added alongside their answer. | |
| value | No | The user's answer: "yes" or "no" for confirm, the chosen option for select, the typed text for input. Present only when answered is true. | |
| status | Yes | The actual question state. Only pending is a live unanswered wait. | |
| answered | Yes | True once the user responded. False means follow handoffAction when present, otherwise nextAction; do not guess that every unanswered state is a timeout. | |
| nextAction | No | Backward-compatible next step for older clients. Follow handoffAction first when present. | |
| handoffAction | No | Race-safe directive for updated clients. Takes precedence over nextAction. |