Skip to main content
User input: “Create a segment of enterprise users who haven’t logged in for 30 days.”

Step 1: Resolve the criteria

The AI begins by looking up available traits before constructing anything. It doesn’t assume field names. It verifies them first.
Create A Segment, Step 1

The AI scans existing segments and user traits before building the payload

Tool call 1: look up “plan” traits

Tool call 2: look up “last login” traits

The AI uses autocomplete_query to verify real field names before building the payload. It doesn’t guess.

Tool call 3: create the segment shell

The shell is created with no definition — that gets applied in the next call, after the user confirms.
Create A Segment, Tool Call 3

The AI surfaces structured options for ambiguous inputs. The user can select or type a free-text answer

Confirmation panel

Create An Segment, Confirmation Panel

The user sees the full resolved payload before anything executes. Nothing fires until they click Create Segment.

Tool call 4: apply segment definition

Step 2: Test the segment

The wizard advances automatically. At step 2 the wizard prompts: “We’ve created your segment. Let’s test it: do you have a user ID or email in mind?”

Tool call 5: look up user by email

Tool call 6: check membership

The AI responds: john@acme.com is in this segment. Plan: enterprise. Last seen: 45 days ago. Your segment is working correctly.”

Execution summary

6 actions · 1,033ms · 100% success The four reads ran silently. The two writes paused for user confirmation before firing.

What if something fails

Create A Segment, What If Something Fails

Connection errors are handled gracefully. The user can retry or continue without the context

If the segments API times out on load, the wizard surfaces a connection error with two options: Retry, or Continue Anyway. If the user continues, the AI builds the segment from scratch without deduplication checks.