# Booking questions tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Booking questions

### create_booking_question

Add a question a product asks at checkout, for the booking or for each guest: text, a number, a single or multiple choice, or yes/no; required or optional; staff-only (staff answer it, guests never see it); shown on the run sheet; and sent to the kitchen beside the menu counts (allergies, dietary needs). Everywhere the product is offered, or at one location. Returns a preview to confirm; undo removes it until someone has answered it.

Changes · Members of an organization · Needs products:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `locationId` — string; optional. Ask it only at this location; left out: everywhere
- `label` — string; required.  minLength: 1; maxLength: 300
- `helpText` — string or null; optional.  maxLength: 1000
- `scope` — string; optional. booking: answered once; participant: answered for each guest in the party Allowed: "booking", "participant"; default: "booking"
- `type` — string; required. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
- `choices` — array; optional.  maxItems: 50; default: \[\]
  - `choices[]` — string; optional.  minLength: 1; maxLength: 200
- `required` — boolean; optional. Guests must answer it to check out (never a staff-only one) default: false
- `staffOnly` — boolean; optional. Staff answer it (set_booking_answer); guests never see it default: false
- `runSheet` — boolean; optional. Shown on the run sheet default: true
- `kitchen` — boolean; optional. Its answers go to the kitchen, beside the menu counts (allergies, dietary needs) default: false
- `position` — integer; optional.  minimum: 0; maximum: 1000; default: 0

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `locationId` — string or null; required. Asked only at this location; null: everywhere
- `label` — string; required. 
- `helpText` — string or null; required. 
- `scope` — string; required.  Allowed: "booking", "participant"
- `type` — string; required. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
- `choices` — array; required. 
  - `choices[]` — string; optional. 
- `required` — boolean; required. 
- `staffOnly` — boolean; required. 
- `runSheet` — boolean; required. 
- `kitchen` — boolean; required. 
- `position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `status` — string; required.  Allowed: "active", "archived"
- `answers` — integer; required. Orders that have answered it minimum: -9007199254740991; maximum: 9007199254740991

### list_booking_answers

List the answers to booking questions for one order, or for a session's confirmed bookings (the run sheet's): each with its question, the guest it's for (participant questions), and who answered it. Guest data: shown only to staff who can read bookings.

Reads · Members of an organization · Needs bookings:read

#### Input

- `orderId` — string; optional. The order's id, from list_bookings or list_orders
- `sessionId` — string; optional. The session's id, from list_sessions

#### Output

- `answers` — array; required. 
  - `answers[]` — object; optional. 
    - `answers[].orderId` — string; required. 
    - `answers[].code` — string; required. The order's booking code
    - `answers[].bookingId` — string or null; required. 
    - `answers[].sessionId` — string; required. 
    - `answers[].questionId` — string; required. 
    - `answers[].question` — string; required. 
    - `answers[].participant` — integer or null; required. Which guest (1 to the party size) for a participant question; null for the booking minimum: -9007199254740991; maximum: 9007199254740991
    - `answers[].value` — one of: string, number, boolean, array; required. 
      - `answers[].value — array option 4` — array; optional. 
        - `answers[].value — array option 4[]` — string; optional. 
    - `answers[].answeredBy` — string; required.  Allowed: "guest", "staff"
    - `answers[].staffOnly` — boolean; required. 
    - `answers[].runSheet` — boolean; required. 
    - `answers[].kitchen` — boolean; required. 
    - `answers[].pastParty` — boolean; optional. This guest's seat was taken off the booking after it was answered: no guest has this number now (guest numbers never change, and a checked-in guest is never the one removed). A guest number doesn't say who left, so this guest may still be coming: check before relying on it. Always present

### list_booking_questions

List a product's booking questions (archived ones included, with how many orders have answered each).

Reads · Members of an organization · Needs products:read

#### Input

- `productId` — string; required. The product's id, from list_products

#### Output

- `questions` — array; required. 
  - `questions[]` — object; optional. 
    - `questions[].id` — string; required. 
    - `questions[].productId` — string; required. 
    - `questions[].locationId` — string or null; required. Asked only at this location; null: everywhere
    - `questions[].label` — string; required. 
    - `questions[].helpText` — string or null; required. 
    - `questions[].scope` — string; required.  Allowed: "booking", "participant"
    - `questions[].type` — string; required. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
    - `questions[].choices` — array; required. 
      - `questions[].choices[]` — string; optional. 
    - `questions[].required` — boolean; required. 
    - `questions[].staffOnly` — boolean; required. 
    - `questions[].runSheet` — boolean; required. 
    - `questions[].kitchen` — boolean; required. 
    - `questions[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `questions[].status` — string; required.  Allowed: "active", "archived"
    - `questions[].answers` — integer; required. Orders that have answered it minimum: -9007199254740991; maximum: 9007199254740991

### set_booking_answer

Answer a booking question for an order as staff: a staff-only question, or a guest's answer given by phone (it replaces theirs). For a participant question, say which guest (1 to the party size). null removes the answer. Returns a preview to confirm; undo puts the previous answer back.

Changes · Members of an organization · Needs bookings:write

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders
- `questionId` — string; required. The booking question's id, from list_booking_questions
- `participant` — integer; optional. For a participant question: which guest, 1 to the party size minimum: 1; maximum: 10000
- `value` — any value or null; required. The answer, as the question's type takes it (see checkout's answers); null removes it

#### Output

- `orderId` — string; required. 
- `questionId` — string; required. 
- `participant` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `answered` — boolean; required. 

### update_booking_question

Change a booking question: its label, help text, whether it's required, staff-only, on the run sheet, or for the kitchen, its order, or archive it (no longer asked; its answers stay). Its type, scope, and choices change only while nobody has answered it. Returns a preview to confirm; undo refuses once the question has been answered since.

Changes · Members of an organization · Needs products:write

#### Input

- `questionId` — string; required. The booking question's id, from list_booking_questions
- `label` — string; optional.  minLength: 1; maxLength: 300
- `helpText` — string or null; optional.  maxLength: 1000
- `scope` — string; optional. booking: answered once; participant: answered for each guest in the party Allowed: "booking", "participant"
- `type` — string; optional. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
- `choices` — array; optional.  maxItems: 50
  - `choices[]` — string; optional.  minLength: 1; maxLength: 200
- `required` — boolean; optional. Guests must answer it to check out (never a staff-only one)
- `staffOnly` — boolean; optional. Staff answer it (set_booking_answer); guests never see it
- `runSheet` — boolean; optional. Shown on the run sheet
- `kitchen` — boolean; optional. Its answers go to the kitchen, beside the menu counts (allergies, dietary needs)
- `position` — integer; optional.  minimum: 0; maximum: 1000
- `status` — string; optional. archived: no longer asked; the answers it has stay with their orders Allowed: "active", "archived"

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `locationId` — string or null; required. Asked only at this location; null: everywhere
- `label` — string; required. 
- `helpText` — string or null; required. 
- `scope` — string; required.  Allowed: "booking", "participant"
- `type` — string; required. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
- `choices` — array; required. 
  - `choices[]` — string; optional. 
- `required` — boolean; required. 
- `staffOnly` — boolean; required. 
- `runSheet` — boolean; required. 
- `kitchen` — boolean; required. 
- `position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `status` — string; required.  Allowed: "active", "archived"
- `answers` — integer; required. Orders that have answered it minimum: -9007199254740991; maximum: 9007199254740991
