add_thankyou_screen_logic
Add Display Logic to a thank-you screen — the builder's own label for it, even though it's the same survey.logics map as question-level Jump Logic, keyed by the screen's id. This is what selects WHICH thank-you screen a respondent sees when a survey has more than one: the first screen whose entry conditions evaluate true wins, or the first screen with no logic entries at all. Despite sharing a map with Jump Logic, there is NO "jump to a question" action here — skipTo isn't even a parameter on this tool, and has no effect for a screen even where it technically exists on old data. The only two effects are (1) screen selection (which entry's conditions determine this screen gets shown) and (2), optionally, assigning a text variable. Identify the screen with screenId or position (omit both for position 0). Omit entryIndex to create a new entry (a screen can have MANY, unlike question/submit Display Logic's one-entry limit) — position it with insertAfterEntryIndex (-1 = start, N = right after entry N, omit = append). Provide entryIndex instead to append the given condition(s) to an EXISTING entry (position within it via insertAfterConditionIndex). Optionally, when creating a NEW entry, variable + variableValue sets that entry's "Assign to text variable" — a real, functional side-effect applied when the entry's conditions match (use update_thankyou_screen_logic to add/change one on an entry that already exists). This only assigns a FIXED value to a variable that ALREADY EXISTS — it cannot create a new variable (refused if variable isn't a recognized name) and cannot capture/recall a respondent's actual answer into it (refused if variableValue contains recall/piping syntax) — see those two fields' own descriptions. No ordering restriction on a condition's source question — thank-you screens only evaluate once the whole survey is complete, so every question is always a valid source. No confirmation/force gate — purely additive.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"surveyId": "<surveyId>",
"conditions": "<conditions>"
},
"name": "add_thankyou_screen_logic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| teamId | No | Which team workspace to act in (ids come from get_account_info or list_surveys). Optional: if omitted, the server uses the team that owns the given surveyId, or your only team. Required for create_survey when you belong to several teams. | |
| position | No | 0-based index into thankyouScreens[]. Provide this OR screenId. Omit both for position 0. | |
| screenId | No | The thank-you screen's id. Provide this OR position. | |
| surveyId | Yes | The Survey ID containing the thank-you screen | |
| variable | No | Only applied when creating a NEW entry — assigns this survey variable when the entry's conditions match. Must be the name of a variable that ALREADY EXISTS in the survey's variable list (including the reserved defaults ref/source/medium/result/responseID, or one created via the builder's Settings → Variables) — this tool cannot create a new one, and an unrecognized name is refused. Pair with variableValue. | |
| conditions | Yes | The condition(s) for the new entry, or to append to an existing one. | |
| entryIndex | No | Append to an EXISTING entry instead of creating one: which entry (from get_thankyou_screen_logic). Omit to create a new entry. | |
| variableValue | No | The FIXED value assigned to `variable` when the entry's conditions match — stored and shown exactly as typed, never resolved for recall. Do NOT put `{{prefix:id}}` recall/piping syntax in here expecting it to capture a respondent's actual answer — it will not work, and is refused outright. Only meaningful together with variable. | |
| insertAfterEntryIndex | No | Only with a new entry (entryIndex omitted): where it lands among existing entries. -1 = start, N = right after entry N. Omit to append at the end. | |
| insertAfterConditionIndex | No | Only with entryIndex: where the new condition(s) land within that entry's list. -1 = start, N = right after condition N. Omit to append at the end. |