Swarmtix Help Center
Tool Reference

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 — that is what this service creates — and both can be changed afterwards in the dashboard.

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

NameTypeRequiredDefaultDescription
eventstringYesThe event's id (a GUID) or its URL slug.
questionstringYesThe question as the buyer will read it. Up to 300 characters.
answerTypestringNo"text"The kind of answer: "text", "number", "date", "phone" or "paragraph".
showOnTicketbooleanNofalseWhether the answer is printed on the buyer's ticket.

The five answer types

answerType you sendWhat the buyer getsWhat 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"

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.

Questions with a fixed list of answers to choose from are not created here. Checkboxes, radio buttons and dropdowns are the product's other three kinds, and each needs a list of options this tool has no way to accept. Creating one without its list would leave a question the buyer cannot answer, so the tool refuses the type rather than create a broken question. Add those in the dashboard.

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": "text",
    "showOnTicket": false
  }
}

What comes back

{
  "id": "d0b62f47-5a19-4e83-91cd-7f3a2c6b58e0",
  "eventId": "3b6f81ce-04a2-4d97-b5e8-7c10924af3d6",
  "question": "Any dietary requirements?",
  "field": "Anydietaryrequirements",
  "answerType": "text",
  "enabled": true,
  "required": true,
  "showOnTicket": false
}
FieldWhat it is
idThe new question's id
eventIdThe event it was added to
questionThe wording as stored
fieldThe internal field name derived from the wording
answerTypeThe kind of answer, in the same words you sent
enabledWhether the question is switched on at checkout — always true on creation
requiredWhether an answer is required — always true on creation
showOnTicketWhether the answer is printed on the ticket

Read back from the database rather than echoed from your arguments.

What happens when you call it

  1. The event is resolved through the edit gate. The service behind this tool performs no authorization of its own.
  2. question is validated, including the letter-or-digit rule above, and answerType is mapped to one of the five kinds.
  3. The event's existing question ids are noted.
  4. 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.
  5. 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.
  6. The stored row is returned.

Troubleshooting

"answerType is not valid: "dropdown" is not a kind of answer. Expected "text", "number", "date", "phone" or "paragraph"."

Dropdowns, checkboxes and radio buttons need a list of options, which this tool cannot accept. Create those in the dashboard, or use "text" if free text will do.

"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

Every question created here arrives switched on and required — that is what the underlying creation does, and this tool does not paper over it. Make it optional in the dashboard afterwards.

"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 showOnTicket set, the answer prints on the ticket
  • Event setup from a brief, alongside dates and ticket types

On this page