Insights
The Insights component embeds the same view a partner sees in the Kaunt Partner Portal — invoice-coding volume, daily proposal trends, per-dimension confidence breakdowns, and per-dimension accuracy — directly into your product. It is meant for end users (bookkeepers, finance staff) who want to understand how much Kaunt has been handling for them and how well it's doing, without giving them access to your partner portal.
It's a read-only view. Confirming proposals, configuring rules, or any other write operations are out of scope; embed the Document AI Feedback Agent alongside if your users also need to shape extraction behaviour.
When to use it
- You want bookkeepers to see what's been handled and how accurately without you building reporting screens.
- You already surface invoices and postings inside your product, and want a single "How is Kaunt doing?" page users can return to.
- You want section-level control over what users see (e.g., hide the daily trend chart in a layout with limited vertical space).
Component identifier
insights
data payload
| Field | Required | Description |
|---|---|---|
userId | yes | Identifier for the end user. Surfaces in audit logs. |
companyName | no | When set, the view is company-scoped: the in-page company picker is hidden and all metrics are for this company. When omitted, the view is tenant-scoped and the user picks a company from a dropdown populated from GET /v1/tenants/{tenantId}/companies. |
sections | no | Per-section visibility flags. Omitted entirely means show every section. Each key defaults to visible; set to false to hide that section. Disabled sections are also rejected at the BFF (403 SectionDisabled), so a partner-disabled section cannot be scraped by tampering with the SPA. |
sections
| Field | Default | Description |
|---|---|---|
counts | shown | Total proposals / postings / invoices headline cards. |
trends | shown | Daily proposal-volume line chart. |
dimensions | shown | Per-dimension confidence breakdown. |
precision | shown | Per-dimension, per-confidence-level accuracy table plus the all-dimensions-correct-at-once block. |
Example: minting a session
Tenant-scoped (with company picker)
Use this shape when one user oversees multiple companies under the same tenant. The picker is populated from analytics and pre-selects the first company; metrics re-fetch as the user switches.
POST /v1/tenants/05ed0ffa-1bf5-4bd1-9970-df7a78a948fe/embedded-components/sessions
Authorization: Bearer <your-kaunt-api-key>
Content-Type: application/json
{
"component": "insights",
"accessMode": "iframe",
"allowedOrigins": ["https://app.partner.com"],
"data": {
"userId": "user-42"
}
}
Company-scoped (no picker)
Use this when the user only deals with one company in your product — typically when the view is embedded on a per-company screen. The picker is hidden and the view loads straight into that company's data.
POST /v1/tenants/05ed0ffa-1bf5-4bd1-9970-df7a78a948fe/embedded-components/sessions
Authorization: Bearer <your-kaunt-api-key>
Content-Type: application/json
{
"component": "insights",
"accessMode": "iframe",
"allowedOrigins": ["https://app.partner.com"],
"data": {
"userId": "user-42",
"companyName": "acme-logistics"
}
}
Custom section selection
Hide sections that don't fit your layout or your audience. The example below renders only the counts strip and accuracy table — useful inside a narrow side panel:
{
"component": "insights",
"accessMode": "iframe",
"allowedOrigins": ["https://app.partner.com"],
"data": {
"userId": "user-42",
"companyName": "acme-logistics",
"sections": {
"trends": false,
"dimensions": false
}
}
}
The response is the standard create-session shape — see the API reference for the full schema.
Recommended placement and size
The Insights component is designed for a main-content area, not a side panel. Minimum recommended size: 640 × 720 px. The accuracy table and confidence breakdown table benefit from horizontal room, and the daily trend chart needs a few hundred pixels of width before it stops being decorative.
If you only have a narrow column to work with, use sections to drop the trend chart and dimension breakdown and keep just counts + accuracy.
What users see
Each section starts with a short, plain-English intro. There is a "How to read this page" expander at the top that defines the vocabulary (invoice, proposal, posting, dimension, confidence, invoice-level vs. line-level) so bookkeepers don't need outside context.
Counts
Three headline numbers for the selected date range:
| Number | Counted at | Meaning |
|---|---|---|
| Proposals | invoice line | Suggestions made for how to code an invoice line. |
| Postings | invoice line | Actual booking entries in the accounting system — whether they came from accepting a proposal or a manual edit. |
| Invoices | whole document | Invoice documents received in the period. One invoice usually produces several proposals and postings. |
Each card includes the timestamp of the most recent record of that type.
Daily proposal trend
A simple line chart of how many proposals (invoice lines) were produced each day. Useful for noticing spikes or unexplained drops.
Confidence breakdown by dimension
For each dimension (Account, Department, Project, …), what share of proposals landed at each confidence level. Calculated at invoice-line level — every line on every invoice in the period counts once per dimension. The Combination row at the bottom is the share where every dimension on the line was at that confidence at once.
| Confidence | Practical meaning |
|---|---|
| High | Confident enough to post automatically. |
| Medium | A bookkeeper should glance at the suggestion. |
| Low | A bookkeeper should review carefully. |
Accuracy
For each dimension and confidence level, how often the suggested value matched what the user actually posted. Compared at invoice-line level — one proposal line vs. the matching posted line.
The All dimensions correct at once card sits below the per-dimension table and shows the stricter rate: how often every dimension on the line matched at the same time. A line scores here only if Account and Department and Project and every other required dimension were all right. Treat this as the "fully automatable" rate; the per-dimension table tells you which fields are dragging it down.
Buckets with fewer than 10 invoice lines render as N/A because the percentage isn't statistically meaningful at that size.
A date-range picker at the top of the page controls the Counts, Trends, and Confidence breakdown sections. Accuracy uses a separate fixed-window selector (Last month / 3 months / 6 months / year) because the underlying metric is rebuilt nightly against the matching period.
Recommended permissions
This component has no per-session permissions yet — anyone with a valid session can see every visible section. If you need to keep certain sections out of a specific role's hands, set them to false in sections when minting the session. The SPA respects the flags and the BFF also enforces them (a disabled section returns 403 SectionDisabled from the API).
Worked example: embedding on a per-company screen
This walkthrough shows the company-scoped variant — the most common embed for partners that already organise their UI by company.
Scene. Acme Logistics has an "Accounting overview" tab on each company's page in their product. They want bookkeepers on that screen to see how Kaunt is doing for that specific company, with no picker (the company is already implied by the URL).
1. Acme's backend mints a session
When the user lands on the company's "Accounting overview" tab, Acme's backend mints a session keyed to the active user and the company:
POST /v1/tenants/05ed0ffa-1bf5-4bd1-9970-df7a78a948fe/embedded-components/sessions
Authorization: Bearer <acme-kaunt-api-key>
Content-Type: application/json
{
"component": "insights",
"accessMode": "iframe",
"allowedOrigins": ["https://app.acme-logistics.com"],
"data": {
"userId": "mira@acme-logistics.com",
"companyName": "acme-logistics-dk"
}
}
Response (truncated):
{
"sessionId": "1130411f-52c3-4a94-b531-cd0c9d15ca7a",
"token": "eyJhbGciOi…",
"url": "https://components.kaunt.com/insights?sessionId=1130411f-…&mode=iframe",
"accessMode": "iframe",
"expiresAt": 1780324435
}
2. Acme's frontend embeds the iframe
Acme renders the iframe and answers kaunt-ready with the JWT — same handshake as every other embedded component. See Iframe Embedding for the wire-level details.
3. Mira sees the data
The view loads straight into Acme-Logistics-DK's data (no picker — the session is company-scoped) for the past 30 days:
- Counts: "2,418 proposals" / "2,394 postings" / "812 invoices" with timestamps under each.
- Trends: a daily volume line chart, peaking on the 15th and 28th (invoicing cycles).
- Confidence breakdown: Account is 78% High / 14% Medium / 8% Low, Department is 62 / 25 / 13, etc. The Combination row reads 54 / 27 / 19 — meaning 54% of invoice lines had every dimension at High confidence simultaneously.
- Accuracy: Account at High confidence is 96.4% accurate over the last month (480 lines), Medium is 81.4%, Low is N/A (only 8 lines). The "All dimensions correct at once" card below shows High at 91.2%, Medium at 67.0%, Low at N/A.
Mira uses this to decide which proposals are safe for her team to accept without review, and which dimensions still need human attention.
Why this matters
Acme did not build a reporting view, charts, accuracy tables, or any of the explanation copy. The only integration code they wrote was the session-create call in step 1 and the iframe + postMessage glue. All four sections, the date-range picker, the glossary, and the company picker (for the tenant-scoped variant) come with the component.