Skip to content

Flow Name: Add Case to Article

Last Updated: 2024-06-19 Source Code: Add_Case_to_Article.flow-meta.xml

API Name: Add_Case_to_Article Status: Active Type: Standard Trigger: Manual/screen flow invocation from Case records

Business Purpose

This interactive flow allows users to associate existing Cases with relevant Knowledge Articles by providing a user-friendly interface for selecting Knowledge Articles. It creates the CaseArticle relationship to link customer support issues with knowledge resources, enabling better case resolution tracking and knowledge base effectiveness measurement.

Process Flow

  1. Case Lookup: Retrieves details of the Case based on the provided recordId input parameter
  2. Selection Screen: Displays an interactive form with two lookup fields:
  3. Case Selection: Dynamic picklist showing available Cases (pre-populated with current case, sorted by creation date)
  4. Article Selection: Dynamic picklist showing published Knowledge Articles only (sorted by creation date)
  5. Relationship Creation: Creates a CaseArticle record linking the selected Case and Knowledge Article
  6. Completion: Flow ends after successful creation of the association
📊 Click to view Process Flow Diagram
flowchart TD
    Start([Start: Screen Flow<br/>Launched from Case]) --> GetCase[Get Case Details<br/>using recordId input]

    GetCase --> Screen[Display Selection Screen:<br/>• Case Lookup (pre-populated,<br/>  sorted by date)<br/>• Article Lookup (published only,<br/>  sorted by date)]

    Screen --> UserSelect[User Selects:<br/>• Case<br/>• Knowledge Article]

    UserSelect --> Create[Create CaseArticle Record<br/>linking selected Case and Article]

    Create --> End([End])

    style Start fill:#e1f5ff
    style GetCase fill:#f0e1ff
    style Screen fill:#fff4e1
    style UserSelect fill:#e1ffe1
    style Create fill:#ffe1e1
    style End fill:#e1f5ff

Key Business Rules

  • Requires both Case and Article selections before proceeding
  • Case field defaults to the current Case when launched from a case record
  • Only shows published Knowledge Articles (PublishStatus = "Online")
  • Uses dynamic lookups that refresh based on current data
  • Creates standard Salesforce CaseArticle junction object record

Dependencies

  • Case standard object
  • Knowledge__kav (Knowledge Article Version) object
  • KnowledgeArticleVersion object with PublishStatus field
  • CaseArticle standard object
  • Screen flow capability for user interface
  • Input parameter: recordId (Case ID)

⚠️ Pre-Go-Live Concerns

CRITICAL - Fix Before Go-Live

  • Error Handling: No validation if CaseArticle creation fails or if duplicate relationships exist
  • Permissions: No check if user has necessary permissions to create CaseArticle records

HIGH - Address Soon After Go-Live

  • User Experience: No confirmation message after successful association
  • Duplicate Prevention: Could create multiple CaseArticle records for same Case-Article combination

MEDIUM - Future Enhancement

  • Search Functionality: Lookups show all records - could benefit from search/filtering capabilities especially for large knowledge bases
  • Bulk Operations: Only handles single Case-Article association per execution

LOW - Monitor

  • Performance: Dynamic choice sets load all published articles - monitor for performance with large knowledge bases
  • Sort Logic: Articles sorted by creation date may not be most relevant for case association

Maintenance Notes

Complexity: Low - Standard screen flow with simple data operations. Review annually to ensure lookup performance remains acceptable as knowledge base grows. Consider adding search capabilities and duplicate prevention if user feedback indicates issues with large data volumes.