Implement Portal Search in Customer Service

From PegaWiki
This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search



Description Create and customize searches in the Pega Customer Service portal.
Version as of 8.5
Application Customer Service
Capability/Industry Area Search



Using the Interaction Portal search feature[edit]

From the Pega Customer Service Interaction Portal, users can search for various types of information displayed in the portal, including:

  • Cases and work objects – Interactions, service cases, and knowledge content
  • Data sources - Customer system of record (SOR) data such as accounts and contacts.

A basic search and an advanced search are available for use in the Interaction portal. You can perform a basic search by entering your search text in the search field of the Interaction Portal. In the advanced search section, you can configure more fields to use as filters for a more refined search experience. When you select the fields to use as filters, the order of your selection determines the order in which the fields will be displayed in the Search results.

Customer Service Portal Search

Configure search sources[edit]

Cases and knowledge content sources are included by default. For other data sources, use the data source rule configuration (select the Use in portal search? check box).

Use the extension When rule FilterForApplication to further filter data source rules based on the application context.

This information is the source for displaying the data source drop down in the Interaction Portal search.

Pega CustomerService Search DSDropDown.jpg

Search retrieval[edit]

Pega Customer Service uses Pega Platform's standard search utilities (pzSearchResultsWork, pxRetrieveSearchData and so on) for searching work objects and cases, and provides a configurable solution to integrate and search Customer SOR data, which is typically an external system.

Cases[edit]

The default behavior is to search all case types that are listed on the application rule.

The data page D_SearchResultsFor is used to search work objects, and the same page is directly used to display the results in the UI.

Pega CustomerService WorkBasicSearch.jpg

This out-of-the-box (OOTB) solution can be used as is for searching knowledge content.

For more information on enabling searches for work data for your application, see the Pega Platform help.

Data sources[edit]

There is a separate data page for each source with all searchable fields as parameters (with appropriate interface and logical data class).

The following is an OOTB accounts search data page:

D_AccountDataList[SearchValue:D_ShareData.pySearchText, AccountNumber:AdvancedSearchCriteriaPage.AccountNumber, AccountType:AdvancedSearchCriteriaPage.AccountType,

AccountStatus:AdvancedSearchCriteriaPage.AccountStatus, FirstName:AdvancedSearchCriteriaPage.FirstName,LastName:AdvancedSearchCriteriaPage.LastName,

AccountopenDate:AdvancedSearchCriteriaPage.AccountopenDate, InteractionId:.CurrentInteractionID]

Example (Basic search through portal search field)

Pega CustomerService DSBasicSearch.jpg

Example (advanced search)

Pega CustomerService DSAdvancedSearch.jpg

For more information, see Enabling the data source for portal search.

Display search results[edit]

Configure the SearchHeader section for searchable data sources in your implementation application.

The search results sections are:

  • Cases - SearchResultsWorkCases
  • Knowledge content - SearchResultsKM
  • Data sources - Follow the naming pattern Search_[Data source name] to allow them to render in a search harness without requiring customization.

Customize search criteria and results[edit]

Use the AdvancedSearchCriteriaPage clipboard page context for advanced or custom search properties.

Use the OOTB CPM-Search-Result search results class to create additional fields, even though it supports dynamic class referencing when inherited.

Cases[edit]

Modify the following extension rules to customize work search criteria and results:

Rule Type Rule Name Usage
Activity pySearchWorkParams Set the advanced work search parameters that are set by the user in the UI.
Activity pyFilterSearchResults Further filter search results after search results are returned.
Data Transform CSSearchResultsWorkExtn Set additional fields on search results from implementation work objects.
Section SearchResultsWorkCases Include custom properties in advanced search criteria and in the results grid.
Activity CPMSetSearchWorkParams Default behavior, which picks all case types listed in the Application rule, and cases worked in the last 90 days.

Use the D_SearchResultsFor data page to fetch search results. Note that this page is not parameterized with advanced search fields, which are set through the pySearchWorkParams extension rule.

Data sources[edit]

Modify the following extension rules to customize search criteria and results for data sources.

Rule Type Rule Name Usage
Data Transform MatchingRecordsCountForFilter Map data from implementation specific search data pages to a common search results page (pySearchResults)
Section Search_[Data Source] Include custom properties in advanced search criteria and in the results grid.

The pySearchResults page is for search results. Use this page in the UI rules to display search results.

Best Practices[edit]

  • Have a separate search data page for each data source with all searchable fields as parameters.
  • Use the OOTB section names, search results class, and clipboard pages (pySearchResults, D_SearchResultsFor, and AdvancedSearchCriteriaPage) to minimize the number of overrides required while customizing searches to include custom properties.
  • Don't customize the OOTB portal search flow rules.

Limitations[edit]

  • Data pages don't support dynamic parameter lists (such as a page or JSON parameter), which is a requirement for search-type use cases. Therefore, define all possible search fields as parameters up front, and also plan to handle upgrades whenever parameters are updated.
  • Limit the number of search results by using the application setting (Declare_CAApplicationSettings.WorkObjectSearchResults). Do this for performance reasons because each object would be opened internally to fetch the required data for the results display.
  • Case search results are retrieved by update date time, and sorted by create date time (most recent at the top), and there are no extensions available to change this logic.

For more information, see Configuring the portal search.