Build

Workflow

When to use workflows and how they start.

Overview

Workflow guidance is integrated into the standard chat bubble, giving you step-by-step activation work, visible progress, and explicit handoff to the user.

When To Use It

Unified experience

Workflows feel like a guided checklist inside the same AI bubble that supports freeform help.

Runtime Contract

To avoid replaying completed flows, pass stable user identity and eligibility fields into the provider.

tsx
import {
  ModelNexProvider,
  ModelNexChatBubble,
} from '@modelnex/sdk'

function AppShell() {
  return (
    <ModelNexProvider
      websiteId="your-website-id"
      userProfile={{
        userId: currentUser.id,
        type: currentUser.role,
        isNewUser: currentUser.isNewUser,
        features: currentUser.enabledFeatures,
      }}
    >
      <Routes />
      <ModelNexChatBubble appName="My Product" />
    </ModelNexProvider>
  )
}
Supported auto-matched triggers

first_visit matches when userProfile.isNewUser === true.

return_visit matches when userProfile.isNewUser === false.

feature_unlocked matches when the flow featureKey is present in userProfile.features or userProfile.tourFacts.features.

Resilience and Refreshes

ModelNex is designed to be resilient to page transitions and refreshes that occur during a workflow.

Start Behavior

Choose a start behavior that matches how interruptive the workflow should be.

For most production workflows, prompt_only is the safest default because it respects user timing without hiding the activation path.

Prompt-only behavior

Customer-facing prompt_only activations now surface inside the chat bubble as a plain-language ask.

Blocking modals are reserved for review and preview flows that explicitly request modal presentation.

Testing

Test workflows deterministically with ?modelnex_test_workflow=FLOW_ID against staging environments that mirror production auth, flags, and routing.

Continue with Workflow Authoring, then Workflow Preview and Publish.

View all guides Previous: Portal Configuration Next: Author Workflows