Implementing case types using Digital Experience APIs for Pega Customer Service Case Management Edition in Salesforce Lightning

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

Implementing case types using Digital Experience APIs for Pega Customer Service Case Management Edition in Salesforce Lightning

Description Implement case types using Digital Experience APIs for Pega Customer Service Case Management Edition in Salesforce Lightning
Version as of 8.8
Application Pega Customer Service
Capability/Industry Area Service Cases / Tasks



For more information about different recommended design methodologies, prerequisites, troubleshooting common issues, and recommendations to take advantage of Pega Customer Service Case Management Edition, see Implementing Case types using Digital Experience APIs for Pega Customer Service Case Management Edition.

Prerequisites and setup[edit]

  • To take advantage of the existing Salesforce user interface with Pega's dynamic case management to manage and automate work from end-to-end, use Pega Process Extender for Salesforce Lightning. Download the Pega Process Extender for Salesforce Lightning.
  • Ensure that the Pega instance used for Salesforce Lightning has public access.

Integration with Salesforce Lightning by using Pega Customer Service Case Management Edition[edit]

To complete the deployment and integration of the Pega server with Pega's process extender for Salesforce, see the installation instructions in the README.md file under your Pega Process Extender for Salesforce Lightning installation directory in …\ pegaLwcStarterPack_v1.8.zip\documents path.

Components available in Pega Marketplace[edit]

To use Pega cases in the Salesforce desktop, you need to use a few custom components that are designed in the Salesforce application and are described in the following table:

Available components
Component Description Parameters Capabilities
Create case Lightning web component to create Pega cases without any context of the contact record. This component supports creating cases from multiple Pega instances.
  • DX-API endpoint: A comma-separated list of DX-APIs base endpoints.
  • Flows: A comma-separated list of flows to display.
  • Title: Component title.
  • Show stages: Show Pega case stages as Lightning Progress steps.
Case stages
  • Show steps: Show screen flow steps as Lightning Breadcrumb (Navigation menu).
  • useEmbeddedPageInstructions: Use page instructions for embedded pages.
  • useRepeatPageInstructions: Use page instructions for repeat pages.
  • refreshOnRepeatActions: Refresh the case when performing add or delete row actions.
  • ignoreOptionsForAutoComplete: Call the data page for autocomplete.
You can implement case processing in the Salesforce application through the use of DX API endpoints to drive assignments to completion, approve requests, or resolve expense reports. DX APIs help you achieve these results within the familiar environment of your custom front end. DX APIs provide UI metadata that helps you develop a seamless user experience within your chosen front-end framework, while using the power of Pega’s case management capability.
Create case from record This component supports creating cases from multiple Pega instances.
  • Flows: A comma-separated list of flows to display.
  • Mode
  • Review: Display the review harness.
  • Create and Review: Create a case, and then display the review harness with any assignments for the new case.
  • Title: Component title.
  • Show stages: Show case stages as Lightning Progress steps.
  • Show steps: Show the screen flow steps as Lightning Breadcrumb.
  • useEmbeddedPageInstructions: Use page instructions for embedded pages.
  • useRepeatPageInstructions: Use page instructions for repeat pages.
  • refreshOnRepeatActions: Refresh the case when performing add or delete row actions.
  • ignoreOptionsForAutoComplete: Call the data page for autocomplete.
Lightning web component to create Pega cases from Salesforce records. By default, the component associates the Salesforce record with a Pega case by using the Salesforce CaseId__c field and associates the Pega case with the Salesforce record by using the RecordId case property. The component also converts the Salesforce record into JSON and uses it to populate the RecordJsonData case property. Pega developers can use that JSON to populate other case properties. To use the createWorkFromRecord component:
  1. Create the CaseId text field in the Salesforce object.
  2. Create the RecordId and the RecordJsonData text properties in the Pega case.
  3. Create an activity that parses the RecordJsonData text property and add it to your flow. See O1SPYR-DigExp-Work-CaseFromRecord.SetRecordData for an example activity.
Get next work Lightning web component to get the Pega operator next assignment.
  • DX-API endpoint: A comma-separated list of DX-APIs base endpoints.
  • Title: Component title.
  • Show stages: Show case stages as Lightning Progress steps.
  • Show steps: Show the screen flow steps as Lightning Breadcrumb.
  • useEmbeddedPageInstructions: Use the page instructions for embedded pages.
  • useRepeatPageInstructions: Use the page instructions for repeat pages.
  • refreshOnRepeatActions: Refresh the case when performing add or delete row actions.
  • ignoreOptionsForAutoComplete: Call the data page for autocomplete.
