Configure Interpolations
Interpolations let you insert dynamic values into questionnaire text using {{placeholder}} syntax. This is useful for showing region names, thresholds, user answers, or constants directly in questions and descriptions — without hardcoding values.
How interpolation works
Section titled “How interpolation works”In Strapi, write text with {{placeholder}} tokens. When the questionnaire renders, these placeholders are replaced with actual values from:
- Constants — values defined in the questionnaire’s metadata constants
- Shared config — global values like
featherNameorprivateHealthInsuranceThreshold - Answers — the user’s previous answers in the current flow
- Region data — region-specific names and info
Syntax
Section titled “Syntax”| Syntax | Source | Example |
|---|---|---|
{{constants.myConstant}} |
Questionnaire metadata constants | {{constants.expatLongTermLastSupportedStartDate}} |
{{featherName}} |
Shared config (global) | Resolves to “Feather” |
{{privateHealthInsuranceThreshold}} |
Shared config | Resolves to the current threshold amount |
{{miniJobThreshold}} |
Shared config | Resolves to the current mini-job income limit |
{{answers.startDate}} |
User’s answer to the startDate question |
Shows the date the user selected |
{{answers.variantData.name}} |
Variant-specific data (e.g., provider name) | “AOK”, “Barmer”, “TK” |
{{regionName}} |
The human-readable name of the selected region | “Germany”, “Spain”, “France” |
Examples
Section titled “Examples”Show a region name in a question
Section titled “Show a region name in a question”In Strapi, set the screen question text to:
What is your address in {{regionName}}?When the user selects Spain as their region, this renders as:
What is your address in Spain?
Show a constant threshold in a description
Section titled “Show a constant threshold in a description”First, define a constant in the questionnaire’s metadata:
- Go to the metadata section
- In the constants repeatable field, add:
- key:
miniJobThreshold - value:
538
- key:
Then use it in a question’s screen description:
If your income is below {{constants.miniJobThreshold}}€ per month, you qualify for reduced rates.Renders as:
If your income is below 538€ per month, you qualify for reduced rates.
Reference a user’s previous answer
Section titled “Reference a user’s previous answer”Use the answers prefix to show what the user entered earlier:
To sign up with a start date of {{answers.startDate}}, please reach out to our customer support.Renders as:
To sign up with a start date of 2026-08-01, please reach out to our customer support.
Show variant-specific content
Section titled “Show variant-specific content”For multi-variant questionnaires (e.g., public health with multiple providers):
Apply for your new public health insurance with {{answers.variantData.name}}.Renders differently per variant:
Apply for your new public health insurance with AOK.
Apply for your new public health insurance with TK.
Apply for your new public health insurance with Barmer.
Use in rule comparison values
Section titled “Use in rule comparison values”Constants can also be referenced inside rule comparison values:
{{constants.privateHealthInsuranceThreshold}}This lets you compare against a dynamic value instead of hardcoding a number. If the threshold changes, you only update the constant — all rules using it update automatically.
Where interpolations work
Section titled “Where interpolations work”| Field | Works? | Notes |
|---|---|---|
screen.question |
Yes | Main question title |
screen.description |
Yes | Description below the title |
screen.continueButtonText |
Yes | Submit button text |
| Blocker/success text | Yes | Screen text on standalone layouts |
props.mapValue labels |
Yes | Radio/checkbox option labels |
| Rule comparison values | Yes | Dynamic thresholds in rules |
| Quote-page content | Yes | Text in quote-page components |
Common patterns
Section titled “Common patterns”Region-aware questionnaires
Section titled “Region-aware questionnaires”For multi-region questionnaires (e.g., expat insurance available in DE, ES, FR):
- Add a
regionquestion early in the flow (typically aCOUNTRY_SINGLEtype) - Use
{{regionName}}in subsequent questions to personalize the text - The framework resolves
regionNamefrom the selected region automatically
Shared thresholds
Section titled “Shared thresholds”Instead of hardcoding financial thresholds that change yearly:
- Define them as constants in the questionnaire metadata (or rely on shared config)
- Reference them with
{{constants.threshold}}or{{threshold}} - When the value changes, update the constant once — all references update
See also
Section titled “See also”- Translation System — how
t()andinterpolate()work under the hood - Questionnaire Metadata — where to define constants
- Configure Rules — using constants in rule values
- Syncing & Previewing — previewing interpolated content