Skip to content

Attributes and recall

Typed facts about the user that logic, text and visibility rules can read. They are read-only: a respondent cannot change them.

Declare and send

Declare each attribute on the form. Anything you do not declare is dropped, so a URL cannot add names. Values are coerced to the declared type; an invalid value falls back to the default.

json
{
  "attributes": [
    { "name": "plan", "type": "text", "default": "free" },
    { "name": "first_name", "type": "text" },
    { "name": "seats", "type": "number" },
    { "name": "is_admin", "type": "boolean", "default": false }
  ]
}

Send them as attrs.<key> URL parameters (the mobile and Embed SDKs build these from their attributes option), in the attributes object of the decide call, or from a profile lookup. The profile lookup wins over the URL.

text
https://forms.example.com/embed/app-onboarding?uid=u_42&uid_sig=9f2c...&attrs.plan=pro&attrs.first_name=Maya

Recall in text

WriteShows
{attr.first_name}Maya, or nothing when unknown
{{attr.first_name|there}}Maya, or there when empty
{{ attr.plan | free }}Spaces are fine
{company|your team}Fallbacks work for answers and variables too

Recall works in labels, descriptions, help text, endings, redirect addresses and notification text. Values are escaped for where they are shown.

Logic and visibility

Use condition source kind attribute anywhere a condition goes: logic rules, visibleWhen of a field, section, option (choices[].visibleWhen) and an ending's when. In expressions and calculations the root is attr, for example attr.seats * 10.

json
{ "id": "admin_q", "type": "single_choice", "label": "What will you set up first?",
  "visibleWhen": { "type": "condition", "source": { "kind": "attribute", "name": "is_admin" }, "operator": "eq", "value": true },
  "choices": [
    { "id": "team", "label": "Invite my team" },
    { "id": "sso", "label": "Single sign-on", "visibleWhen": { "type": "condition", "source": { "kind": "attribute", "name": "plan" }, "operator": "eq", "value": "enterprise" } }
  ] }

Publishing warns about conditions that read an undeclared attribute.

Skip if known

Set skipIfKnown: true on a field to skip it when prefill, a profile lookup or an attribute with the same name as the field id gives a value the field accepts. Use { "attribute": "first_name" } to read a differently named attribute. The question is not shown, the value counts as answered for required checks and logic, and it is stored with the response with source profile. The server applies the known value even if a client sent something else.

Stored on the response

The submission keeps the attributes, the list of fields answered from the profile, the AI follow-up questions that were asked and the AI categories.