Use this component in the Lightning record pages such as Account, Opportunity, and Contact. Ensure that the maximum length of the RecordJsonData property is long enough to hold the Salesforce record data, for example, start with 2K.
My assignments Lightning web component to access the Pega worklist and workbaskets.
  • DX-API endpoint: A comma-separated list of DX-API base endpoints.
  • Worklist datapage: The data page that is used to retrieve worklist assignments. The default is D_pyMyWorkList.
  • Default worklist columns: A comma- separated list of columns to display these defaults: pxRefObjectInsName, pyAssignmentStatus, pxUrgencyAssign, pyLabel, pxCreateDateTime, and pxTaskLabel.
  • Workbasket data page: The data page that is used to retrieve workbasket assignments. The default is D_WorkBasket.
  • Title: Component title.
  • Show stages: Show case stages as Lightning Progress steps.
  • Show steps: Show the screen flow steps as Lightning Breadcrumb.
  • useEmbeddedPageInstructions: Use the page instructions for embedded pages.
  • useRepeatPageInstructions: Use the page instructions for repeat pages.
  • refreshOnRepeatActions: Refresh the case when performing add or delete row actions.
  • ignoreOptionsForAutoComplete: Call the data page for autocomplete.
  • Federated worklist and workbaskets
  • Sort by any column based on its data type
  • Search by any column including dates
  • Dynamically add, remove, or change the order or columns including custom columns
  • Save settings to the browser's local storage
  • Configurable worklist and workbasket data source
  • Configurable worklist and workbasket headers
  • Infinite scrolling
Mashup container Lightning web component to enable the use of Pega Mashups without the need for Visualforce pages. The Mashup container component depends on the existence of single sign-on configuration.
  • Mashup URL: Pega Mashup iframe URL with the appropriate SSO authentication servlet configured.
  • Mashup height: (in pixels)
Display cases by using records This component is used to display only the cases that are linked to the customer. The CSR can review the case and continue the case processing.
  • DX-API endpoint: A comma-separated list of DX-APIs base endpoints.
  • Data page to display cases: Takes the data page name.
  • Title: Displays the header.
Create a case by using a shadow case This component is used for creating a case and opening the case in review mode. DX-API endpoint: A comma-separated list of DX-API base endpoints.

Other common parameters such as Show stages, show screen flow stages, and Use embedded page instructions.

Whenever you create a Salesforce case by using this component and pxObjClass, the respective Pega case is created and the component shows the perform assignment screen. When you close the Salesforce case in the back end, the Pega CaseID is also stored, which helps in the review of the case.

You can implement case processing in a Salesforce application by using the DX API endpoints to drive assignments to completion, approve requests, or resolve expense reports. DX APIs help you achieve these results within the familiar environment of your custom front end. DX APIs provide the UI metadata that helps you develop a seamless user experience within your chosen front-end framework, while using the power of Pega’s case management capability.

Integrating the Change Beneficiary case type with Salesforce[edit]

The Change Beneficiary case type enables insurance policyholders to add, edit, or delete beneficiaries from one or more of their life insurance policies. This case type has been refactored. Previously, the option to add beneficiaries in the Interaction Portal was through a dialog box. For a better user experience when using DX v1 APIs with the Salesforce UI, the case type now uses form layouts with the required columns.

The following are two use cases for this case type when using Pega's Process Extender for Salesforce Lightning:

  • Create a new case by using the Create case from shadow case component with the approval process. CSRs can now create a new case type in the Salesforce desktop with the approval process in the Pega Back office portal.
  • Continue a case by using the Display cases using records component (omni-channel use case) with the approval process. The customer creates the Change Beneficiary case type in a self-service channel, and then the CSR continues it in the Salesforce desktop with the approval process in the Pega Back office portal.

Configurations in Salesforce and Pega[edit]

CSRs log in to the Salesforce desktop and create the Change Beneficiary case type in the customer context by using the Create case from shadow case component. After the CSRs complete the intake process, the case is routed to the Back office's work queue for approval. The back-office user continues the approval process, and then resolves the case.

Customer context[edit]

Salesforce is the system of record for customer data. When cases are created or updated, the Salesforce contact data is passed through the Pega API requests.

Changes in Salesforce to support the Pega integration[edit]

A console application (tab-based workspace that lets you manage multiple records on a single screen) has been created in which Salesforce is a system of record for contact information. When CSRs answer calls from customers, they can open the contact record page for the customer and can create new service cases by clicking New case. Because the service cases from Pega and Salesforce are listed together, when you click New case, CSRs can create any service case based on the customer's need and interest.

Prerequisites for creating a Pega case[edit]

The following are prerequisites for creating a Pega case when you click New case:

  • Create a new record type for each Pega case type
  • Create a new or update the existing APEX trigger to map the record type with the Pega case class

This means that if customers want to change the beneficiaries for their policies, then CSRs create the Change Beneficiary service case that is offered by Pega. When the CSRs select the Change Beneficiary service case, a Pega case is created in the background by using the Create case using shadow case component. Because the Pega case and Salesforce cases are integrated by using the Create case using shadow case component, the cases are created seamlessly.

Map contact data from Salesforce to Pega[edit]

You can map contact data which is sent in the request payload from Salesforce to Pega by performing minimal changes. The following list shows the APIs that are used:

  • api/v1/casetypes -- Gets the case type from the authenticated Pega application
  • api/v1/cases -- Creates a new case
  • api/v1/assignments/{ID} -- Returns details about a single assignment
  • api/v1/assignments/{ID}/actions/{actionID} -- Returns details about an action that can be performed against this assignment, including its fields, either within the view or as a list
