Abuja Digital Studio · Est. 2018
Start a Project
DocsOOnboardBuilding flows
Reference

Building flows

OOnboardorravo.com/docs/oonboard/building-flows

Building flows

Flows are stored as the oob_flow custom post type. Each flow's steps, settings, and post-completion actions live in post_meta on the flow post.

Flow settings

SettingDescription
TitleInternal name (not shown to users)
StatusDraft or Published
Show Progress BarToggle progress indicator
Allow Back NavigationLet users return to previous steps
Require LoginLogged-in users only
Restrict to RoleComma-separated WP role slugs
Completion RedirectURL or page ID for the post-completion redirect

Step types

  • welcome - intro screen with title and copy
  • question - text input, radio, checkbox, or select
  • screen - static content card
  • registration - account creation gate (uses WP's wp_create_user)
  • quiz_branch - route the user to different next steps based on answers
  • completion - thank-you/results screen

PHP API

php// All published flows
$flows = OOB_Flow::get_all( [ 'post_status' => 'publish' ] );

// Single flow
$flow = OOB_Flow::get( $flow_id );

// Steps
$steps = OOB_Flow::get_steps( $flow_id );

// Post-completion actions
$actions = OOB_Flow::get_post_actions( $flow_id );
// keys: assign_role, award_xp, award_badge_id, omailer_list_id, webhook_url, webhook_secret

Admin AJAX endpoints

POST wp_ajax_oob_create_flow      { title }
POST wp_ajax_oob_save_flow        { flow_id, steps, settings, actions }
POST wp_ajax_oob_delete_flow      { flow_id }
POST wp_ajax_oob_duplicate_flow   { flow_id }
POST wp_ajax_oob_get_flow_data    { flow_id }
POST wp_ajax_oob_import_flow      { file }
POST wp_ajax_oob_export_flow      { flow_id }
POST wp_ajax_oob_restore_version  { flow_id, version_id }

All admin AJAX actions verify the oob_admin nonce and manage_options capability.

Building flows · OOnboard Docs | Orravo