LinkedIn
Copied!

Implementing the Add Suggested Article gadget in your application

For release 8.6 and later, this content is moved to the Pega Knowledge Implementation Guide.

Use the Add Suggested Article gadget in your application to link contextual articles that help in resolving a flow or a step in a case, or an entire case. The linked articles provide relevant information related to the case in progress. For example, in a home loan case, a linked article might provide information about current interest rates or eligibility criteria.

This gadget is intended for use in custom platform applications (for example, non-customer service or non-Sales Automation applications). 
  1. Configuring the gadget
  2. Adding suggested articles to each flow of a case
  3. Adding suggested articles to the entire case
  4. Adding the gadget in your application

Configuring the gadget

To use the gadget in your application, configure some application-level settings, and then extend the required rules. You can implement the gadget in your application in two ways:

  • If you add suggested articles to each flow of a case type, the articles change depending on the current flow. 
  • If you add articles to an entire case, the articles remain the same regardless of the current flow. 

Configuring application settings

To enable the gadget, perform the following steps: 

  1. Verify that the following rules are in the application stack. If they are not, then add these rules as described in the Implementing the Pega Knowledge rulesets section of the Pega Knowledge Implementation Guide.
     
    • PegaKM
    • PegaKMDiagnostics
    • PegaKMInt
    • PegaKMToggles
    • KMReports
       

Do not use PegaKM as the built-on application because the Case Management rules present in the KMPortal ruleset will conflict with the Case Management rules.

2. Add the SuggestedArticlesOverRides rule to the additional style sheets in the skin rule of your application.

Adding suggested articles to each flow of a case

To add suggested articles to each flow of a case, extend the required rules.

  1. Extend the SetCurrentFlowActionDetails rule: 
    SetCurrentFlowActionDetails is a data transform that populates the articles that you add to the gadget. This rule has two property Set actions. The first action is automatically populated by the class of the case type for which you configure the gadget, and the second one is the flow name.

     
    • Enter newAssignPage.pxFlowName in the Source field for the flow name. This action dynamically picks up the flow name and shows only those articles in the gadget that are related to that flow. 
      Setting the current flow action name
      Setting the current flow action name
  2. Extend the KMSuggestedArticlesWrapper rule:
    KMSuggestedArticlesWrapper holds data about the suggested articles. In this section, the table is populated from the D-SuggestedArticles data page, which has two parameters: CaseTypeClassName and FlowAction.
     
    • Set the FlowAction parameter value to newAssignPage.pxFlowname, as in the following example:
      Setting the FlowAction parameter value
      Setting the FlowAction parameter value
    •  Optional: If you want the suggested article to open in a separate window:

      a. Remove or hide the second dynamic layout that holds the article, as in the following example:
      Removing a dynamic layout for an article
      Removing a dynamic layout for an article

b. Open the KMSuggestedArticle rule.
c. Open the Actions tab of the link that displays the article title.
d. Remove the Refresh-Other section action, and then add the Launch Harness action.
e. In the Using page field, enter KMSelectedSuggestedArticle.
f. In the Class field, enter PegaFW-KM-Work.
g. In the Harness field, enter DisplaySelectedArticleHarness.

Adding the Launch Harness action
Adding the Launch Harness action

4. Add suggested articles to a case type by extending the SuggestedArticleFlowAction. You can specify this flow action for any section that has access to a case context.

Example: Adding suggested articles to each flow of a case type

The following screens show the result of adding suggested articles to each flow of a case type when the flow differs from stage to stage and requires different articles for each stage. Notice that different suggested articles appear at the Loan request and the Loan approval stages in the loan process. In this example, SuggestedArticleFlowAction is added in pyWorkActionsPerform.

Suggested articles based on the case type flow
Suggested articles based on the case type flow
Suggested articles based on the case type flow
Suggested articles based on the case type flow

Adding suggested articles to an entire case

To add suggested articles to an entire case, extend the required rules:

  1. Extend the SetCurrentFlowActionDetails rule: 
    SetCurrentFlowActionDetails is a data transform that populates the articles that you add to the gadget. This rule has two property Set actions. The first action is automatically populated by the class of the case type for which you configure the gadget, and the second one is the flow name. 

     
    • To configure all flows with the same set of articles, enter the class name of the case type in the Source field, as in the following example:
       
      Adding a class name
      Adding a class name
  2. Extend the KMSuggestedArticlesWrapper rule,
    KMSuggestedArticlesWrapper holds data about the suggested articles. In this section, the table is populated from the D-SuggestedArticles data page, which has two parameters: CaseTypeClassName and FlowAction.
     
    • To display the same articles for the entire case, regardless of the stage, ensure that the FlowAction parameter value is empty, as in the following example:
      Verifying empty FlowAction parameter value
      Verifying empty FlowAction parameter value

3. Optional: If you want the suggested articles to open in a separate window:

a. Remove or hide the second dynamic layout that holds the article, as in the following example:

Removing a dynamic layout for an article
Removing a dynamic layout for an article

b. Open the KMSuggestedArticle rule.
c. Open the Actions tab of the link that displays the article title.
d. Remove the Refresh-Other section action, and then add the Launch Harness action.
e. In the Using page field, enter KMSelectedSuggestedArticle.
f. In the Class field, enter PegaFW-KM-Work.
g. In the Harness field, enter DisplaySelectedArticleHarness.

4. Add suggested articles to a case type by extending the SuggestedArticleFlowAction.
You can specify this flow action for any section that has access to a case context.

Example: Adding suggested articles to an entire case

The following screens show the result of adding articles to an entire case, regardless of the stage in the current case flow. Notice that the suggested articles remain the same during the Loan request and Loan approval stages in the loan process. 

Suggested articles for an entire case
Suggested articles for an entire case

 

Suggested articles for an entire case
Suggested articles for an entire case

Adding the gadget in your application

Add the gadget in your application to link contextual articles that help in resolving a flow or a step in a case, or an entire case. You can add the gadget in the application in multiple ways, for example, as a menu option, a button, or a link.

The following steps provide instructions on how to add the gadget as an option in the Actions menu in your application.

  1. Open the pyWorkActionsPerform rule, add then add the Launch action.

  2. In the Local Action field, enter SuggestedArticlesFlowAction, as in the following example:
     
    Configuring the Local Action parameter
    Configuring the Local Action parameter
     
  3. Click OK.
    The suggested article option is added to the Actions menu.
  4. To search for a new article to add to the case, click Actions > Add suggested article. 
    The Suggest article window opens, and any articles already added to the case are displayed in the Suggested articles added to the case section. 
     
    Sample list of suggested articles added to the case
    Sample list of suggested articles added to the case
            
  5. In the Search content field, enter an article title, and then click Submit.

Displaying recently added articles in a case

You can display recently added suggested articles in the case immediately after adding them.

  1. Open the pyWorkActionsPerform rule.
  2. Add the Refresh Other section action below the Launch action, as in the following example:
Adding the Refresh Other section action
Adding the Refresh Other section action

Viewing suggested articles and other case data

You can add the KMSuggestedArticlesWrapper section to sections such as pyCaseMainInner to see the suggested articles that are configured along with other case data.

The place where you add the KMSuggestedArticlesWrapper section determines where the gadget that displays the articles appears in the case.
  1. Open the section where you want to add the gadget.
  2. In the target section, add the KMSuggestedArticlesWrapper section, as in the following example.

Example: KMSuggestedArticlesWrapper added in the pyCaseMainInner section 

Sample KMSuggestedArticlesWrapper section
Sample KMSuggestedArticlesWrapper section
Suggest Edit

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.