Create Personality Test

When building a personality test you can add:

Setting personalities

For each personality test build configuration you must define at least two personalities. This is done in the personalities property of the build object.

personalities and otherResults follow the shared item formats: an array of objects, the entry's text in its title, plus the properties below.

Properties

PropertyRequiredTypeDescriptionDefault
titlestringThe title of the personality
descriptionstringThe description of the personality
mediastring|objectMedia to display as part of the personality. Adding it automatically switches its display on. See Use media
minScoreintegerLower bound (0-100, in percent of the achievable score) of the window in which this personality wins
maxScoreintegerUpper bound (0-100) of that window
ctaButtonTextstringLabel of a call-to-action button on this personality's result. Setting either CTA property switches the button on
ctaButtonURLstringTarget URL of that button
otherResultsobjectAdditional score bands shown when this personality is not the winning one; see below. The band's text is its title - see item formats
areOtherResultsMediaEnabledbooleanWhether the media of those other results is displayedtrue
areOtherResultsEnabledbooleanWhether the other results are shown at all. Sending otherResults switches it on; send false to keep them configured but hidden - see feature togglesderived from otherResults
isIncludeCTAButtonEnabledbooleanWhether the call-to-action button is shown at all. Sending either CTA property switches it on; send false to keep it configured but hiddenderived from the CTA properties

Other results per personality

Each entry of otherResults describes what a visitor sees for this personality when another one won:

PropertyRequiredTypeDescriptionDefault
titlestringThe title of this band
descriptionstringIts description
mediastring|objectMedia for this band. Adding it automatically switches its display on
minScoreintegerLower bound (0-100) of the band
maxScoreintegerUpper bound (0-100) of the band
ctaButtonTextstringLabel of a call-to-action button for this band
ctaButtonURLstringTarget URL of that button

Supplying otherResults replaces the two score bands a personality ships with by default.

Example

For the example let's add a SingleChoice question (which is described further in the next section):

{
    "type": "Personality",
    "build": {
        "title": "Introvert or extrovert?",
        "personalities": [
            {
                "title": "Introvert",
                "description": "Prefers solitary activities and quiet environments.",
                "media": "https://httpbin.io/image/jpeg"
            },
            {
                "title": "Extrovert",
                "description": "Enjoys socializing and being around others.",
                "media": "https://httpbin.io/image/png"
            }
        ],
        "blocks": [
            {
                "title": "Do you enjoy social gatherings?",
                "type": "SingleChoice",
                "items": [
                    {
                        "title": "Yes",
                        "scores": [0, 1]
                    },
                    {
                        "title": "No",
                        "scores": [1, 0]
                    }
                ]
            }
        ]
    }
}

Add single/multiple choice questions

Properties

PropertyRequiredTypeDescriptionDefault
typestringSet to SingleChoice or MultipleChoice
titlestringTitle of the question
itemsobject2-100 answer options, each an object with its title and its scores - see item formats and the specification below
descriptionstringThe description of the question
mediastring|objectMedia to display as part of the question. Adding it automatically switches its display on
mediaOrientationstringSettings, Wide, Square, Tall, or OriginalSettings
itemsShuffledbooleanIf set to true, the order of the items/choices will be shuffledfalse
layoutTypestringThe layout of the items, either Rows or ColumnsRows
canWrapItemsbooleanWhether items may wrap onto a new linetrue
isHeightFlexiblebooleanWhether each item's height flexes with its contenttrue
maxSelectionsintegerMultipleChoice only: how many options may be picked at most (1-100)2
hasUnlimitedSelectionsbooleanMultipleChoice only: lift the maxSelections cap entirelytrue
areRemainingVotesVisiblebooleanMultipleChoice only: show the user how many selections are lefttrue
isDescriptionVisiblebooleanWhether the per-answer descriptions are shown. One shared flag for the whole question, not one per answer: giving any item a description switches it onderived from the items

Personality questions have no isRequired - they are always answered.

Example

{
    "title": "Do you enjoy social gatherings?",
    "type": "SingleChoice",
    "items": [
        {
            "title": "Yes",
            "scores": [0, 1]
        },
        {
            "title": "No",
            "scores": [1, 0]
        }
    ]
}

items follows the shared item formats: an array of objects, the answer text in title. What is specific here is scores, which every answer needs. Each item object consists of:

PropertyRequiredTypeDescriptionDefault
titlestringThe answer text
scoresinteger[]An array of integers representing the score for each personality. The order of the scores must match the order of the personalities defined in the personalities array
descriptionstringThe description of the item
mediastring|objectMedia to display as part of the item

