The data behind your charts
This chapter lists the tables you can build a chart from, explains what each one captures, and describes what each column means and what you would use it for.
1. How to read this chapter
When you start a new question, the Pick your starting data list shows the tables described here. Every one of them is scoped to your own organisation: you never see another customer’s rows, whatever you build.
Names appear differently in the picker. This chapter uses the underlying names, in lower case with underscores, because they sort predictably and are easier to search for. The Business Dashboard shows them with spaces and capitals: analytics_documents appears as Analytics Documents, analytics_export_logs as Analytics Export Logs, and so on.
1.1 Three shapes of table, and why it matters
The tables are not all built the same way, and the shape decides what you can ask of them.
This is the most useful thing to know before you build. If a card does not move when you change the Date filter, it is almost always built on an all-time summary table. To get a dated version, rebuild it on the per-record table underneath. Each entry below states which shape it is.
1.2 Columns you will see nearly everywhere
These are described once here rather than in every table.
You may also see a few housekeeping columns, such as synced_at, which records when a row was last refreshed. Build date filters on a business date such as uploaded_at or exported_at, never on synced_at.
1.3 How each entry is laid out
Every table below gives you its shape, its grain (what one row represents), which columns you can filter dates on, and then its columns with their meaning and use.
2. Documents
2.1 analytics_documents
The central table. One row for every document in your queues, carrying its current status, the people who touched it, and the timestamp of each stage it passed through. Most questions can be answered from this table alone, without joining anything.
Shape: per-record · Grain: one row per document · Dates: created_at, uploaded_at, completed_at, exported_at, rejected_at, first_review_at, last_review_at
2.2 analytics_document_counts
A set of headline totals per queue: how many documents you have in total, this month, last month, and how many were removed, duplicated or ended in an exception.
Shape: all-time summary · Grain: one row per queue · Dates: none
The month columns are fixed. This month and last month are calculated from today’s date, not from your Date filter.
2.3 analytics_status_counts
How many documents sit in each status, per queue.
Shape: all-time summary · Grain: one row per queue and status · Dates: none
2.4 analytics_document_actions_by_day
The five headline document actions, counted per day and per queue, each on its own date. A document uploaded on Monday and exported on Friday is counted under Monday in received and under Friday in exported.
Shape: daily · Grain: one row per queue and day · Dates: event_date
2.5 analytics_document_events
Every stage a document can pass through, as a single list of dated events. Because the stage is a column rather than a set of columns, one chart can carry all of them as separate lines.
Shape: daily · Grain: one row per day, stage, queue and model · Dates: event_date
This is usually the table you want for a processing funnel over time, because a single chart can show intake, output and failure together.
2.6 analytics_page_events
The same idea as the table above, counted in pages rather than documents.
Shape: daily · Grain: one row per day, stage, queue and model · Dates: event_date
2.7 analytics_uploads_by_day
Upload volume alone, already broken out by queue, document type and model.
Shape: daily · Grain: one row per day, queue, document type and model · Dates: event_date
3. Extracted fields and accuracy
3.1 analytics_document_fields
Every field value Staple extracted, one row per field per document. This is the largest table you have access to, and it is where the extracted values live, so it is what you use to chart the contents of your documents rather than their processing.
Shape: per-record · Grain: one row per document and field · Dates: uploaded_at, completed_at
Two things to know before you total anything here. Rows where value_kind is json hold a structure rather than a single value, which is how line-item tables are stored, so value_text on those rows is structured data rather than a plain figure. And because there is one row per field, a plain count counts fields, not documents: use Number of distinct values on document_id when you mean documents.
3.2 analytics_document_field_catalog
The list of which fields exist on which queue, without any of the values. Use it to find out what you can chart before you go looking for it.
Shape: all-time summary · Grain: one row per queue and field · Dates: none
3.3 analytics_field_differentials
One row for every field a reviewer looked at, recording what Staple predicted and what the value ended up being. This is the source of every accuracy figure in the product.
Shape: per-record · Grain: one row per field per document reviewed · Dates: created_at
3.4 analytics_accuracy_by_day
Accuracy already worked out per day, model, queue and field.
Shape: daily · Grain: one row per day, model, queue and field · Dates: event_date
Averaging accuracy treats a day with three fields the same as a day with three thousand. Where the difference matters, build the percentage from edited_count and field_count instead.
3.5 analytics_ocr_rework_load
Which fields your reviewers correct most, per queue. This is the table for “where is our manual effort going”.
Shape: all-time summary · Grain: one row per queue and field · Dates: none
3.6 analytics_ocr_rework_summary
The two headline automation figures per queue: what share of documents went through untouched, and how much of what was extracted was kept after review.
Shape: all-time summary · Grain: one row per queue · Dates: none
This table powers the two all-time cards on Staple Dashboard, which is why they do not respond to the Date filter. For a dated version, build on analytics_field_differentials or analytics_accuracy_by_day instead.
4. Processing time
4.1 analytics_process_time_comparison
Average duration per day for three stages of processing.
Shape: daily · Grain: one row per queue, day and stage · Dates: event_date
Every figure in this table is in hours, including the scanning stage, which is why scan times read as small fractions. Multiply by 60 for minutes or 3600 for seconds.
The two value columns overlap rather than add up. none_edit covers all documents and fields_only covers the corrected subset of those same documents.
For a document-weighted average, build it from analytics_documents instead. This table averages each day first, so a day with two documents counts as much as a day with two thousand. Section 2.1 has the timestamps you need.
5. Scanning
5.1 analytics_billing_scan_attempts
Every scan of every document, first scans and rescans together.
Shape: per-record · Grain: one row per scan attempt · Dates: attempt_at
5.2 analytics_rescan_attempts
Rescans only, in more detail than the table above carries.
Shape: per-record · Grain: one row per rescan · Dates: started_at, finished_at
6. Exports
6.1 analytics_export_logs
One row per export attempt, including the attempts that failed. A document exported three times appears three times.
Shape: per-record · Grain: one row per export attempt · Dates: created_at
6.2 analytics_export_fail_reasons
Every reason recorded against a failed export, one row per reason. A document that failed for three reasons appears three times.
Shape: per-record · Grain: one row per document and reason · Dates: exported_at
This is the export failure table to use for a specific period, because it carries a date.
6.3 analytics_export_fail_reason_snapshots
The same information with all of a document’s reasons held together in one row as a list.
Shape: per-record · Grain: one row per document · Dates: exported_at
6.4 analytics_export_failure_reasons
Failure reasons already counted per queue.
Shape: all-time summary · Grain: one row per queue and reason · Dates: none
Quick to use, and covers all time. If you need the breakdown for a period, use 6.2.
6.5 analytics_export_reliability
A two-way split of your documents: those that exported cleanly, and those that failed at least once.
Shape: all-time summary · Grain: one row per queue · Dates: none
6.6 analytics_third_parties
Volume by external system, covering both directions: what each channel brought in, and what each format sent out.
Shape: all-time summary · Grain: one row per queue and system · Dates: none
Inbound and outbound share one column. A row will usually have a figure in imported or in the two export columns, not both, so read the measure you asked for rather than the row as a whole.
7. People and review
7.1 analytics_review_logs
One row every time someone opened a document for review.
Shape: per-record · Grain: one row per review event · Dates: reviewed_at
This is the table to use for review activity over a period, because it is the one that carries a review date.
7.2 analytics_user_activity
A standing scorecard per person per queue: what they have uploaded, what is still open, what they finished, and how quickly.
Shape: all-time summary · Grain: one row per user and queue · Dates: last_login_at only
Every figure except the last login is for all time, so a chart from this table shows lifetime totals whatever the Date filter says. For reviewer activity over a period, use analytics_review_logs.
You may also see analytics_user_activity_refresh and analytics_user_activity_source in the picker. They hold the same columns and rows as this table; use analytics_user_activity.
7.3 analytics_users
The people in your organisation.
Shape: per-record · Grain: one row per user · Dates: last_login_at
7.4 analytics_queue_members
Which people have access to which queues.
Shape: per-record · Grain: one row per user and queue · Dates: none
8. Queues, models and labels
8.1 analytics_queues
Your queues, and how each is configured.
Shape: per-record · Grain: one row per queue · Dates: none
8.2 analytics_models
The extraction models available to you.
Shape: per-record · Grain: one row per model · Dates: none
8.3 analytics_labels
The labels defined in your organisation.
Shape: per-record · Grain: one row per label · Dates: created_at, deleted_at
8.4 analytics_label_assignments
Every time a label was put on a document, and taken off again.
Shape: per-record · Grain: one row per assignment · Dates: tagged_at, untagged_at
8.5 analytics_label_actions
The automated actions your labels trigger.
Shape: per-record · Grain: one row per action · Dates: created_at
9. Integrations
9.1 analytics_webhooks
The webhooks configured in your organisation.
Shape: per-record · Grain: one row per webhook · Dates: created_at
9.2 analytics_webhook_deliveries
Every webhook that fired.
Shape: per-record · Grain: one row per delivery · Dates: delivered_at
To tell integrations apart, use webhook_id or name.
9.3 analytics_concur_reports
Expense reports from SAP Concur, for organisations using that integration.
Shape: per-record · Grain: one row per report · Dates: report_created_at
9.4 analytics_concur_report_status
The same reports with the status codes translated into plain words.
Shape: per-record · Grain: one row per report · Dates: report_date
9.5 analytics_concur_invoices
Invoices from Concur, with their verification and duplicate outcomes.
Shape: per-record · Grain: one row per invoice · Dates: invoice_created_at
10. Value reference
The values you will meet most often when filtering.
Document status (status on analytics_documents)
Ingestion channel (uploaded_from): email, API, UI, plus_email, dropbox, drive, erp, peppol and other connected systems.
Export format (exported_type and export_type): XML, CSV, JSON, TXT, CONCUR, XERO, PEPPOL, SAP4HANA, IRAS, REDACTED_PDF, MATCHING, WEBHOOK.
Document type (doc_type): INVOICE, RECEIPT, PURCHASEORDER, BANKSTAT, PASSPORT, NRIC and the regional invoice variants such as INDIANINVOICE, USINVOICE, EMEAINVOICE, FAPIAOINVOICE. A blank value means the document never reached classification.
11. Good to know
- Only tables with a date column respond to the Date filter. Each entry above states its dates. Where it says Dates: none, the figures cover all time.
- Counting rows is not always counting documents. In
analytics_document_fields,analytics_field_differentials,analytics_export_logsandanalytics_review_logs, one document produces many rows. Use Number of distinct values ondocument_idwhen you mean documents. - Generated documents are excluded from most tables. Documents Staple created rather than you uploading them are left out of most summaries.
analytics_documentskeeps them, flagged bycreated_by_supernova. - Everything here is reachable through the question builder, including calculations, using Custom column and Custom expression. See Building a chart yourself.