Completion Actions
When a user completes all steps in a flow, OOB_Actions::run() executes the configured post-completion actions.
Available Actions
Assign WordPress Role
php$actions['assign_role'] = 'subscriber'; // any valid WP role slug
Sets the completing user's WP role. Useful for gating content by role after onboarding.
Award XP (OEngage)
php$actions['award_xp'] = 100;
// Calls: oengage_award_xp( $user_id, 100, 'oonboard_completion' )
Requires OEngage (oregister plugin) to be active.
Award Badge (OEngage)
php$actions['award_badge_id'] = 7;
// Calls: oengage_award_badge( $user_id, 7 )
Subscribe to OMailer List
php$actions['omailer_list_id'] = 3;
// Calls: om_subscribe( $email, [ 'list_id' => 3, 'source' => 'oonboard' ] )
Looks up the completing user's email automatically.
Fire Webhook
php$actions['webhook_url'] = 'https://hooks.zapier.com/...';
$actions['webhook_secret'] = 'my_secret';
Sends a signed JSON POST:
json{ "event": "flow_completed", "flow_id": 5, "user_id": 42, "time": 1714089600 }
Signature: X-OOnboard-Signature: <hmac_sha256>
WordPress Action Hook
phpadd_action( 'oob_flow_completed', function( int $flow_id, int $user_id, array $actions ) {
// Custom logic after any flow completes
}, 10, 3 );