# Knowledge base & forms

> Let users search your knowledge base and submit ticket forms without leaving your app.

Source: https://docs.useclad.ai/knowledge-base-forms

---

```ts
const articles = await chat.searchArticles("how do I update billing");
await chat.showArticle(articles[0].id);

await chat.showTicketForm("contact", {
  prefill: { summary: "Cannot log in", severity: "high" },
});
```

- `searchArticles` returns only **published**, end‑user‑visible articles.
- Submitting a ticket form creates a conversation in your inbox and emits
  [`form:submitted`](#events). Unknown prefill fields are ignored.

<div class="img-ph">
  <span class="img-ph__badge">📷 Screenshot needed</span>
  <p class="img-ph__title">Knowledge base in the widget</p>
  <p class="img-ph__desc">The widget showing <strong>knowledge base search results</strong> (and/or an open article), so users can see they can self‑serve answers without leaving your app.</p>
</div>

<div class="img-ph">
  <span class="img-ph__badge">📷 Screenshot needed</span>
  <p class="img-ph__title">A ticket form in the widget</p>
  <p class="img-ph__desc">The widget showing an <strong>embedded ticket form</strong> with a couple of fields, to illustrate submitting an async request from inside the messenger.</p>
</div>