Every item must carry exactly as many scores as there are personalities, and each score must be an integer - a mismatch is rejected with a validation error. Setting an item description or media automatically switches the display of descriptions/media on for that question.

Note: The items array of a SingleChoice/MultipleChoice question and the personalities array are each limited to a maximum of 100 entries; a build may reference at most 15 media.

Editing the personalities later: a PUT sending personalities merges them by id, exactly like blocks: "$create": true adds one, "$delete": true removes one - but their order is not editable, there is no $personalitiesOrder (a new personality is appended at the end; reorder them in the Creator). The scores stored on the existing answers follow their personality by identity, so a personality that stays keeps its scores, an added one starts at 0 on every answer, and a deleted one takes its scores with it. See Editing the personalities.

Result page

In a personality test only one result page is allowed which is specified in build.result. Basic results have a title and description property.

Example in build.result:

{
    "title": "Thank you!",
    "description": "We are happy to have you here"
}

Tip: The "winning personality" and "other personalities" are available as blocks in the result page (also used in the full example below). Use them along text, images, etc to create a more engaging result experience. Learn more

Full example

Example with all available options:

{
    "type": "Personality",
    "build": {
        "title": "Personality example (Builder API)",
        "personalities": [
            {
                "title": "Pikachu",
                "description": "You are energetic and love to be around friends.",
                "media": "https://httpbin.io/image/webp",
                "minScore": 51,
                "maxScore": 100,
                "ctaButtonText": "Meet Pikachu",
                "ctaButtonURL": "https://your-website.com/pikachu",
                "areOtherResultsMediaEnabled": true,
                "otherResults": [
                    {
                        "title": "A little bit of Pikachu",
                        "description": "You share some of Pikachu's energy.",
                        "media": "https://httpbin.io/image/svg",
                        "minScore": 0,
                        "maxScore": 25
                    },
                    {
                        "title": "Almost a Pikachu",
                        "description": "You are nearly as energetic as Pikachu!",
                        "media": "https://httpbin.io/image/jpeg",
                        "minScore": 25,
                        "maxScore": 50,
                        "ctaButtonText": "Meet Pikachu",
                        "ctaButtonURL": "https://your-website.com/pikachu"
                    }
                ]
            },
            {
                "title": "Bulbasaur",
                "description": "You are calm and enjoy nature.",
                "media": "https://httpbin.io/image/png",
                "minScore": 0,
                "maxScore": 50,
                "ctaButtonText": "Meet Bulbasaur",
                "ctaButtonURL": "https://your-website.com/bulbasaur"
            }
        ],
        "blocks": [
            {
                "title": "Which vegetables do you like?",
                "description": "Pick up to two.",
                "media": "https://httpbin.io/image/webp",
                "mediaOrientation": "Wide",
                "type": "MultipleChoice",
                "itemsShuffled": true,
                "layoutType": "Columns",
                "canWrapItems": true,
                "isHeightFlexible": true,
                "maxSelections": 2,
                "hasUnlimitedSelections": false,
                "areRemainingVotesVisible": true,
                "items": [
                    {
                        "title": "Carrot",
                        "description": "Crunchy and sweet",
                        "media": "https://httpbin.io/image/svg",
                        "scores": [
                            0,
                            1
                        ]
                    },
                    {
                        "title": "Broccoli",
                        "scores": [
                            1,
                            0
                        ]
                    },
                    {
                        "title": "Spinach",
                        "scores": [
                            0,
                            1
                        ]
                    }
                ]
            },
            {
                "title": "What is your favorite time of the day?",
                "type": "SingleChoice",
                "layoutType": "Rows",
                "items": [
                    {
                        "title": "Morning",
                        "scores": [
                            1,
                            0
                        ]
                    },
                    {
                        "title": "Afternoon",
                        "scores": [
                            1,
                            0
                        ]
                    },
                    {
                        "title": "Evening",
                        "scores": [
                            0,
                            1
                        ]
                    }
                ]
            }
        ],
        "result": {
            "blocks": [
                {
                    "type": "WinningPersonality"
                },
                {
                    "type": "Text",
                    "text": "<h2>Thank you for taking the test!</h2><p>We hope you enjoyed finding out which pokemon matches your personality.</p>"
                },
                {
                    "type": "OtherPersonalities"
                },
                {
                    "type": "Share",
                    "label": "Share this personality test!"
                }
            ]
        }
    }
}

Next steps

Now that you know the basics of building a personality test, you might want to learn how to: