There are two ways to programmatically mark a step within a Flow as completed via the SDK:

  1. Use the completionCriteria property on a step to automatically mark the step as completed when a user meets the criteria.
- id: example-step
  stepName: Example step
  completionCriteria: == true
  1. Call the markStepCompleted method from the useFlows hook in the SDK.
import { useFlows } from '@frigade/react';

const { markStepCompleted } = useFlows();

markStepCompleted('flow_1A23BC45D', 'example-step');

Additional Methods

You can also mark steps completed in your backend via the flowResponses endpoint and/or our Javascript SDK.