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 step-by-step 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.

always stays eligible regardless of whether the user has already seen or dismissed the flow.

Resilience and Refreshes

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

Start Behavior

Experiences with matching triggers now start immediately by default.

Use the manual trigger, labeled "Manual or Search" in Portal, for flows that should only launch from an explicit action such as a button click, checklist item, or chat bubble search/conversation flow.

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