Configuring the portal search
In the Interaction Portal of Pega Customer Service™, 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, as shown in the following figure:
Configuring search sources
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? checkbox). Use the extension FilterForApplication when rule to further filter data source rules based on the application context. This information is the source for displaying the data source list in the Interaction Portal search, as shown in the following figure:
Search retrieval
Pega Customer Service uses the standard search utilities of Pega Platform (such as pzSearchResultsWork and pxRetrieveSearchData) 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
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, as shown in the following figure:
This out-of-the-box solution is usable as is for searching knowledge content.
For more information about enabling searches for work data for your application, see Configuring full-text search.
Data sources
There is a separate data page for each source with all searchable fields as parameters (with the appropriate interface and logical data class).
The following text is an out-of-the-box account 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):
Example (Advanced search):
For more information, see Enabling the data source for portal search.
Display search results
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
Use the AdvancedSearchCriteriaPage clipboard page context for advanced or custom search properties.
Use the CPM-Search-Result search results class to create additional fields, even though it supports dynamic class referencing when inherited.
Cases
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 |
The 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
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
When configuring search, use the following best practices:
- Have a separate search data page for each data source with all searchable fields as parameters.
- Use the out-of-the boxsection 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.
- Do not customize the out-of-the-box portal search flow rules.
Limitations
When configuring the search, note the following limitations:
- Data pages do not 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 plan to handle updates 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.
このトピックは、下記のモジュールにも含まれています。
If you are having problems with your training, please review the Pega Academy Support FAQs.