Implementing case types using Digital Experience APIs for Pega Customer Service Case Management Edition in Salesforce Lightning
Implementing case types using Digital Experience APIs for Pega Customer Service Case Management Edition in Salesforce Lightning
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
- 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
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
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:
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. |
|
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. |
|
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:
|
Get next work | Lightning web component to get the Pega operator next assignment. |
|
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. |
|
|
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. |
|
|
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. |
|
|
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
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
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
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
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
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
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
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:
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.
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
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:
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:
Configuration in Salesforce for approval process
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:
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.
Configuration in Pega for approval process
Open the record for the back-office user operator, and then update the required work queues as shown in the following figure:
Omni-channel handoff
When a CSR launches the case in the customer service portal, both assignments are displayed as shown in the following figure:
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
After completing the case type and Salesforce component configurations, click New case to create the Change Beneficiary case.
The pages in this section display during case processing.
Policy selection page
The following figure shows the page that is used to select one or more life policies:
Add or update beneficiaries page
The following figure shows the page that is used to select an action and add or update the beneficiaries page based on the selection:
Communication options page
The following figure shows the page that is used to select communication options such as email or mail:
Confirm page
The following figure shows that the confirmation request has been placed successfully:
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:
Omni-channel use case
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
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:
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.
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.
Known Limitations
Common Issues and workarounds
The following table lists the 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:
|
Because the user experience is rendered in the Salesforce Lightning portal, it should be in line with the Salesforce Lightning Design System | 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
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.