Skip to content

docs: process user input from flows (all 7 SDK platforms) - #522

Draft
eandreeva-twr wants to merge 1 commit into
mainfrom
docs/flow-input-data
Draft

docs: process user input from flows (all 7 SDK platforms)#522
eandreeva-twr wants to merge 1 commit into
mainfrom
docs/flow-input-data

Conversation

@eandreeva-twr

@eandreeva-twr eandreeva-twr commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Flows report the values users type and select to the app through the SDK's analytics callback, as a flow_user_input event. This is the second half of the flow analytics work — screen views shipped separately and are already documented on main.

Rebased onto main after the screen-view guides merged, so this now carries only the user-input half: 23 files, additions only.

New articles

"Process data from flows" for iOS, Android, Flutter, React Native, Capacitor, Unity, and Kotlin Multiplatform — added to each Flows & paywalls sidebar right after "Track screen views".

Each covers registering the callback, decoding the payload, the value shape per element type, delivery limitations, and three use cases: registering users on your own backend, enriching the Adapty profile, and segmenting which flow a user sees later.

Two shared reusables hold what is identical across platforms — the element-type/value table and the delivery limitations — so the contract has one home rather than seven. The payload is versioned (version: 1), so a v2 is expected.

Each handling-events article now points at its platform's guide, alongside the screen-view pointer already there.

Per-platform differences worth review

These are the places a copy-paste sweep would have got wrong:

  • KMP decodes twice. It receives the whole envelope as a raw JSON string, so payload is a JSON string nested inside one. Both steps are shown.
  • Capacitor wraps profile paramsupdateProfile({ params: … }) — where React Native passes the object directly.
  • Flutter and Unity order custom-attribute arguments oppositely: setCustomStringAttribute(value, key) vs SetCustomStringAttribute(key, value).

Every API name and signature was verified against the SDK source, not inferred.

Why this is still a draft

The backend transformer change that emits flow_user_input is not merged, and product/privacy approval for sending raw text, email, and phone values to client code with no opt-out is still open. If that review adds an opt-out or trims which fields are sent, the "you don't set anything up in the builder" framing in all seven intros needs reworking. Please don't merge before the transformer ships.

Two things the docs say that reviewers should sanity-check:

  • Flows published before this ships emit nothing until republished. Documented as a prerequisite, since it is the most likely "nothing is happening" report.
  • element_id is not unique across screens; the key is instanceId + element_id.

Verification

check-mdx-parse clean across 5,970 files, lint-mdx OK, check-links --diff 0 broken and 0 stale over 233 links. Every sidebar entry checked to resolve to a real file.

Flows report the values users type and select to the app through the SDK's
analytics callback, as a `flow_user_input` event carrying a JSON-string
payload.

Add "Process data from flows" for all seven SDK platforms, covering how to
register the callback, decode the payload, and what each element type puts
in `value`. Two shared reusables carry the parts that are identical across
platforms: the value-shape table and the delivery limitations.

Point each handling-events article at its platform's new guide, alongside
the screen-view pointer already there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant