Before you startYou need:
- A FlowPilot workspace.
- An app inside that workspace.
- An SDK API key for that app.
- The SDK installed in your Expo app, with its peer dependencies and the Reanimated Babel plugin.
- A placement key (for example
onboarding) with a published flow attached.
Steps
Configure at launch
Call
FlowPilot.configure(...) once, as early as possible, with your API key and App ID. See Configuration for every option.Present a placement
Pick the path that fits how you present UI.
- Imperative (modal)
- Declarative (component)
presentPlacement opens a full-screen modal and resolves a promise with the outcome once the user finishes or dismisses. It never throws for predictable failures, it returns an error outcome instead.Read the result
Both paths hand you a result with an See Results and outcomes for the full shape and how to read final variables and experiment assignments.
outcome of 'completed', 'dismissed', or 'error'. Switch on it to decide what to do next.Common mistakes
- Using a dashboard token instead of an SDK API key. The SDK authenticates with an SDK key that starts with
fp_. Your dashboard login will not work. Create an SDK key in app settings. - App ID mismatch. The
appIdyou configure must own the placement, or the resolve returns no flow. - Placement key typo, paused placement, or no flow attached. The key in code must match the placement key exactly, the placement must be active, and a published flow must be attached.
- Forgetting to publish. A draft flow is never served. Publish a version and attach it to the placement.
- Calling
presentPlacementbeforeconfigure. It throwsSDK_NOT_INITIALIZED(surfaced as anerroroutcome). Configure first.
Troubleshooting
Nothing appears? Walk this checklist:- Is the API key an SDK key (it starts with
fp_) and valid for the environment you configured? - Is the App ID the one that owns the placement?
- Is the placement active (not paused) and targeting your platform?
- Is a published flow version attached to the placement?
- Is the placement key in your code an exact match?
- Is the device online? If it may be offline, configure caching or a bundled fallback.
logLevel: 'debug' in configure to see each resolve and why a flow was rejected. Still stuck? See Troubleshooting.