How to add advanced PDF search in a customer journey

From PegaWiki
Adding the Advanced PDF Search component to customer journeys / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

How to add advanced PDF search in a customer journey

Description Search the content of PDF documents and present the results to users
Version as of 8.5
Application Pega Customer Service
Capability/Industry Area Communications and Media



Business need[edit]

The representation of data in a document that is presented to a customer may vary from the data that a CSR views on the web page for a customer. This difference can form a gap in understanding when a customer is inquiring about a complex bill in a call, about which the CSR has no idea. The Advanced PDF Search feature provides an opportunity to bridge this gap and bring both the CSR and the Customer to a mutual understanding, by letting the CSR view and search the data that the customer is inquiring about.

About the Advanced PDF Search feature[edit]

As the name indicates, Advanced PDF Search lets you search for text and phrases in a series of PDF documents and then present the results to the user for further selection. The feature is a core CRM infrastructure offering and any implementation application based on Pega Customer Service or Pega Sales Automation can make use of this feature out-of-the-box.

The Advanced PDF Search component is based on the PDF.JS open source JavaScript library and is ES5 complaint, which makes the component fast and compatible with both modern and older web browsers.

With the Advanced PDF Search component you can:

  • Search through a series of PDF documents
  • Display matches between PDFs
  • Open a PDF to view the highlighted search content
  • Navigate and zoom in the PDF document
  • Auto-scroll to the first occurrence of the search text

Search results.pngHighlighted PDF content.png

Implementing the Advanced PDF Search component[edit]

Before you get started, ensure that you have a source that returns PDF documents as base64 encoded strings, and that the returned PDFs are not password protected.

  1. You can begin by embedding the AdvancedPDFSearch section in your use case. To provide current context to the component, ensure that you have the PrimaryIdentifier, SecondaryIdentifier and FirstInvocation properties set to True and populated in the primary page.
  2. The D_PDFDocument data page is part of the advanced PDF search infrastructure and acts as the source for searching and rendering in the UI, so it is important to implement the data source of this data page by implementing the SourcePDF activity to the source PDF documents in your data source.
  3. There is a call in activity to an extension data transform SourcePDF, which has the template for the list of properties that must be populated from your PDF data source. For example, DocumentName, DocumentID, and most importantly DocumentSource, which holds the base64-encoded string of the PDF.
  4. The PrimaryIdentifier, SecondaryIdentifier, and FirstInvocation properties act as input to the data page. Based on your implementation, you can populate the data page accordingly.

Configuring the display of search results[edit]

The Advanced PDF Search component displays the first three search results in a drop-down list. You can change the number of documents displayed in the initial search results and the number of additional documents displayed when you click the Show More link by configuring the following dynamic system settings:

  • MinimumRecords – sets the number of documents displayed in the initial search results.
  • AdditionalRecords  – sets the number of additional documents displayed when clicking the Show more link.

For more information, see Implementing the Advanced PDF Search component in your application.