Inflow.aiDocs

Optional technical reference. This material is for developers, integration specialists and platform administrators. For the consultant lesson, read the practical guide.

Preserved from source baseline d4587c7c0e073e58c2d430342f65ac55dd701bf4; source/static examples retain their stated scope. They are not new runtime verification or required consultant setup steps.

7. Coding reference — the ISL document model

Read the code as a contract, not an unrestricted script

The complete JSON below is checked against the current schema. The explanatory JSONC sketches retained later in this chapter contain comments/placeholders and are deliberately illustrative; they are not independent schema-qualified imports. Keep ownership fields in the native authoring command, and distinguish the Form structural root from the controls offered in the palette.

Use declared destinations such as ri:reason and the current locals: spelling. Rule/action contracts express effects through native owners; arbitrary executable JavaScript is not part of an ISL document. A complete screen can still depend on published rules, admitted data and current permissions outside that JSON.

Example UIAI-CH07-01 — Read a complete form from root to value destination

Scenario and inputs. Nadia wants to understand what the visual leave form saved. The fictional input fields are Date startDate/endDate and Text reason. The following whole document captures values and required input; it intentionally contains no business-record mutation or manager approval.

Procedure. Read id/version/screenKind/title first, then the declared inputs. Follow the required structural Form root into its child nodes. Each node has a unique ID/type, label and explicit destination. Compare those keys with the native inspector and use current schema validation before asking semantic validation or publication to accept the document. Root business-function ownership is not an extra arbitrary ISL field.

Complete current-schema ISL; static Draft2020-12 validation does not establish live behavior:

{
  "id": "leave-request",
  "version": 1,
  "screenKind": "form",
  "title": "Leave request",
  "inputs": {
    "reason": {
      "type": "Text"
    },
    "startDate": {
      "type": "Date"
    },
    "endDate": {
      "type": "Date"
    }
  },
  "body": [
    {
      "id": "leave-fields",
      "type": "Form",
      "children": [
        {
          "id": "leave-start",
          "type": "Date",
          "label": "First day",
          "bind": "ri:startDate",
          "required": true
        },
        {
          "id": "leave-end",
          "type": "Date",
          "label": "Last day",
          "bind": "ri:endDate",
          "required": true
        },
        {
          "id": "leave-reason",
          "type": "TextArea",
          "label": "Reason",
          "bind": "ri:reason",
          "required": true
        }
      ]
    }
  ]
}

Expected result. The reader can identify which values a user edits and where each is stored in the screen context. Required field behavior is separate from an initially required navigation input and from database persistence. Form is a valid structural type even though it is not inserted as an ordinary palette control.

Failure and recovery. Fix invalid root fields, missing IDs or incompatible declared destinations. Do not assume an old golden fixture is valid under the current closed schema or call a syntactically valid document a completed application. Native server validation/access and actual runtime checks remain necessary boundaries.

Sources. Actual schema, input binding grammar, control registry.

Example UIAI-CH07-02 — Read a rule action without inventing its dependency

Scenario and inputs. The form must call a separately published business rule. Nadia retained that rule's actual key/version and declared argument signature. The object below is an event fragment; it is not a complete screen, a provisioned rule or an authorization grant.

Procedure. Use Automations to select Call a rule and map the declared input record. Inspect actionId, ruleKey, ruleVersion, args and into in the resulting Code. Replace the illustrative rule/version only with admitted actual coordinates. In the native rule-expression grammar, hyphenated keys require the supported bracket form or picker; a JSON ruleKey string does not change that grammar.

{"onSubmit":{"do":[{"action":"runRule","actionId":"submitLeave","ruleKey":"create-new-leave-request","ruleVersion":1,"args":{"record":"${values}"},"into":"locals:result"}]}}

Expected result. The event expresses one deliberate call and a local result destination. The rule's native output and effect contracts determine what happened. A local result value or message is not a generic task completion receipt, and an App Shell's latest-bound page behavior does not alter this ruleVersion requirement.

Failure and recovery. Correct a missing version, mismatched input or denied rule through the actual owner. Preserve unknown outcomes and use native reconciliation instead of generating a new consequential request blindly. Do not replace a refused action with custom client code or a fabricated success value.

Sources. Event-action schema, automation actions, supported triggers.

Everything you build visually is stored as a single JSON document in the screen language (ISL). This is what the Code tab shows and edits. You never have to touch it — but it’s the power-user surface, and it’s useful to understand.

The document

{
  "id": "employee-onboarding",   // stable key
  "version": 1,
  "screenKind": "form",           // "form" | "app-shell" | "dashboard"
  "title": "Employee Onboarding",
  "body": [ /* a tree of nodes */ ],

  // optional roots:
  "inputs":  { /* declared inputs (the Inputs tab) */ },
  "data":    { /* data sources */ },
  "theme":   { /* theme overrides */ },
  "settings": { /* screen settings */ }
}

Nodes

Every component is a node:

{ "id": "amount", "type": "Number", "label": "Amount (USD)", "min": 0 }
  • id — unique within the document.
  • type — one of the vocabulary types (see the Node type reference).
  • props — everything else (label, value, options, width, color, …) — exactly the keys the Properties panel edits.
  • children — an array of nodes, for container types only.

Each type resolves to a category — container, input, display, action, or tracking — which determines how it renders and which properties it has.

Bindings & namespaces

Values can be bound rather than literal, using three namespaces:

  • ri:field — a form/rule input (another field on this interface).
  • locals:name — local state.
  • data.entity.field — a data-model value.

An input control declares where its value is saved via bind (the “Store value in” field), e.g. "bind": "ri:countryCode".

Expressions

Use the native ƒx editor for a declared expression position. Current syntax-version1 documents use the = marker; the wrapped ${…} examples below illustrate the supported older syntax. Do not interpret arbitrary strings inside structured values as expressions. These are node fragments, not whole ISL documents:

{ "type": "Text", "label": "Full name",
  "value": "${ concat(ri:firstName, ' ', ri:lastName) }" }

{ "type": "Section", "visibleWhen": "${ ri:country == 'US' }" }

Expressions have a return type (Text, Number, Boolean, Date, Color, Any), autocompletion, and dependency tracking — all surfaced in the expression editor (§4).

Options & data

  • Fixed options for a Select are a list: "options": [{ "value": "a", "label": "Option A" }].
  • Dynamic data comes through the selected control's supported source/binding editor. A grid source, analytic plan and tracking Bind value are distinct contracts; a shared catalog category does not make every control execute it. Until bound, representative samples are an authoring aid. Published tracking controls do not turn an unbound design seed into a real process/task outcome. Use the control's supported binding and current source/capability contract.

A worked example

The complete leave-input Form in Example UIAI-CH07-01 above declares typed destinations and the required structural root. The App Shell example demonstrates regions and page binding separately. The manager decision form adds actual task submit actions and an explicit captured output contract.

Use the Code tab to inspect and edit the actual current document. Preserve required input/data/action references and the existing draft revision; after a whole-document edit, validate and review the visual tree before publishing. Do not replace an admitted document with an unbound sample merely because the JSON parses.

A Form's body has exactly one structural Form root and a Dashboard exactly one Dashboard root. App Shell pages use their own current contract. The complete examples were statically schema-checked for this documentation; no browser workflow or persistence result is implied.

Editing safely

  • Keep the JSON valid — a malformed document can’t render. Run Validate.
  • ids must be unique.
  • Only container-category nodes may have children.
  • Match a bound value’s type to its target.

For the exhaustive list of every type and its properties, see the Node type reference →

Try “document generation”, “integrations” or “first form”.