Tuesday, February 27, 2018

Create Pega application from scratch : Demo

Requirement:
  • Build an application to be used by Customer Service Representative (CSR), who should be able to initiate a case on behalf of their Customer who approach them to purchase automobile.
  • Option to be given where CSR can select if Customer is New or Existing.
  • In case of "New" Customer: CSR to provide the details (user personal details, and vehicle details user is interested in). For existing customer, details to be shown where CSR can update if required. For this post scoped to only collect Customer details; vehicles would be modelled in later sprint.
  • Once CSR enters the details and submits the case, system to show the generated "Customer ID" on the screen. 
  • Case should be resolved (To keep the story simple, we have taken few steps. Further story would be extended in the upcoming posts for same application).
Task break up to achieve above requirement:

#1 Analyse and come up with ECS (Enterprise Class Structure)
Note down our understanding before we proceed with the application creation. Identify layers involved here and try to give a meaningful names. Think if we really need Division in the Class structure. Same way, Organization Unit be part of class structure or not.

Organization : Tata
Division : EU (Europe)
Organization Unit : Motors
Framework Application: Automobiles Sales Management Framework
Implementation Application: Automobile Sales
Note: Please do some paper work before proceeding with actual creation of steps, to visualize what we are going to build.

#2 Create Framework application
We are building Framework layer, keeping reusability in mind, so that we place our generic code at Framework level, so that we re-use them in applications (in future). We always need to think about re-usability in the beginning itself. 

Name of Framework Application : Automobiles Sales Management Framework
Framework layer class group : Tata-FW-AuMobFW-Work

#3 Create Implementation application
We are building implementation on top of "Automobiles Sales Management Framework" created in step #2.
Name of Implementation Application : Automobiles Sales
Implementation layer class group : Tata-EU-AuMob-Work

#4 Identify and Create Case Types
Customer approaches a automobile showroom, decides on a vehicle. Once confirms, Customer Service Representative takes the Purchase Request, where CSR needs to collect customer info and proceed with further processing. 
Case Type involved in our application scope is : Purchase Request
Framework Class : Tata-FW-AuMobFW-Work-PurchaseRequest
Implementation Class : Tata-EU-AuMob-Work-PurchaseRequest

#5 Identify and Create Data Types
What are the entities involved in our application: So our data type is Customer
Data Type Class : Tata-FW-AuMobFW-Data-Customer
We are maintaining this at FW level so that it can be reused across other implementations too.
Points to be noted:
Please keep an eye on the data pages that gets created. We are going to use them later while configuring logic for GET (Getting Customer Details for existing customers).

Note: Further we will have more entities : Vehicle,. To keep this post simple understandable by beginners, we are considering only one data type. 

#6 Create Data Model and UI Wireframes and link them on to flows
We need to do some paper work here on how UI looks like before proceeding:
Screen 1 : Type of Customer to be selected to choose either "New" or "Existing"
Screen 2 : Personal Details of Customer to be displayed
Screen 3 : Customer ID to be displayed for both existing and new users.

Thumb rules : 
  • Any rule we create  (not specific to our application alone), we can place it in Framework layer.
  • In Framework layer, if it is specific to case type, then only place the rules in case type(Tata-FW-AuMobFW-Work-PurchaseRequest) class, else try to keep it generic in the (Tata-FW-AuMobFW-Work)Work class itself, so that it can be reused across case types.
  • Always decide whether we have to go for IS-A relationship (or) HAS-A relationship.
In our application, we are going to create a HAS-A relationship to establish better design. Please keep an eye on that. It's good to have that understanding rather creating sections in wrong places.



#7 Code Logic : GET, SAVE
  • When a CSR enters new Customer details and submits the case, we need to generate Customer ID and SAVE the record to our Customer data table. 
  • When a CSR enters existing Customer details and clicks on Next, we need to display existing Customer details based on Customer ID entered. Here we need to do logic for GET. Already we have data page created (D_Customer parametrized data page from step#5 we can use).

#8 Create Operators
Create two operator IDs: one for user, and other for manager. 
Please name as per your requirement. 
  • DemoUser
  • DemoManager

#9 Configure Security : {Map Access Role, Access Role To Object}:
Identify the access group of the DemoUser. Open the Access Role. Add an Access Role to Object (ARO) on the below two instances, with appropriate permissions
    Tata-FW-AuMobFW-Data-Customer
    Code-Pega-List


Demo : Create actual case from the user portal


Now that we are done with the steps, lets take a walkthrough of  the application we developed:
Login via DemoUser. (UserName/Password: DemoUser/rules)
You are in User Portal. Navigate to New >> Purchase Request.
Click on Purchase Request to initiate a new request on behalf of Customer.








Select type of Customer : New, and Click on Continue












Before, we proceed with the actual screen, be aware that our Data type has no records. Its empty.
Once we create Customer ID, it should populate in the below.








Coming back to the screen, CSR would enter all the Customer details, and click on Finish.
Expectation is, it should show us the generated Customer ID on the next screen.













Here we go, we got the Customer ID generated. It takes the sequence. We would enhance with some GenerateID concept later in other posts(sprints).
Click Submit.






Now Purchase Request case is "Resolved-Completed".
Note: To keep the post simple, we scoped the requirement only to this point.
We would add slowly routing, email and all the other stuff post by post.





We can verify, if the Customer ID is really created or not.
From Developer perspective, you can go back to our data table "Customer", and can view records.







From DemoUser (CSR) perspective, CSR can open a new request, to view existing customer details :













Select the customerID from auto-complete, and click on Continue. System should fetch you the details as per the requirement.













This way, CSR can go for the existing details, and can edit if required, proceed and finish the case.
In the later post, we would add vehicle details customer is interested in, which would bring more meaning to the application we are creating.

We developed application AutoMobSales : 01-01-01 

In further posts, we will use the same application to achieve further requirements in next patch version.
  • Validation of UI Fields (like Mobile, Aadhar Number, Email ID)
  • Capturing Vehicle details Customer is interested to buy (One more data type)
  • Sending for manager approval before creating Customer ID
  • Sending an email to Customer once Customer ID is created.

Hope this helps!!!
Feel free to share/comment.



3 comments:

  1. Good work pavan.thank you for all the work what you have done.

    ReplyDelete
  2. Good work Pavan.
    thank you for all the work what you have done.waiting

    ReplyDelete


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu