# How does Knowledge article versioning manage content updates and historical audits?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Versioning, Content Lifecycle

Read it on the site: https://www.forcechallenges.com/interview-questions/how-does-knowledge-article-versioning-manage-content-updates-and-historical-audits

## Answer

**Basics:** Knowledge keeps one master article (`KnowledgeArticleId`) with many versions (each a record with its own Id and `VersionNumber`). Customers always see the online version, so authors can safely revise a draft without affecting live content. This is what lets teams audit what a customer saw at a given date.

**How it works:** Create article (Draft) > Publish (Online, version 1) > Edit (creates Draft version 2 while version 1 stays online) > Publish (version 2 online, version 1 archived). At publish you can choose to publish as a new version or as a minor edit, which overwrites. Only one online and one draft version exist per language per article. Archived versions can be restored to draft. Cases attach to the master article via `CaseArticle`, so they follow whichever version is online.

**Advanced / deep dive:** Treat the master Id as the stable identity (for links, case associations, vote stats) and the version Id as volatile. Field history tracking and article audit fields support compliance reviews, while approvals can enforce a review before each publish. Translations are separate versions per language with their own lifecycle; updating the master language usually marks translations outdated. Use scheduled publication and expiration dates so content ages out. When integrating externally, always query `PublishStatus = 'Online'` for customer content and use `VersionNumber` for audits. Archived article storage counts against data storage, so purge old archived versions only if your retention policy allows. Restoring and editing live articles are exposed through `KbManagement.PublishingService`.

**Code / config example:**
```sql
-- Full version history of one master article
SELECT Id, VersionNumber, PublishStatus, Title, LastPublishedDate
FROM Knowledge__kav
WHERE KnowledgeArticleId = :masterId
  AND PublishStatus IN ('Online','Draft','Archived')
  AND Language = 'en_US'
ORDER BY VersionNumber DESC
```

**Hidden gotchas & must-remember points:**
- KnowledgeArticleId (master) and Id (version) are different; CaseArticle uses the master.
- A minor edit publish overwrites the current version and does not create history.
- A draft cannot be created while another draft exists; you must finish or discard it.
- Archived versions are not visible to customers or in normal search.
- Queries require a PublishStatus filter.
- Deleting a draft does not affect the online version.

**Best practice:** Publish substantive changes as new versions and reserve minor edits for typos.

---
Source: ForceChallenges · last updated 2026-11-02
