Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ These distinctions help set expectations when evaluating AiLoom for a support wo

| Area | Available today | Not included today |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Widget content | Safe Markdown, citations, fixed yes/no handoff controls, optional email capture, feedback, and CSAT form | Generic message cards, carousels, model-defined quick replies, and configurable form schemas |
| Widget content | Safe Markdown, citations, handoff controls, optional email capture, feedback, CSAT, and admin-authored welcome cards/carousels, quick replies, and bounded forms | Model-generated cards, carousels, and actions inside assistant messages |
| Knowledge gaps | Ranked repeat-wording report for low/no-retrieval widget escalations, with bot/date filters, daily counts, example conversations, and links to knowledge review and corrections | Semantic topic clustering and scheduled gap digests |
| Agent operations | Shared inbox, manual assignment/release, priority, notifications, live replies, and historical first-response metrics | Rule-based auto-routing, agent availability/presence, load balancing, SLA targets, timers, and breach escalation |

Expand All @@ -150,6 +150,13 @@ group. This is exact repeat-wording grouping, not semantic clustering. Admins ca
conversation, test retrieval, review existing corrections, and open the bot's add-knowledge flow;
customer messages are not copied into a source automatically.

Widget welcome interactions are authored by workspace admins. Card destinations and optional
images must use HTTPS; carousel, quick-reply, and form definitions are bounded and schema-validated.
Quick replies send their configured prompt through the normal visitor-message path. Form answers
are serialized as plain text into that same conversation and are processed by the configured AI
and support team, so admins should not request passwords, payment details, or other sensitive
information. The model cannot define or trigger widget actions.

## A support workflow, step by step

The screenshots and recordings use synthetic demo data. Each step shows what an operator or
Expand Down
32 changes: 32 additions & 0 deletions apps/admin/src/features/bots/bots.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { BotCreateForm } from './components/bot-create-form';
import { BotGeneralForm } from './components/bot-general-form';
import { BotInstall } from './components/bot-install';
import { BotInstructions } from './components/bot-instructions';
import { BotInteractionsForm } from './components/bot-interactions-form';
import { BotModelForm } from './components/bot-model-form';
import { BotsList } from './components/bots-list';
import { buildEmbedSnippet } from './embed-snippet';
Expand Down Expand Up @@ -78,6 +79,7 @@ const BOT: BotDto = {
avatarUrl: null,
privacyUrl: null,
},
widgetInteractions: { cards: [], quickReplies: [], form: null },
createdAt: '2026-01-01T00:00:00Z',
updatedAt: '2026-01-01T00:00:00Z',
};
Expand Down Expand Up @@ -150,6 +152,36 @@ describe('BotAppearanceForm', () => {
});
});

describe('BotInteractionsForm', () => {
it('lets admins configure a fixed quick reply and saves its exact prompt', async () => {
const calls = mockApi(botRoutes());
renderWithQuery(asRole(ADMIN, <BotInteractionsForm workspaceId={WS} botId={BOT_ID} />));

await screen.findByRole('heading', { name: 'Welcome interactions' });
await userEvent.click(screen.getByRole('button', { name: 'Add quick reply' }));
await userEvent.type(screen.getByLabelText('Button label'), 'Track an order');
await userEvent.type(screen.getByLabelText('Message sent'), 'Where is my order?');
await userEvent.click(screen.getByRole('button', { name: 'Save interactions' }));

await screen.findByText('Saved.');
expect(calls.find((call) => call.method === 'PATCH')?.body).toMatchObject({
widgetInteractions: {
cards: [],
quickReplies: [{ label: 'Track an order', prompt: 'Where is my order?' }],
form: null,
},
});
});

it('keeps the editor read-only for agents', async () => {
mockApi(botRoutes());
renderWithQuery(asRole(AGENT, <BotInteractionsForm workspaceId={WS} botId={BOT_ID} />));

const add = await screen.findByRole('button', { name: 'Add card' });
expect(add).toBeDisabled();
});
});

describe('BotModelForm', () => {
const modelRoutes = (): Record<string, [number, unknown?]> => ({
...botRoutes(),
Expand Down
Loading