Configuration of the case creation component in Salesforce[edit]

In Salesforce, navigate to the page where you add the custom components. Click Settings > Edit Page.

The following figure shows the Edit Page option on the service console:

Edit the configuration page

You can see all the available components in the left pane. Drag and drop the Create case from shadow case component on the center pane. After you add it, and then select the component, the configuration of that component is displayed in the right pane. You can modify it.

Component to create Pega case in the process extender

To publish these changes to the page, click Save and click Activation, and then click Submit. After the changes are saved, click the left arrow (left corner) to return to the Salesforce page.

Configuration of case type in Pega[edit]

In the Change Beneficiary case type, the parallel flow was added to capture the case details for the external desktop, as shown in the following figure:

Case type configuration for external customer service desktop

To support an omni-channel handoff, an additional parallel flow was added to capture the case details for the customer, as shown in following figure:

Case type configuration for customer intake

Configuration in Salesforce for approval process[edit]

In Salesforce, navigate to the Home page to add the custom components. On the service console, shown in the following figure, click Settings > Edit page:

Edit page

In the following figure, you can see all the available components in the left pane. Drag and drop the My assignments component on the center pane. After you add the component, select it to view the configurations of that component in the right pane. You can modify the configurations.

My work component

Configuration in Pega for approval process[edit]

Open the record for the back-office user operator, and then update the required work queues as shown in the following figure:

Configuration for back-office work queue

Omni-channel handoff

When a CSR launches the case in the customer service portal, both assignments are displayed as shown in the following figure:

Change stage flow

After one of the assignments is completed, the case moves to the next stage.

To ensure that the case is processed and moved to the next stage as expected, add the Change stage shape in all intake flows (Interaction Portal, external desktop, and customer), and then set the value of param.CleanUpProcesses to true.

Implementation pages[edit]

After completing the case type and Salesforce component configurations, click New case to create the Change Beneficiary case.

Create case option

The pages in this section display during case processing.

Policy selection page[edit]

The following figure shows the page that is used to select one or more life policies:

Policy selection page

Add or update beneficiaries page[edit]

The following figure shows the page that is used to select an action and add or update the beneficiaries page based on the selection:

Beneficiary action page

Communication options page[edit]

The following figure shows the page that is used to select communication options such as email or mail:

Select communication options page

Confirm page[edit]

The following figure shows that the confirmation request has been placed successfully:

Confirm page

After the intake process is completed from an external customer service desktop, a DocuSign email is sent to the customer to get confirmation about making the requested beneficiary changes. After the customer confirms, the case is automatically routed to the back-office work queue (Case Review) to begin the approval process.

You can use the My Assignments component for this use case. The back-office user then logs into the Salesforce desktop, opens the case (which has all the customer context) from the work queue, and can review and process the case to the next stage.

The back-office user can open the Change Beneficiary request from the work queue and approve it by reviewing the case information as shown in the following figure:

Work queues
Click a row to open a request

Omni-channel use case[edit]

In the Salesforce desktop, by using Pega Process Extender for Salesforce Lightning and CME capabilities, customers experience the omni-channel behavior and implement the center-out business architecture strategy.

Initially, the customer creates the Change Beneficiary request from the self-service portal. The CSR continues processing the same case that was initiated by the customer using the Display cases using record component.

Configuration in Salesforce[edit]

In Salesforce, navigate to the Home page where you add the custom components. Click Settings>Edit page on the service console as shown in the following figure:

Edit page

You can see all the available components in the left pane. Drag and drop the Display cases using record component on the center pane. After you add it, select the component. The configurations of that component are displayed in the right pane. You can modify them.

The following API is used:

  • api/v1/cases/{1D}/pages/{pageID} – Gets page details and opens the case in review mode.
Customer pega cases

After completing the configuration, the CSR opens the case from the Customer workflows widget. The Review page of the Change Beneficiary case is displayed and the Continue link is enabled. When you click the link, it opens the Change Beneficiary case in edit mode and the CSR completes the intake process.

Continue case

Known Limitations[edit]

Common Issues and workarounds

The following table lists the common issues and workarounds:

Common issues and workarounds
Issue Reason Workaround
The radio button selection in a table layout is not working. There is no support for the radio button selection in the starter packs and the process extender. To implement a single select in a table layout, use checkboxes and add validation for the single select.
The user experience for some of the controls in the process extender are not in line with the controls in the Pega portals.

For example:

  • Required indicator (*) displayed to the left of the table in Salesforce.
  • Header, date time, and radio button label formats
Because the user experience is rendered in the Salesforce Lightning portal, it should be in line with the Salesforce Lightning Design System

(https://www.lightningdesignsystem.com/).

Not applicable
Reserve space when the hidden flag for the paragraph rule is not working in the process extender. In the current version, there are a few flags that are not handled in the process extender. Not applicable

Conclusion[edit]

You can embed Pega’s out-of-the-box case types into external desktops by leveraging the DX v1 APIs and making suitable changes in the UX. This requires little effort with significant outcomes leveraging Pega Case Management in a client UI of choice.