Systems and records
Exporting Salesforce Knowledge articles: versions, languages, links
By SourceX Editorial · Reviewed by Noah Loul ·
Short answer
To export Salesforce Knowledge articles, query the Knowledge__kav article version object with Data Loader or the API, one PublishStatus and language at a time, then export data categories, case links and files separately. Published versions are the usual default; archived versions and translations are deliberate choices. Export for Translation is only for translators. Public help content still needs a rights review before it goes into a licensed dataset.
Key takeaways
- Every draft, published version, archived version and translation is its own Knowledge__kav row, tied together by article ID and Article Number.
- Filter each export on one PublishStatus value; since API 47.0 an unfiltered query mixes drafts and archived versions in with published ones.
- Data categories, case links and attached files live in separate objects and need their own exports joined back by ID.
- Salesforce keeps up to ten versions by default plus case-attached ones, so export archived versions before history rolls off.
- Export Articles for Translation is a translator round-trip, not an archive.
- Published help content still needs ownership, privacy and licensing review before it goes into a licensed dataset.
What are you actually exporting when you export Salesforce Knowledge articles?#
You are exporting article version records, not single pages. In Lightning Knowledge every article is a parent record (Knowledge__ka by default) with one or more version records (Knowledge__kav), and each draft, published version, archived version and translation is its own version row with its own ID.
Three identifiers matter. The article ID ties all versions together. The version ID points to one specific version. The Article Number identifies a primary article and all of its translations, so it is not unique per row. A clean export keeps all three, plus the version number and language, so you can rebuild which text was live in which language at a given time.
Lightning Knowledge also replaced Classic article types with record types on one Knowledge object. If your org migrated from Classic, older documentation and scripts that reference article types will not match what you see now, and the record type is the field that tells a How-to article from a FAQ or troubleshooting article.
Which Salesforce export route fits knowledge articles?#
For a complete, queryable copy, use a SOQL export through Data Loader or the API; the translation export and the weekly export each solve narrower problems. The table compares the routes Salesforce documents.
| Route | What you get | Best for | Watch out for |
|---|---|---|---|
| Data Loader or API with SOQL on Knowledge__kav | One CSV row per article version with the fields you select | A full, filterable export of versions, languages and statuses | Without a PublishStatus filter, API 47.0+ returns drafts, published and archived versions together |
| SOQL on Knowledge__DataCategorySelection | One row per article-to-category assignment | Rebuilding the category tree for each article | Categories are separate rows; join on the article version ID |
| SOQL on CaseArticle | One row per case-to-article link | Linking help content to the cases where agents used it | Links point at articles; record the version the case used |
| Export Articles for Translation | A .zip per article type per language pair, from a translation queue | Sending articles to translators and importing translations back | Limited to 50 exports in 24 hours and 15 pending; built for translation, not archiving |
| Data Export Service (weekly export) | Data Export Service output, which Salesforce points to for attachments | A periodic snapshot that covers attachments Data Loader cannot export | Snapshot only; links between files and articles must be rebuilt by ID |
- 01Your work records
- 02Personal details removed
- 03You approve the release
- 04Licensed to AI developers
How do you export Salesforce knowledge articles with Data Loader or SOQL?#
Run one export per question: a versions export from Knowledge__kav, a categories export, and a case-link export, each with an explicit filter. Data Loader runs SOQL against any object your user can read, and Export All adds soft-deleted records; the step-by-step mechanics are in the Data Loader guide linked below.
Filter on a single PublishStatus value per run, as Salesforce recommends. Since API 47.0, a query with no PublishStatus filter returns draft, published and archived versions when Lightning Knowledge is enabled, which silently mixes unreviewed drafts into a dataset. Your export user also needs the View Draft Articles or View Archived Articles permission to see those versions at all.
An illustrative published-version query: SELECT Id, KnowledgeArticleId, ArticleNumber, VersionNumber, Language, Title, UrlName, LastPublishedDate, RecordTypeId FROM Knowledge__kav WHERE PublishStatus = 'Online' AND Language = 'en_US'. Add your org's body fields (often a rich text field such as an answer or resolution field) after checking the names with a describe call, since they differ by org.
For archived versions, Salesforce documents querying by article ID with IsLatestVersion set to false. If you filter articles WITH DATA CATEGORY, the query must also have a WHERE clause on PublishStatus or Id.
- Run 1: Knowledge__kav, PublishStatus = 'Online', every active language
- Run 2: Knowledge__kav, PublishStatus = 'Archived', only if the history matters for your purpose
- Run 3: Knowledge__kav, PublishStatus = 'Draft', usually kept out of any dataset and exported only for an inventory
- Run 4: Knowledge__DataCategorySelection, all rows
- Run 5: CaseArticle, all rows, if case links are in scope
- Run 6: ContentDocumentLink for article IDs, if attached files are in scope
Which article versions should you export: published, draft or archived?#
Export published versions by default, archived versions when the history of what customers were told matters, and drafts only for an inventory. Drafts have not passed your review process, so they can contain wrong answers or internal notes that were never meant to leave the authoring team.
Archived versions are worth a deliberate decision because they are limited. By default Salesforce stores up to ten versions of an article, plus any versions attached to cases, and a case keeps the version it used, flagged as outdated, after a newer one is published. If you want a record of how an answer changed over years, export before older versions roll off.
Field-level history is shorter still. Article history tracking records field updates, publishing events and language versions for up to 18 months, and only from the day tracking was turned on. Treat the version rows themselves as the long-term history and history tracking as a recent audit trail.
How do languages and translations come through in a knowledge article export?#
Each translation is its own version row, so a multilingual export has one row per article, version and language. The primary-language version carries IsMasterLanguage = 1; translations share the Article Number with it, which is how you group them.
Export each language on purpose rather than taking whatever the query returns. Record the language code on every row, keep the primary version next to its translations, and note translations that lag behind the primary version, because a translated answer can describe an older product state.
Export Articles for Translation is a different tool. From a translation queue it exports all or only updated articles and creates a separate .zip file for each article type in each language pair, with limits of 50 exports in 24 hours and 15 pending exports. It is designed to round-trip work to translators, so keep its file structure intact and do not treat it as your archive.
How should data categories and channel visibility be handled?#
Export data categories as their own table and channel visibility as fields on every version row; both decide who an article was written for. Category assignments live in Knowledge__DataCategorySelection records, one row per assignment, which you join back to versions by ID.
Channel visibility tells you the intended audience. Salesforce maps the channels to the internal Knowledge app (App), the public knowledge base (Pkb), the Customer Portal (Csp) and the Partner Portal (Prm), and the version records carry matching visibility flags (for example IsVisibleInApp and IsVisibleInPkb; confirm the exact field names with a describe call in your org). An article visible only in the internal app often contains workarounds, escalation paths or system names that were never published, so it needs a stricter review than public help content.
What happens to images, attachments and case links?#
Rich text bodies, files and case links each need their own export and checks. Inline images in rich text fields are referenced from the HTML, so confirm in a test export whether the image URLs still resolve outside your org before relying on them.
Attached files are linked to records through ContentDocumentLink, one row per file and record, queried by LinkedEntityId. Salesforce states that Data Loader does not support exporting attachments and points to the weekly export for those. Plan a file manifest that maps each file to its article version.
Case links come from CaseArticle, which represents the association between a case and a knowledge article. These rows are what turn a help center into a retrieval or answer-quality dataset: each link records that this article was attached to this case. Export them with the case ID, article ID and the version the case used, then see the companion guide on exporting case history for the case side.
Knowledge article export checklist and manifest row template#
Use this checklist before any export leaves the org, then log each file with the manifest row below. It assumes Lightning Knowledge with default object names; adjust names after a describe call in your org.
| Check | What to export | Where it lives | Done when |
|---|---|---|---|
| Version scope | Published versions; archived and drafts only by decision | Knowledge__kav, PublishStatus | One run per status, row counts match list views |
| Identifiers | Version ID, article ID, Article Number, version number | Knowledge__kav | Every row has all four; no duplicate version IDs |
| Languages | Primary version and each translation | Knowledge__kav, Language and IsMasterLanguage | Each Article Number has one primary row per version |
| Record type | Article record type per version | Knowledge__kav, RecordTypeId | Record type IDs mapped to readable names |
| Data categories | All category assignments | Knowledge__DataCategorySelection | Every category row joins to an exported version |
| Channel visibility | Internal app, public, customer and partner flags | Knowledge__kav visibility fields | Internal-only articles tagged for separate review |
| Images and files | Inline image references and attached files | Rich text HTML; ContentDocumentLink; weekly export | File manifest maps each file to a version ID |
| Case links | Case-to-article links with the version used | CaseArticle | Link count reconciled against a report |
| History | Version history and recent field history | Version rows; article history tracking | Export date recorded against the 10-version and 18-month limits |
What should each manifest row record?#
Write one manifest row per exported file so a reviewer can see exactly what left the org and reproduce it. The values below are illustrative.
| Manifest field | Example value | Why it matters |
|---|---|---|
| File name | kav_online_en_US_2026-10-13.csv | Ties the file to one run |
| Object and filter | Knowledge__kav; PublishStatus = 'Online'; Language = 'en_US' | Shows which versions and language were included |
| API version and tool | Data Loader, API version noted at run time | Default PublishStatus behavior depends on API version |
| Run user and permissions | Integration user; View Draft Articles off | Explains which versions were visible |
| Row count | Count from the tool log | Lets a reviewer reconcile against Salesforce list views |
| Checksum | SHA-256 of the file | Proves the file was not changed later |
| Visibility scope | Public knowledge base articles only | Separates public content from internal-only content |
| Rights note | Employee-written; third-party images removed | Records the licensing review for the file |
Can published help content go into a licensed support dataset?#
Sometimes, but being public does not make help content licensable. Access to export the articles, privacy permission for their contents, ownership of the text and images, and the contractual right to license them are four separate permissions, and each needs its own answer; the full framework is covered in the guide on data privacy and the right to license business records.
Ownership is usually the easiest part for articles employees wrote as part of their jobs: under U.S. copyright law a work made by an employee within the scope of employment is a work made for hire, and the employer is the author. Contractor-written articles, vendor documentation pasted into answers, stock or vendor screenshots, and customer quotes may belong to someone else or come with restrictions.
Privacy and confidentiality review still applies. Screenshots can show customer names or account data, internal-only articles can reveal security or escalation procedures, and case links connect articles to customer records. De-identifying content does not create a right to license it; counsel should review the specific articles and agreements.
If you are weighing whether a knowledge base and its case links could support a data licensing deal, SourceX is the enterprise data transaction layer for AI and runs rights review, contracting, preparation and delivery for businesses licensing operational data. The first step is a short company assessment with no data uploads, and the company approves exactly what is released, once per deal. This guide uses Salesforce's own tools: you or your admin run the exports described here with Data Loader, the API or Setup.
Frequently asked questions
Can Data Loader export Salesforce knowledge articles?
Yes. Data Loader exports records with a SOQL query, so you can export the Knowledge__kav article version object with the fields you select. Filter on one PublishStatus value per run and give the export user the View Draft Articles or View Archived Articles permission if you need those versions. Salesforce states that Data Loader does not support exporting attachments, so files need a separate route.
Why does my knowledge article export include drafts and archived versions?
Since API version 47.0, a query on article versions with no PublishStatus filter returns draft, published and archived versions when Lightning Knowledge is enabled. Add a PublishStatus condition, such as Online for published versions, and run separate exports for each status you need.
How do I export Salesforce knowledge articles with their translations?
Query Knowledge__kav without restricting Language, or run one query per language, and keep the Language, IsMasterLanguage and Article Number fields. Each translation is its own version row, and the Article Number groups a primary article with its translations. Use Export Articles for Translation only when you are sending content to translators.
How do I export the data categories assigned to knowledge articles?
Export the Knowledge__DataCategorySelection object, which holds one row per category assignment, and join it to your article version export by ID. To filter articles by category in SOQL, use WITH DATA CATEGORY together with a WHERE clause on PublishStatus or Id.
How many old versions of a knowledge article does Salesforce keep?
By default Salesforce Knowledge stores up to ten versions of an article, plus any versions attached to cases. If you need a longer history of how answers changed, export archived versions on a schedule before older ones roll off.
Can public help center articles be licensed as AI training data?
Only after the rights are checked. Being published does not grant a right to license; you need to confirm who owns the text and images, remove third-party and customer content you cannot license, and review internal-only articles separately. Counsel should review the specific content and agreements.
Sources
- In Lightning Knowledge the article and article version objects are named Knowledge__ka and Knowledge__kav by default; the KnowledgeArticle record is the parent of every version, the primary version has IsMasterLanguage = 1, translations are also KnowledgeArticleVersion records, and Article Number identifies a primary article and all its translations. Source
- Salesforce recommends filtering Knowledge queries on a single PublishStatus value; in API 47.0 and later, queries without a PublishStatus filter return draft, published and archived articles when Lightning Knowledge is enabled; draft and archived versions need the View Draft Articles and View Archived Articles permissions; archived versions are queried with IsLatestVersion set to false. Source
- A SOQL query on article versions that uses WITH DATA CATEGORY must include a WHERE clause on PublishStatus or Id, and the AT, ABOVE, BELOW and ABOVE_OR_BELOW selectors control which levels of the category hierarchy match. Source
- Knowledge__DataCategorySelection records assign a data category to an article in Lightning Knowledge and are available in API version 39.0 and later. Source
- Salesforce Knowledge channel values map to audiences: App is the internal Knowledge app, Pkb the public knowledge base, Csp the Customer Portal and Prm the Partner Portal. Source
- Export Articles for Translation exports all or only updated articles from a translation queue, creates a separate .zip file for every article type in each language pair, and is limited to 50 exports in 24 hours and 15 pending exports. Source
- By default Salesforce Knowledge stores up to ten versions of an article plus any versions attached to cases, and a case keeps the version it used, flagged as outdated, after a newer version is published. Source
- Knowledge article history tracking records field updates, publishing events and language versions, keeps events for up to 18 months, and only tracks changes made after it is enabled. Source
- Data Loader exports records with SOQL, Export All also returns soft-deleted and archived activity records, and Data Loader does not support exporting attachments (Salesforce suggests the weekly export for those). Source
- The CaseArticle object represents the association between a case and a knowledge article and is available in API version 20.0 and later. Source
- Lightning Knowledge stores articles in a single Knowledge object and uses record types instead of the article types used in Salesforce Classic. Source
- Each ContentDocumentLink links one file (ContentDocument) to one record through its LinkedEntityId field, and queries on it must filter on Id, ContentDocumentId or LinkedEntityId. Source
- Under U.S. copyright law a work created by an employee within the scope of employment is a work made for hire, and the employer is the author. Source
Related resources
See if your company qualifies
A short company assessment. No data uploads are needed.