Plan Context
Pass plan progression context so the SDK associates a directly-launched workout with the correct plan. After the workout finishes, the SDK posts plan_progression_saved (or plan_progression_failed on error). See Plans & Programs events.
| Parameter | Type | Description |
| planId | string | The ID of the plan the workout belongs to |
| planType | string | Type of plan (e.g., goal-based plan type, or "personalized") |
| progressWorkoutId | string | The plan-day workout ID used to record progression |
When to use: Only when you launch a workout directly via the SDK (not through the in-app plan UI) and want it to count toward plan progression. The in-app plan flow handles this automatically — you don't need to pass these fields if the user navigates from the plan dashboard.
Note: If you launch a workout without these fields, it is treated as a standalone session and won't update plan progression.
Plan Context Configuration
1// Pass plan context when launching a workout directly
2kinestex.createWorkoutView(
3 workout: "Day 3 Workout",
4 customParams: [
5 "planId": "plan_abc123",
6 "planType": "personalized",
7 "progressWorkoutId": "plan_day_3"
8 ]
9)