Plan Onboarding Prefill
Pre-fill or skip onboarding survey questions for personalized plans. All fields are optional: only the provided fields are prefilled and their screens skipped. If every answer is provided for a goal-based plan, the user goes straight to the results. Applies to: Plan Onboarding only (route "plan-onboarding").
Availability: use createCustomComponentView with route: "plan-onboarding" (Swift, Kotlin, Flutter), or load https://ai.kinestex.com/plan-onboarding in the iframe (HTML/JS). The React Native and React SDKs have no integration option for this route.
| Parameter | Type | Accepted values | Description |
| route | string | "plan-onboarding" | Must be "plan-onboarding" for this feature to work |
| planOnboardingPrefill | object | see the fields below | Object with the prefill values for the survey |
| planOnboardingPrefill.goal | string | "automatic", "lose_weight", "build_muscle", "get_stronger", "stay_active" | The fitness goal. "automatic" runs the assessment-based personalized path (adds the Duration and Assessment steps); the other goals map to fixed goal-based plans and skip the Duration step |
| planOnboardingPrefill.healthIssues | string[] | "None", "High Blood Pressure", "Diabetes", "High Cholesterol", "Insomnia", "Depression" | Pre-selects health issues. The screen is skipped when the array is not empty and goal is prefilled too; otherwise it is shown pre-selected. Pass ["None"] for "no health issues" |
| planOnboardingPrefill.injuries | string[] | "None", "Shoulder", "Wrist", "Knee", "Hip", "Ankle", "Lower back" | Pre-selects injuries. The screen is skipped when the array is not empty and goal and healthIssues are prefilled too; otherwise it is shown pre-selected. Pass ["None"] for "no injuries". An empty array [] counts as unanswered, so the screen is shown |
| planOnboardingPrefill.duration | number | 15, 30, 60, 90 | Preferred workout duration in minutes. Only used on the "automatic" goal path |
| planOnboardingPrefill.lifestyle | string | "Sedentary", "Lightly active", "Moderately active", "Very active" | Activity level (capitalized with spaces: this screen's vocabulary differs from the top-level lifestyle parameter) |
| planOnboardingPrefill.assessmentOnly | boolean | true / false | When true, every survey screen (goal, health issues, injuries, duration, lifestyle) is skipped and the user lands on the fitness assessment. A previously stored plan ID is cleared, so a fresh personalized plan is generated after the assessment. All other prefill fields are ignored when this is set |
Gotcha: answers the user already gave in an in-progress onboarding session cached on the device take precedence over prefill values, field by field.
`assessmentOnly` use case: reassessment flows, when the user already has a profile (goal, lifestyle, ...) in your app and you only want a fresh fitness assessment to regenerate the personalized plan. Do not combine it with the other prefill fields; they are ignored.
`remind_me_later_clicked` event: when the user taps "Remind me later" on the Assessment screen of the plan-onboarding flow, the SDK posts remind_me_later_clicked so your app can dismiss the SDK and schedule a follow-up. It is only sent from the plan-onboarding page.
1kinestex.createCustomComponentView(
2 route: "plan-onboarding",
3 user: nil,
4 style: nil,
5 isLoading: $isLoading,
6 customParams: [
7 "planOnboardingPrefill": [
8 "goal": "lose_weight",
9 "healthIssues": ["High Blood Pressure"],
10 "injuries": ["None"],
11 "duration": 30,
12 "lifestyle": "Sedentary"
13 ] as [String: Any]
14 ],
15 onMessageReceived: { message in /* ... */ }
16)
17
18// Reassessment-only flow (skips the whole survey):
19// customParams: ["planOnboardingPrefill": ["assessmentOnly": true]]