Skip to main content
Event-triggered interviews and synced audience prompts show an in-app popup before opening the interview. By default, UserJourneysInterviewHost renders that prompt for you.
AppRoot.tsx
<UserJourneysInterviewHost client={interviews} />
The prompt appears when a configured tracked event or synced audience match creates a pending invite. Accepting the prompt starts the invite. Dismissing it clears the invite without opening the interview.

Customize copy

Prompt copy is configured on the Study Launch Rule in UserJourneys. The app does not need a release when the prompt title, body, primary action label, or dismiss label changes.

Render your own prompt

Use useUserJourneysInterviews when you need a custom native prompt component. Disable the built-in host prompt so the app does not render two prompts.
import {
  UserJourneysInterviewHost,
  useUserJourneysInterviews,
} from "@userjourneys/interviews-react-native";

export function InterviewInviteSheet() {
  const { pendingInvite } = useUserJourneysInterviews(interviews);

  if (pendingInvite == null) return null;

  return (
    <InviteSheet
      title={pendingInvite.prompt?.title}
      message={pendingInvite.prompt?.body}
      startLabel={pendingInvite.prompt?.primary_action_label}
      dismissLabel={pendingInvite.prompt?.dismiss_label}
      onDismiss={() => interviews.dismissPendingInvite()}
      onStart={() => void interviews.startPendingInvite()}
    />
  );
}

export function AppRoot() {
  return (
    <>
      <AppNavigator />
      <InterviewInviteSheet />
      <UserJourneysInterviewHost client={interviews} showPrompt={false} />
    </>
  );
}
The prompt fields map directly to the Study Launch Rule fields you set in the dashboard: title is the rule’s title, message is its body, startLabel is its primary action label, and dismissLabel is its dismiss label, so changing the dashboard copy updates your custom prompt without an app release. Keep UserJourneysInterviewHost mounted once near the app root. The prompt only controls whether a pending invite starts; the host owns the full-screen WebView after the invite starts. A Study Launch Rule can use either the SDK prompt surface or the direct_link surface. A direct_link rule makes the study available without showing a prompt card at all, so no pending invite is created and neither the built-in nor a custom prompt renders. Use direct_link when you drive the user into the interview yourself — for example from your own in-app entry point — instead of asking the SDK to show an in-app prompt. HTTPS invite links open from a user tap in Intercom, email, push, or another channel. Because the user already selected the invite, handleUserJourneysLink resolves the link and opens the in-app WebView or browser fallback directly.