Use LiquidJS templates
Some survey integrations let you define a LiquidJS template that NEXT renders before the imported free-text response. This is useful when you want NEXT AI to see extra context such as score, survey type, device, or respondent metadata directly above the comment.
The rendered template is prepended to the imported text with a blank line in between. If the template is empty or cannot be rendered, NEXT imports the original text as-is.
Common syntax
These LiquidJS patterns are useful in subscription text templates:
- Output a field:
{{ score }} - Output a nested field:
{{ end_user.email }} - Combine text and fields:
NPS: {{ score }} | Segment: {{ end_user.properties.edition }} - Default a missing value:
{{ end_user.properties.platform | default: "unknown" }} - Conditional text:
{% if score >= 9 %}Promoter{% elsif score >= 7 %}Passive{% else %}Detractor{% endif %}
Tips
- Keep the template short. It should add context, not bury the original comment.
- Use the provider page to find the exact field names available in that integration.
- If a field is sometimes missing, use
defaultor a conditional block. - Test with one or two real responses first to confirm the provider payload shape matches your template.