System of Record [SoR] Pattern & Snapshot Pattern in Pega
SoR & Snapshot

System of Record [SoR] Pattern & Snapshot Pattern in Pega

Summary:

This article discusses about System of Record pattern & Snapshot pattern in PEGA – its configuration & usage .

Before We Begin

Before getting into the discussion, refer to our earlier post on Alias pattern to understand the basics of Data Modeling in Pega.

What is Data Access Pattern?

To build any application in Pega, we definitely need supporting data. For example, Candidate data for HR application, Customer data for CRM application, Employee data for any IT firm application.

Now, where do these supporting data reside & how efficiently Pega can access those data? 😳 .

Data access pattern available in PEGA helps us access those data. There are different types of access patterns available in Pega.

We will explore the System of record [SoR] pattern & Snapshot pattern in this post.

What is SoR & Snapshot Pattern?

Let’s assume that Customer details in a CRM application reside in an external system.

System of Record Pattern

  • In the above scenario, the external system that holds the customer-related information is referred to as the System of Record and Pega can refer to the external information at run time using SoR pattern.
  • SoR pattern does not maintain a copy of the record in Pega, rather it just refers to the configured source to fetch the information whenever required.
  • Hence the updates made in the configured source will get reflected in Pega whenever referred. For example, when a Customer Email ID gets updated in the external system, Pega refers to the updated customer Email ID.

Snapshot Pattern

  • Pega hits the external system for the first time and copies information from the external system using the Snapshot pattern.

Let’s now explore the configuration & usage of each pattern with a real-time example.

Business Scenario

Let’s consider a call center application built for a telecommunication organization. Customers can reach out to service representatives to inquire about their existing plan/connection. For example, a Customer can call a service representative and discuss the bill amount that he/she has received for the current/past month.

In the given scenario, we have two supporting data namely Customer detail and Plan detail that the customer owns. Let’s now see how best we can access this data from Pega.

Accessing Customer data using SoR Pattern

We have configured a data type as System of Record to store Customer information.

Data type to store customer-related information

Now let us see how to refer the customer data using SoR pattern in the service request case that service representative creates.

  • Create a Page property with context class as OSP-Data-CustomerInfo and configure it to reference data from the system of record.
Property configured using SoR pattern
  • CustomerData property refers to a data page D_CustomerInfo.
  • D_CustomerInfo just does a lookup of customer records using the Customer ID.
SoR pattern source
  • CSR gets a call from the Customer and creates an SR case by entering the Customer id provided by the customer. When CustomerData property is referred for the first time, it executes the Data Page D_CustomerInfo & populates the customer information under the CustomerData page property.
Sample Case SR-1
  • Let’s assume that the Customer has updated his/her email ID in the external system. The updated email ID will automatically get reflected in Pega since we have configured access using the SoR pattern.
  • When the case is opened again, it executes the Data Page D_CustomerInfo freshly and populates the updated information in the case.
Email ID is updated for Customer1.
Open the SR-1 case and refer the clipboard to see the updated value.
  • Any further updates made to the customer information in the external system will get reflected in both the inflight cases and new cases.

Accessing Plan data using Snapshot Pattern

We have configured a data type in Pega to store Plan related information.

Data type to store plan-related information

Now let us see how to refer the Plan data using Snapshot pattern in the service request case that service representative creates.

  • Create a Page property with context class as OSP-Data-PlanData and configure it to copy data from the system of record.
Property with Snapshot pattern to hold Plan details
  • PlanData property maintains a copy of data from data page D_PlanData.
  • D_PlanData just does a lookup of plan details using the Plan ID.
Data page with a lookup for plan details
  • CSR gets a call from the Customer and creates an SR case by entering the Customer id provided by the customer. When PlanData property is referred for the first time, it executes the Data Page D_PlanData & maintains a copy of the plan details under the PlanData page property.
Sample case SR-2. PlanData just executes the Data page D_PlanData and creates a copy of the record in the case.
  • Let’s assume that the Organization has updated the Plan1 billing cycle as Yearly instead of Monthly in the external system. The updated billing cycle of Plan 1 should be reflected only for the customer who freshly buy Plan1 and not for the existing Plan1 customers.
Updated plan details
This image has an empty alt attribute; its file name is image-11.png
Open SR-2 and it will not point to the new updates made to the plan. Because of the snapshot pattern.
  • Any further updates made to the Plan information in the external system will get reflected only for the new cases & not for the inflight cases.
  • When the service representative creates a new service case for Plan1, it should be using the updated plan details.
New case SR-3 which shows the updated plan details. This is a new customer purchasing the Plan1 freshly.

Hope now the configuration & usage of SoR pattern and Snapshot pattern is clear with the discussed examples.

Pointers to Remember

  • SoR pattern can be used when we want to keep the data up-to-date for both inflight & new cases whereas, Snapshot pattern can be used to maintain a copy of data for inflight cases and up-to-date information for new cases.
  • Both Page and PageList properties can be configured using SoR & Snapshot pattern.
  • Properties configured with SoR & Snapshot pattern can be used for Reporting without any restriction.

Stay tuned for our continuation post which will cover Reference pattern and Keyed access pattern.

We are glad to publish the article requested by @ Rakhesh on “Data Access Patterns in Pega”. If you want us to publish any articles of your choice, please fill out this form & we will make sure it gets published.

OSP TEAM
Written by
OSP Editorial Team

Recent Jobs from our community

loading
View more Jobs on OSP Forum
Join the discussion

Feel free to post your questions here about this topic if any. We will definitely get back to you ASAP !!!
If you have any off-topic questions, Let's discuss at OSP Forum

4 comments