Polls and Predictions
Creates a new prediction for your channel with 2 outcomes. Must be at least affiliate.
If you want to create a prediction with more than 2 outcomes, you can use Create Prediction command instead.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Prediction Name | String | Question displayed for the prediction. Maximum: 60 characters. |
Choice 1 | String | Text displayed for the choice. Maximum: 25 characters. |
Choice 2 | String | Text displayed for the choice. Maximum: 25 characters. |
Dur.(s) | Number | Total duration for the prediction in seconds. |
Creates a new prediction for your channel with 2-10 outcomes. Must be at least affiliate.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Prediction Name | String | Question displayed for the prediction. Maximum: 60 characters. |
Choice Array Name | String | Name of the array containing all your outcome names (min 2, max 10) |
Dur.(s) | Number | Total duration for the prediction in seconds. |
Ends a currently running prediction.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters). |
Status | Dropdown | Status of the ending prediction. |
Prediction ID | String | Prediction ID, wrapped in /$$/ if a variable is being used. |
Result ID (resolved only) | String | Result ID, wrapped in /$$/ if a variable is being used. |
Creates a new poll for your channel. Must be at least affiliate. Minimum amount of 2 choices.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Poll Name | String | Question displayed for the poll. Maximum: 60 characters. |
Choice 1-5 | String | Text displayed for the choice. Maximum: 25 characters. |
Dur.(s) | Number | Total duration for the poll in seconds. |
Points | Number | Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000. |
Gets the latest poll ID, prediction ID, or outcome ID to use with Get Poll/Prediction Result or End Prediction. This only works for predictions/polls initiated through SAMMI.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Get | Dropdown | Whether it’s a poll or prediction ID |
Save Variable As | String | Variable name to save the ID |
Gets the result of a poll or prediction. Must provide its ID which can be retrieved by listening to Twitch Poll/Prediction triggers or from Get Latest Poll/Prediction ID command.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Poll/Prediction ID | The ID of your poll or prediction | |
Get | Dropdown | Whether it’s a poll or prediction |
Save Variable As | String | Variable name to save the response |
You can access the response object’s data by using Get Object Variable command.
Response fields for polls:
Variable Name | Type | Description |
---|---|---|
id | string | ID of the poll. |
broadcaster_id | string | ID of the broadcaster. |
broadcaster_name | string | Name of the broadcaster. |
broadcaster_login | string | Login of the broadcaster. |
title | string | Question displayed for the poll. |
choices object[] | Array of the poll choices. | |
choice.id | string | ID for the choice. |
choice.title | string | Text displayed for the choice. |
choice.votes | number | Total number of votes received for the choice across all methods of voting. |
choice.channel_points_votes | number | Number of votes received via Channel Points. |
choice.bits_votes | number | Number of votes received via Bits. |
bits_voting_enabled | boolean | Indicates if Bits can be used for voting. |
bits_per_vote | number | Number of Bits required to vote once with Bits. |
channel_points_voting_enabled | boolean | Indicates if Channel Points can be used for voting. |
channel_points_per_vote | number | Number of Channel Points required to vote once with Channel Points. |
status | string | Poll status. Valid values are: ACTIVE: Poll is currently in progress. COMPLETED: Poll has reached its ended_at time. TERMINATED: Poll has been manually terminated before its ended_at time. ARCHIVED: Poll is no longer visible on the channel. MODERATED: Poll is no longer visible to any user on Twitch. INVALID: Something went wrong determining the state. |
duration | number | Total duration for the poll (in seconds). |
started_at | string | UTC timestamp for the poll’s start time. |
ended_at | string | UTC timestamp for the poll’s end time. Set to null if the poll is active. |
Response fields for predictions:
Variable Name | Type | Description |
---|---|---|
id | string | ID of the Prediction. |
broadcaster_id | string | ID of the broadcaster. |
broadcaster_name | string | Name of the broadcaster. |
broadcaster_login | string | Login of the broadcaster. |
title | string | Title for the Prediction. |
winning_outcome_id | string | ID of the winning outcome. If the status is ACTIVE, this is set to null. |
outcomes | object[] | Array of possible outcomes for the Prediction. |
outcome.id | string | ID for the outcome. |
outcome.title | string | Text displayed for outcome. |
outcome.users | number | Number of unique uesrs that chose the outcome. |
outcome.channel_points | number | Number of Channel Points used for the outcome. |
outcome.top_predictors | object[] | Array of users who were the top predictors. null if none. |
outcome.top_predictors.user.id | string | ID of the user. |
outcome.top_predictors.user.name | string | Display name of the user. |
outcome.top_predictors.user.login | string | Login of the user. |
outcome.top_predictors.user.channel_points_used | number | Number of Channel Points used by the user. |
outcome.top_predictors.user.channel_points_won | number | Number of Channel Points won by the user. |
outcome.color | string | Color for the outcome. Valid values: BLUE, PINK |
prediction_window | number | Total duration for the Prediction (in seconds). |
status | string | Status of the Prediction. Valid values are: RESOLVED: A winning outcome has been chosen and the Channel Points have been distributed to the users who guessed the correct outcome. ACTIVE: The Prediction is active and viewers can make predictions. CANCELED: The Prediction has been canceled and the Channel Points have been refunded to participants. LOCKED: The Prediction has been locked and viewers can no longer make predictions. |
created_at | string | UTC timestamp for the Prediction’s start time. |
ended_at | string | UTC timestamp for when the Prediction ended. If the status is ACTIVE, this is set to null. |
locked_at | string | UTC timestamp for when the Prediction was locked. If the status is not LOCKED, this is set to null. |
Ends a poll that is currently active.
Box Name | Type | Description |
---|---|---|
Login Name | Dropdown | Your Twitch login name (all lowercase characters) |
Status | Dropdown | TERMINATED: End the poll manually, but allow it to be viewed publicly. ARCHIVED: End the poll manually and do not allow it to be viewed publicly. |
Poll ID | String | ID of the poll. |