Completing a step

There are two ways to programmatically mark a step as completed:

  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');