swarmtix_checkout_questions_create
Adds a custom question an event asks buyers during checkout
swarmtix_checkout_questions_create
Adds a custom question an event asks buyers during checkout, and returns it. The question is switched on, and its answer is required unless you set required to false.
When you would reach for it
- Collecting dietary requirements, accessibility needs or a T-shirt size at checkout.
- Asking which track or session a buyer wants, as free text.
- Setting up a new draft alongside its dates and ticket types.
Scope
events:write
Calling this twice adds the question twice. It is not idempotent. If a call times out, check swarmtix_checkout_questions_list before calling again.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
event | string | Yes | — | The event's id (a GUID) or its URL slug. |
question | string | Yes | — | The question as the buyer will read it. Up to 300 characters. |
answerType | string | No | "text" | The kind of answer: "text", "number", "date", "phone", "paragraph", "checkboxes", "radio" or "dropdown". |
showOnTicket | boolean | No | false | Whether the answer is printed on the buyer's ticket. |
options | string[] | No | - | The choices for "checkboxes", "radio" and "dropdown": 2 to 50 distinct entries of up to 200 characters. Not allowed for the other kinds. |
required | boolean | No | true | Whether the buyer must answer. |
The answer types
answerType you send | What the buyer gets | What the response reports back |
|---|---|---|
"text" | A single-line text box | "text" |
"number" | A number field | "number" |
"date" | A date picker | "date" |
"phone" | A phone number field | "phone" |
"paragraph" | A multi-line text box | "paragraph" |
"checkboxes" | Several choices from the options list | "checkboxes" |
"radio" | One choice from the options list, as buttons | "radio" |
"dropdown" | One choice from the options list, as a dropdown | "dropdown" |
The value round-trips: whatever you send comes back in the same word. A response reading "date" is a date question, and nothing has to be checked a second time to be sure of it.
List questions need options. "checkboxes", "radio" and "dropdown" need 2 to 50 distinct options, and the other kinds take none. A list question without its list would leave a question the buyer cannot answer, so the tool refuses it.
The question needs a letter or a digit
The field name a question is stored under is derived from its wording by stripping it down to Latin letters and digits. A question made only of punctuation would leave that field empty, which is a row nobody can ever answer rather than a failure anybody sees — so it is refused.
Example call
{
"name": "swarmtix_checkout_questions_create",
"arguments": {
"event": "spring-summit-2027",
"question": "Any dietary requirements?",
"answerType": "dropdown",
"options": ["None", "Vegetarian", "Vegan", "Gluten free"],
"required": false
}
}What comes back
{
"id": "d0b62f47-5a19-4e83-91cd-7f3a2c6b58e0",
"eventId": "3b6f81ce-04a2-4d97-b5e8-7c10924af3d6",
"question": "Any dietary requirements?",
"field": "Anydietaryrequirements",
"answerType": "dropdown",
"options": [
{ "id": "0c9d6a31-7e52-4b8f-a1d4-5b3f98e27c60", "value": "None" },
{ "id": "6a4e1b95-2d03-4c7a-8f6e-91b0d3c5a742", "value": "Vegetarian" }
],
"enabled": true,
"required": false,
"showOnTicket": false
}| Field | What it is |
|---|---|
id | The new question's id |
eventId | The event it was added to |
question | The wording as stored |
field | The internal field name derived from the wording |
answerType | The kind of answer, in the same words you sent |
options | The choices, each with an id and a value. Empty for the other kinds. |
enabled | Whether the question is switched on at checkout - always true on creation |
required | Whether an answer is required |
showOnTicket | Whether the answer is printed on the ticket |
Read back from the database rather than echoed from your arguments.
What happens when you call it
- The event is resolved through the edit gate. The service behind this tool performs no authorization of its own.
questionis validated, including the letter-or-digit rule above, andanswerTypeis mapped to one of the five kinds.- The event's existing question ids are noted.
- The question is created without an id. Supplying one would make it an edit rather than a creation, and the edit path finds its row by id with no event filter — this tool creates and never edits.
- The new row is found by being the one that was not there a moment ago, since the creation step reports success without saying what it made.
- The stored row is returned.
Troubleshooting
"options is not valid: ..."
A "checkboxes", "radio" or "dropdown" question needs 2 to 50 distinct options of up to 200 characters. The other kinds take no options.
"question is not valid: it was empty. Expected the question to ask the buyer."
question is required.
"question is not valid: it contains no Latin letters or digits. Expected a question containing at least one Latin letter or digit."
The wording is punctuation or symbols only, or is written entirely in a script the internal field name cannot be derived from. Include at least one Latin letter or digit in the wording.
"question is not valid: it is 420 characters. Expected the question to ask the buyer, at most 300 characters."
Shorten the question. It is refused rather than cut.
The question is required and you wanted it optional
Send required: false, or change it later with swarmtix_checkout_questions_update.
"Event not found, or this connection does not have access to it."
The event does not exist, it belongs to another organisation, or this organizer may read it but not edit it.
"This connection is not authorized for events:write. Reconnect and grant it to use this tool."
Reconnect and approve events:write.
"Swarmtix could not complete this request. Nothing was changed."
The question was not created, or it was created and could not be read back. Check swarmtix_checkout_questions_list before calling again — a blind retry adds the question twice.
Use cases
- Dietary and accessibility needs collected at checkout
- Track selection on a multi-track conference
- Badge details — with
showOnTicketset, the answer prints on the ticket - A choice from a list — a dropdown for the track, or radio buttons for a T-shirt size
- Event setup from a brief, alongside dates and ticket types