What This Table Is

The kb_knowledge table stores published knowledge articles that have gone through the knowledge workflow process. This is the primary table for knowledge articles that end users can search and view through the Service Portal or platform UI. Each record represents a specific version of a knowledge article that has reached published status.

This table is owned by the Knowledge Management module and supports the entire knowledge lifecycle from authoring through retirement. Articles flow through states like draft, review, published, and retired, with complex approval workflows determining transitions. The table integrates heavily with search functionality, categorization systems, and content management workflows.

The kb_knowledge table extends kb_knowledge_base and has relationships with kb_category for organization and sys_attachment for embedded content. Unlike most ServiceNow tables, knowledge articles maintain version history through related tables, making the data model more complex than typical records.

Large enterprises typically see 10,000-100,000+ knowledge articles with heavy read activity but relatively light write volume. The table performs well for searches when properly indexed, but complex queries across workflow states or deep category hierarchies can be expensive. Search performance often depends more on the search engine configuration than direct table queries.

When You'll Script Against This Table

You'll script against kb_knowledge primarily in Business Rules that react to knowledge workflow changes, Script Includes that power custom search functionality, and Scheduled Jobs that handle bulk operations like retirement or content updates. Portal widgets and Service Portal pages frequently query this table to display relevant articles to users based on their requests or browsing context.

Access is controlled by knowledge role for basic read access and knowledge_admin for administrative functions. The table has complex ACLs that consider both role-based and attribute-based access, including user criteria fields that can restrict visibility to specific user groups or departments.

Common scripting patterns:

  • Workflow automation that updates article states based on approval outcomes or scheduled retirement dates
  • Custom search implementations that filter by category, user criteria, or content relevance
  • Integration scripts that sync knowledge content with external systems or export for reporting
  • Analytics and reporting on knowledge usage patterns, article effectiveness, and content gaps
  • Automated content management like bulk categorization, metadata updates, or quality scoring
  • Portal customizations that surface contextual knowledge based on incident types or user roles
  • Maintenance routines that handle article lifecycle events like scheduled reviews or retirement

Table Gotchas

⚠️

The kb_knowledge table only contains published articles. Draft articles exist in workflow tables or as unpublished versions — don't assume all knowledge content lives here.

⚠️

The workflow_state field uses specific values like 'published', 'retired', 'review' — never assume simple active/inactive boolean logic. Always check valid states before querying.

  • The valid_to field can be empty but still represent an active article — check both workflow_state and dates for accurate filtering
  • Category references use kb_category which can be hierarchical — simple category queries may miss articles in subcategories
⚠️

User criteria fields restrict article visibility beyond role-based ACLs. Your script may have admin access but still not see all articles if user criteria don't match.

  • The text field contains HTML and can be large — avoid loading it in list queries or aggregations for performance
  • Version management is complex — multiple articles can have the same number but different versions, making unique identification tricky
Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

The kb_knowledge table extends kb_knowledge_base, which provides the foundational knowledge base structure and configuration. This parent relationship means each article belongs to a specific knowledge base that defines its workflow, approval processes, and visibility rules.

The most commonly joined tables are kb_category for organizational hierarchy, sys_user for author and ownership information, sys_attachment for embedded media and files, and kb_use for usage tracking and analytics.

Developers frequently query across these relationships to build comprehensive knowledge management features — filtering articles by category hierarchy, checking author permissions, including attachment metadata in search results, or analyzing usage patterns. The m2m_kb_category_knowledge many-to-many table enables articles to belong to multiple categories, which is essential for cross-functional knowledge organization.