Widget configuration
The WidgetConfig schema: identity rules, routing, features, theme, and AI behavior.
Configure widgets in Settings → Integrations → Web Widget (or via the admin API). A widget config looks like:
interface WidgetConfig {
id: string; // wgt_…
workspaceId: string; // ws_…
name: string;
enabled: boolean;
allowedOrigins: string[]; // e.g. ["https://app.customer.com", "https://*.customer.com"]
identity: {
anonymousAllowed: boolean;
jwtRequiredForIdentifiedUsers: boolean;
allowAnonymousToIdentifiedMerge: boolean;
};
routing: {
defaultTeamId?: string;
assignmentStrategy?: "platform_default" | "round_robin" | "least_busy";
};
features: {
conversations: boolean;
attachments: boolean;
knowledgeBase: boolean;
aiAnswers: boolean;
ticketForms: boolean;
customLauncher: boolean;
};
theme: ThemeConfig;
launcher: LauncherConfig;
forms: { visibleFormIds: string[] };
knowledgeBase: { enabledCollectionIds?: string[] };
ai: {
enabled: boolean;
mode: "answer_first" | "suggest_articles" | "human_first";
escalationBehavior: "attach_context" | "summary_only" | "none";
};
}allowedOrigins supports exact origins and single‑level subdomain wildcards
(https://*.customer.com).