flowStart

abstract suspend fun flowStart(name: String, flowEntryPoint: String? = null, metadata: Map<String, String> = emptyMap(), cleanupPolicy: CleanupPolicy = OnTimeout(duration = Duration.ofDays(7))): Result<Long>

Begin a new flow.

Return

Wide event ID used for subsequent calls.

Parameters

name

Stable flow name (e.g., "subscription_purchase").

flowEntryPoint

Optional identifier of the flow entry point (e.g., "app_settings")

metadata

Optional metadata (e.g., "free_trial_eligible=true").

cleanupPolicy

Strategy for dealing with abandoned events, see CleanupPolicy for details.