Guide

Building a questionnaire.

A questionnaire asks questions, adds up scores, and returns a result. Two ways to return it: a winning profile with its page, or a complete portrait, dimension by dimension. This guide covers both, from the first question to going live.

The principle: weights and profiles

Each answer gives points to one or more profiles. A profile's score is the sum of the points of the answers chosen. What the visitor sees next depends on the result mode.

Question: « Faced with a new project, you… »
• dive straight in → { "curiosite": 3 }
• take time to plan → { "structure": 3 }
• ask the team's opinion → { "accord": 2, "structure": 1 }

A caution notice — « this questionnaire is not a diagnosis » — can be shown before the first question, in both modes.

« Profile » mode: one winner, one page

This is the default mode. A single profile is chosen, and the visitor lands on that profile's result page — an ordinary page, which you compose in the editor.

  1. Combinations pick the winner. Each sets criteria (« curiosity ≥ structure », « drive ≥ agreement »…); the first whose criteria are all true wins.
  2. Failing that, the overall score. A profile can be assigned when the sum of all scores falls within a range: 0 to 20, 20 to 40…

Keep result pages in a category of their own: they don't need to appear in the menu.

« Dimensions » mode: a complete portrait

The visitor doesn't receive one profile: they receive all of them, each with the text matching their score. The result page composes itself; there is none to create.

  1. Each profile becomes a dimension, shown as a bar on the questionnaire's scale — 0 to 18, for instance —, with its two poles at either end and its colour.
  2. Three bands per dimension: low, middle, high, bounds included (0–6, 7–11, 12–18). Each has its title, its text, and if you wish strengths, a point of caution and a suggestion.
  3. At the top, the dimension or dimensions furthest from the middle of the scale. The others follow, in the order you chose.
  4. Nuanced profile: if every dimension falls in its middle band, none is singled out and a dedicated text opens the page.
  5. At the bottom, a closing text and a button — to your appointment booking, for example.

No percentages, no comparison with other respondents: the result speaks about the person, not an average.

A dimension and its bands, through the API

PATCH /api/agent/v1/profils/31/
{ "rang": 1, "couleur": "#2F6F8F",
"pole_bas": "Tried and tested", "pole_haut": "Something new",
"tranches": {
"bas": { "de": 0, "a": 6, "titre": "Tried and tested", "texte": "…",
"forces": ["…", "…"], "vigilance": "…", "piste": "…" },
"milieu": { "de": 7, "a": 11, "titre": "In between", "texte": "…" },
"haut": { "de": 12, "a": 18, "titre": "Something new", "texte": "…" } } }

Simulate before publishing

No need to answer the questionnaire twenty times to see every case. The simulation takes scores and says what the visitor would see: who comes first, which band shows for each dimension, and which score would fall into no band. Nothing is saved.

POST /api/agent/v1/questionnaires/7/simuler/
{ "scores": { "curiosite": 15, "structure": 9, "elan": 3,
"accord": 8, "tensions": 10 } }

Test at least three cases: one dimension on top, a tie, everything in the middle. Then put the questionnaire online: it is born inactive, activating it is up to you.

The style

Each questionnaire has its own, dressing both the questions and the result page: font, main colour, background, headings, sizes per device, roundness of answers and button. Reuse the site's palette: the questionnaire should look like the site that hosts it.

PATCH /api/agent/v1/questionnaires/7/
{ "style": { "couleur_theme": "#2F6F8F", "couleur_fond": "#F7F4EF",
"police": "Inter, sans-serif", "arrondi_bouton": 8 } }

QuestionnairesHave Claude build it