KEMBAR78
Order Management System | PDF | Data Model | Modular Programming
0% found this document useful (0 votes)
60 views50 pages

Order Management System

Uploaded by

shoeb9373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views50 pages

Order Management System

Uploaded by

shoeb9373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Ribbon

Paragraph

Insert:
Comment

Outline
Project - Order Management
Link to heading
About the Project
Link to heading
End-User Functionalities
Link to heading
Internal User Functionality
Link to heading
Note: -
Link to heading
Phase 1
Link to heading
Module 1 - Data Model for the Project
Link to heading
Below objects are not included in the first phase of Product Launch
Link to heading
1.1 Product Images Custom Fields
Link to heading
1.2 Payment Custom Fields

1
Link to heading
1.3 Account Request Custom Field
Link to heading
1.4 Coupons Custom Fields
Link to heading
1.5 Address Book Custom Fields
Link to heading
1.6 Order
Link to heading
1.7 Order Line Item
Link to heading
1.8 Product - custom fields
Link to heading
1.9 Product Offers Custom Fields
Link to heading
1.10 Category Custom fields
Link to heading
1.11 Product Category Custom Fields
Link to heading
1.12 Cart custom fields
Link to heading
1.13 Cart Item custom fields
Link to heading
Module 2 - Develop the Component to be used inside Salesforce
Link to heading
2.1 - Object OWD Setup
Link to heading
2.2 - Functionality related to Account Request Object

2
Link to heading
2.3 - Validation Rule
Link to heading
2.4 Functionality Related to Order/Cart Line Item
Link to heading
2.5 - Functionality Related to Order
Link to heading
2.6 Functionality Related to Product Offers
Link to heading
Module 3 - Implement Salesforce Community ( Experience Cloud )
Link to heading
Module 4 - Integration Payment Gateway
Link to heading
4.1 Modify Payment Component
Link to heading
Module 5 - Develop My Profile Component
Link to heading
Module 6 - Develop Order List Component
Link to heading
Module 7 - Integrate with External System
Link to heading
7.1 Setup Order Event Platform Event
Link to heading
7.2 Setup Order Update Platform Event
Link to heading
Module 8 - Implement Return Order Functionality
Link to heading
Module 9 - Develop Account Request Component

3
Link to heading
Module 10 - Club Everything into a Single Digital Experience
Link to heading
10.1 Modify the Digital Experience
Link to heading
10.2 - Modify User Profile and User Setting Page
Link to heading
Module 11 - Setup Email to Case and Web to Case
Link to heading
Module 12 - Enable Knowledge Article and Create some knowledge Articles
Link to heading
Module 13 - Setup Omnichannel and add the omnichannel into the digital experience
Link to heading
Module 14 - Add the Knowledge article into a digital experience
Link to heading
Module 15 - Go Live & Celebration
Link to heading
Phase 2 -
Link to heading
Module 1 - Create necessary objects
Link to heading
1.1 Create Fields for WishList Object
Link to heading
1.2 Create Fields for WishList Items Object
Link to heading
1.3 Create Fields for Related Product Object
Link to heading
1.4 Create Fields for Product Rating

4
Link to heading
Module 2 - Validation Rule Setup
Link to heading
2.1 While creating or updating the Wishlist Object User must be selected.
Link to heading
2.2 While Creating the Wishlist Item the User & Product must be selected.
Link to heading
2.3 While Creating the Related Product it is required to select Product
Link to heading
2.4 While Creating the Product Rating, all the fields are required
Link to heading
Module 2 - Develop Related Product Component
Link to heading
Module 3 - Develop Rating Component
Link to heading
Module 4 - Modify the Product List Component
Link to heading

Document
Project - Order Management

5
About the Project

You are working for a company called E-Zone as a Salesforce Developer and you have been assigned to a project where the task is to develop a new
digital experience for their customers. The end result should a digital experience built on top of the Salesforce Platform where users can perform
the below tasks.

Functionalities must be available after the completion of the project

6
End-User Functionalities

​ User must be able to search the product by name and category


​ The user must be able to add the product to the cart and if the user logout and comes back another day user must be able to see the
existing product
​ End-User must be able to place, return and cancel an order
​ User must be able to add/edit/delete the address book
​ User must be able to log a case for any issues and check the status
​ Use must be able to track the order status without log-in into the system
​ The user must be able to chat with the support agent
​ User must be able to see FAQs without login
​ Once the order is created we need to send the order to an external system.

Internal User Functionality

​ User Must be able to see the cases and work on those


​ User Must be able to see the knowledge article and then attach those articles to that case
​ Can Work on Orders and Edit those order record
​ User Must be able to see Account Request record and approve/reject them

Note: - These might be some requirement which will not be mentioned into the document and you also need to implement that and if you implement
anything which is not outlined into the requirement then consult with the client/ senior and then implement that part.Before going with any custom
development try to find the solution which can be done using automation tools like Process Builder, Lightning Flow, Workflow Rule, or Approval
process

Phase 1:

7
Module 1 - Data Model for the Project

This module will focus on the Data Model of the Project and involves a detailed description of all the entities involved in the project.

​ Account - Standard Salesforce Component which will be used as the Parent of End Customer ( Community User )
​ Contact - Standard Salesforce Component which will be used to create the Community User in Salesforce.
​ Order - Custom Salesforce Object to be used to store the order information. We can not use Standard Order Object as it requires to
have the contract in order to create an Order record.
​ Order Line Item - Custom Object which is a child of Order Object and will store the information about the Items to be included in order.
​ Product - Standard Salesforce Object
​ Account Request - Custom Salesforce Object which will be used to request a new account for the community.
​ Address Book - Custom Salesforce Object to store the address information
​ Payments - Custom Salesforce Object to store the information about the payment of order records.
​ Coupons - Custom Objects to store the coupon and
​ Product Offers - Junction object between product and Coupons to indicate which product is eligible for the offer
​ Product Images - A Child object to Product which will store the Images related to the Product.
​ Cart - The custom object which will store the information about the current cart of the user
​ Cart Items - The child of cart object associated with Master-Detail relationship and will contain all the information about the items
which user has added into the cart.
​ Categories - Custom objects hold the name of the category to which the product will be associated.
​ Product Categories - Custom salesforce object which will be the child of category and product to link product and category.

Below objects are not included in the first phase of Product Launch

​ Wishlist - The custom object to store the wishlist created by the user
​ Wishlist Items - The child of the Wishlist object which will contain the information about the product added to the wish list
​ Related Products -
​ Product Ratings -

8
1.1 Product Images Custom Fields

Sr. No Field Label Field API DataType Parent Options HelpText Length Note
Object

Product__c Lookup Product NA The related product NA NA


1 Product

URL__c Url NA NA The URL for the image Na NA


2 URL

Type__c PickList NA URL, Static The type of image which Na NA


3 Image Type Resource, will determine what to
None display

Resource__c Text NA NA Required if Static Na Na


4 Static Resource Resource is Selected in
Image Type

ResourceURL_ Text NA NA Contains the fully NA NA


5 Resource URL _c Qualified Path of the
image to be shown on
the product detail page

HeroImage__c CheckBox NA NA If Selected this image NA NA


6 Hero Image will be displayed on the
Product List Page

9
1.2 Payment Custom Fields:

Sr. Field Label Field API DataType Parent Options HelpText Leng Note
No Object th

Customer__C Lookup Contact NA The related customer who


1 Customer is making payment

Order__c M-D Order__c NA The related order for


2 Order which the payment is
being created

Status__C Picklist NA Created, Failed,


3 Status Success, Hold,
Review, Declined

Amount__c Currency(10,0) NA TNA The Total amount of the


4 Amount payment 10

Date__c Date NA NA The date of the


5 Transaction transaction ID
Date

10
TransactionId text NA NA The Unique Id of the
6 Transaction __c transaction Id 255
Id

11
1.3 Account Request Custom Field:

Sr. Field Label Field API DataType Options HelpText Parent Length Note
No Object

Name Text The Name of the NA


1 Name Account 80 NA

Statuc__c Picklist Open, In The status of the NA NA


2 Status Process, Account
Approved,
Declined, Hold

Phone__c Phone NA Phone of the Account NA NA


3 Phone Owner

Email__C Email NA The Email for the


4 Email customer

BillingStreet__c Text NA Address of the Customer


5 Billing 255
Street

12
BillingCity__ Text
6 Billing City 80

BillingState__c Text
7 Billing 40
State

BillingPostalCode__C Text
8 Billing 6
Postal
Code

BillingCountry PickList All available https://datahub.io/core/c


9 Billing countries ountry-list
Country

ShippingStreet__c Address of the Customer


10 Shipping
Street

ShippingCity__c
11 Shipping
City

13
ShippingState__c
12 Shipping
State

ShippingPostalCode__
13 Shipping C
Postal
Code

ShippingCountry__c PickList All available


14 Shipping countries
Country

Description__C TextArex Long NA


15 Descriptio 500
n

DOB__c Date NA The date of birth of the NA NA NA


16 Date of customer
Birth

14
FirstName__c Text NA The First Name of the NA
17 Primary Primary Contact 80
Contact
First Name

LastName__C Text NA The Last Name of the NA


18 Primary Promary Contact 80 NA
Contact
Last Name

PrimaryEmail__c Email NA The email of the NA NA


19 Primary promary Contact
Contact
Email

PrimaryTitle__c Text Na The title of the primary NA


20 Primary Contact 255 NA
Contact
Title

PrimaryPhone Phone NA The phone no of the NA NA NA


21 Primary primary Contact
Contact
Phone

15
1.4 Coupons Custom Fields:

Sr. Field Label Field API DataType Options Help Text Parent Len Note
No Object gth

Type__c PickList Flat, The type of discount NA NA


1 Type Percentage

Quantity__c Number(10,0) NA The total no of discount NA


2 Total coupons available 10
Quantity

RemainingQuantity__c Number(10,0) NA Total no of discount NA


3 Remaining coupons available 10
Quantity

ExpiryDate__c Date NA Indicates when the NA NA


4 Expiry Date coupon will be expired

Expired__c Formula : NA Indicates if the coupon is


5 Expired ExpiryDate < expired or not
Today

16
Flat_Discount__C Currency(10,2) Required if type
6 Flat is Flat
Discount

Discount__c Percentage(3) Required if type


7 % Discount if Percentage

17
1.5 Address Book Custom Fields:

Sr.N Field label Field API DataType HelpText Options Length Note

Steet__C Text Street of the address NA


1 Street 255 NA

City__c Text The customer City


2 City 80

State__c Text Customer Stat


3 State__c 10

Country__c Picklist The Country which All https://datahub.io/core


4 Country customer belongs to available /country-list
countries

PostalCode__c Number The Area Postal Code


5 Postal Code 6

LandMark__c Text The Landmark for


6 Landmark Location detection 255

18
User__c Lookup The parent customer NA NA NA
7 Customer (User) who is creating the
address

1.6 Order:

SR.N Field Label Field API DataType Help Text Options Lengt
h

AccountName__c Lookup to Parent Account related to customer NA


1 Account Account
Name

Customer__c Lookup to The customer record under which NA


2 Customer Contact order is created

19
Status__c PickList Status of the Order Record Open, In Process,
3 Status Dispatched, Shipped, Out
for Delivery, Delivered,
Closed, Return
Requested, Returned,
Cancelled

ShippingAddress__c TextArea Long Shipping Address of the Order


4 Shipping 500
Address

BillingAddress__c TextAres Long Billing Address of the Order


5 Billing 500
Address

TotalItems__c Rollup: SUM of The order Quantity


6 Total Items All Order Item
Quantity

Total__c Rollup: SUM of Order Amount


7 Total All Order Item
Total

PaymentStatus__c PAID, COD, Status of the Payment for the order


8 Payment Partially Paid,
Status EMI

20
AmountPaid__c Rollup: SUM of The amount which has been paid for
9 Paid All Payment the order record.
Amount Record Amount

Name ( Standard Auto Number: The Unique Identifer for the order
10 Order Name Field) Format : record
Number (O-000000)

OrderDate__c DateTime Order date


11 Order Date

DeliverDate__C Date The date which the order has been


12 Delivered delivered
Date

ExpectedDate__c Date The expected delivery date of the


13 Expected order
Delivery
Date

21
PaymentMethod__c Picklist COD, Net Banking, CC, Debit Card,
14 Payment EMI, Wallet
Method

22
1.7 Order Line Item:

Sr. Field Field API DataType Parent Object Help text length
No Label Name

Order__c Master-Detail Order The related order NA


1 Order

Product__c Lookup Product The item to be included & This will be made NA
2 Product required from the Validation Rule

Quantity__c( Number(6,2) NA The total no of items to be included in the order


3 Quantity Required) 8

Total__c Formula Currency NA The total amount for the item


4 Total ( 16, 2 ) ( Quantity 8
* Unit Price )

ListPrice__c Currency(6,2) NA The List price of the item


5 List 9
Price

UnitPrice__c Currency(6,2) NA The actual price of the item.


6 Unit ( required ) 9
Price

23
1.8 Product - custom fields:

Sr. Field Label Field API DataType Help Text Length


No

TotalQuantity__c ( Number(8) The total quantity for the


1 Inventory required ) product 10

RemainingQuantity__ Number(8)
2 Remaining c ( required )
Quantity

Discount__c Checkbox If true the product is NA


3 Offer available for the OFF
Available SALE

Rating__c Rollup Summary ( The avg rating of the NA Note:- Do not include this
4 Rating AVG: Rating of ALL product field as part of initial
Product Rating ) development

TotalRating__c Rollup Summary ( All Ratings related to the NA Note:- Do not include this
5 Total SUM: Rating of ALL product field as part of initial
Rating Product Rating ) development

24
1.9 Product Offers Custom Fields:

Sr. Field Field API DataType Parent Options Length Note HelpText
No Label Object

1 Product__C Lookup Product NA NA This will be made This will be


Product required from the made required
Validation Rule from the
Validation Rule

Discount__c M-D Coupon__c NA NA NA


2 Offer

Sequence__ Number(3,0) NA NA NA NA
3 Sequenc c
e

25
1.10 Category Custom fields:

Sr. Field Label Field API DataType Parent Options Length Note HelpText
No Object

Name Text NA NA
1 Name 80 This is the standard field
provided by salesforce

Sequence__c Number(4,0 NA NA The sequence for the


2 Sequence ) 4 category to be displayed

ParentCategory Lookup Category__ Na NA NA The parent category if


3 Parent __c c this is the child category
Category

26
1.11 Product Category Custom Fields:

Sr. Field Field API DataType Parent Options Length Note HelpText
No Label Object

Product__c Lookup Product NA NA This will be made required The product for the
1 Product from the Validation Rule category

Category__c Master-Det Category__c NA NA NA The category for the


2 Category ail product

Sequence__ Number(3,0 NA NA The sequence for the


3 Sequenc c ) 3 NA category to be displayed
e

27
1.12 Cart custom fields:

Sr. Field Field API DataType Pare Options Length Note HelpText
No Label nt
Obje
ct

1 Cart # Name AutoNumber NA NA 80 Standard Name The auto-generated Id for the cart record
Field

2 Cart Id CartId__c Text NA NA 255 The actual Id for the cart will be the unique
Id for all the carts. Note while creating the
cart generates a random string

3 Status Status__c Picklist NA Open, NA NA The status of the cart. By default, all carts
Closed, will be open and only one cart can be open
Ordered for a customer at a time

4 Total Quantity__c Rollup NA NA 3 NA The total Quantity related to this cart record
Quantity Summary: SUM
of All Quantity
for the related
cart Item record

5 Total Amount__c Rollup


Amount Summary: SUM
of All Total
Amount for the
related cart Item
record

28
6 Custom Customer__ Lookup Cont NA NA This will be made The customer record who have created the
er c act required from the cart
Validation Rule

7 Account Account__C Acco NA NA The value for this The account of the customer who has
unt field be auto created the cart record
populated from the
automation tool

29
1.13 Cart Item custom fields:

Sr. Field Field API DataType Parent Options Length Note HelpText
No Label Object

1 Item # Name AutoNumber NA NA 80 Standard Name The auto-generated Id for the cart
Field item record

2 Cart Id Cart__c Master-Detail Cart__c NA NA NA The parent cart under which the
item is added

3 Product Product__c Lookup Product__c NA NA This will be made The product record which is added
required from the as item under the cart record
Validation Rule

4 Quantity Quantity__c( Number(4,0) NA NA 4 NA The total no of items to be included


Required ) into the cart

5 Amount Amount__c ( Currency(4,0) NA NA 4 NA The Amount for the single item


Required ) record

6 Total TotalAmount__c Formula: NA NA NA NA Total amount for the item record


Amount Currency(Quantity*
Amount)

7 List ListPrice__c Currency(4,0) NA NA 4 This field will be The original amount of the product
Price auto populated before any discount
from the
Automation tool

8 Unit UnitPrice__c ( Currency(4,0) NA NA 4 NA The Selling Price of the Product


Price Required )

30
Module 2 - Develop the Component to be used inside Salesforce

Once you have completed the Data Model for the project, now you need to start the development of the component inside salesforce.

2.1 - Object OWD Setup:

Sr. No Object Name OWD

1 Account Private

2 Contact Controlled By Parent

3 Order Private

4 Order line Controlled By Parent

5 Product Public Read Only

6 Account Request Public Read Only

7 Address Book Private

8 Payment Private

9 Coupons Public Read Only

10 Product Offers Controlled By Parent

11 Product Images Controlled By Parent

12 Categories Public Read Only

31
13 Product Categories Controlled By Parent

14 Cart Private

15 Cart Item Controlled By Parent

2.2 - Functionality related to Account Request Object:

Check the below points and apply your knowledge to achieve the below functionality

1. Once the Account record is created into the System a new Email should be sent to the customer stating that the Account is under review and
we will get back to you within 72 hours.
2. In Addition to the above point, an approval process should also be triggered automatically and this approval process will automatically be
executed and send the email to VP
3. Once VP approved the account then set the status as approved on the Account Request record and Create an Account record with the same
information and also create a contact record under the same Account record.
4. Once the Account record is created then Send an Email to the Customer stating that Your account has been approved and you will be
getting the Credentials in a Separate Email within 24 Hours.
5. If VP Rejects the account a new email should be sent to the customer stating that we can not process the account this time.
6. In case if VP approves the account after the Account and Contact record has been created. Now, create a customer community user and
then send the email to the customer with Login Details.

32
2.3 - Validation Rule:

1. Validation Rule on Coupons Object where Expiry Date should always be greater than today while creating the record.
2. Resource URL and static resource must be populated if the Image Type is Selected as Static Resource on Product Image Record.
3. Static Resource, Resource URL, and URL must be left blank if the Image Type is selected as None on the product Image record.
4. While Creating/updating the Order Record Customer Must be required to select
5. While Creating/updating the Order Line Item it is required to have Product Record selected
6. While Creating/updating the Order Line Item the Quality field is required
7. While Creating/updating the Address Book record Check if the User is blank then Throw Error
8. While Creating/updating the Cart Item the Product & Quantity Field Must be Required
9. While Creating/updating the Product Offer, Check if the Product Field is Blank then show the Error.
10. While Creating/updating the Product Category, Check if the Product Field is Blank then show the Error.

2.4- Functionality Related to Order/Cart Line Item:

1. When an Order Line Item is created then It should automatically populate the ListPrice__c price value with the value which is there in the
related product List price value. Hint: - Please use any automation tool like Process Builder or Flow ( Flow is recommended )
2. When a Cart Item is created then It should automatically populate the ListPrice__c price value with the value which is there in the related
product List price value. Hint: - Please use any automation tool like Process Builder or Flow ( Flow is recommended )

33
2.5 - Functionality Related to Order:

1) Send an email alert to the customer once the order is created into the system. The email must contain the information about
a) Order No
b) Order Amount
c) Discount if Any
d) Shipping Address
e) Estimated Delivery Date
f) Link to Order from where they can see more details
2) Sent an email to the customer once the business has processed the order with the same details as Step #1 and also include Payment status
in this email.
3) Sent an email to the customer once the business has shipped the order with the same details as Step #1
4) Sent an email to the customer once the order is out for delivery with the same details as Step #1
5) Send an email to the customer once the order is delivered with a Survey link.
6) Send an email to the customer if the order is canceled with proper reason.
7) Send the payment reminder to the customer if the order has been created and the customer has not selected COD as the Payment Method.
This email should include
a) Order No and Order Amount
b) Link To Order ( This link should take the user to the community site which you will implement later in the Project )
8) Once the Order is created into the System then All the related Product Remaining Quantity must be updated so that customer can see
updated information on product detail and product list page.
9) Once the Order is Cancelled then also the related product Remaining Quantity must be updated

2.6 Functionality Related to Product Offers:

● Whenever any new Offer is created into the system for Any Product. Send the Email Alert to All the Customers ( Community Users ) with
the Offer and Product Details. Include Product Images into the Email and a Button named “Avail Offer”. If the user clicks on the Button then
the User should be redirected to the Product Detail page into your Community site ( The redirect part will be implemented later everything
else should be there )
● Hint: - Need to Develop an Apex Trigger Here and Develop the Custom Email Template.

34
1. Module 3 - Implement Salesforce Community ( Experience Cloud )
1) Enable Lighting Experience
2) Create a Lightning Experience and Name it “E-Zone”
3) Now, Clone an Existing Profile “Customer Community Plus Login User” and Name it “E-Zone Profile”
4) Give access to all the objects to this profile that are mentioned in the project and for OWD check the above table.
5) Provide field-level access for all the objects
6) Develop Product Categories Component
a) This component will be responsible to display all the product categories.
b) The Parent Category should be displayed and once clicking on the parent category it should show all the related categories if any and
also sort the product list page based on the selected category.
c) Clicking on any category should display the product to a related category only

7) Develop Home Page


a) This is the landing page where the customer will be logged in for the first time
b) This page will contain the below information
i) Cart Details is any open cart
ii) Details of Any open Order
(1) Order No
(2) Order Amount
(3) Shipping Address
(4) Payment Status
iii) Recent Orders in tabular form
iv) Link to Product List Page

35
8) Develop Product List Page:
a) This is the product list page where all the products will be displayed and for all the products the hero image should be displayed.
Check the below list of what all need to have for every product
i) Each row will display max 3 products
ii) For Each product's display
(1) Hero Image
(2) Name
(3) Price
(4) Short Description
(5) In Stock or Out of Stock
(6) Quantity along with -+ button
(7) Add To Cart Button
iii) When clicking on any product image or name it should take to product details where it will show
(1) Image carousel with all the images related to that product
(2) Name
(3) Price
(4) In Stock or Out of Stock
(5) Description
(6) Quantity along with -+ button
(7) Add To Cart Button
(8) Related products

36
9) Develop Add To Cart Functionality:
a) When clicking on Add To Cart button, first it will check if the product is available ( In Stock ) and if yes then it will Add the Product to
Cart. If Necessary Create a Custom Object to store the Cart and Cart Details.
b) Show a Success toast if added
c) Show Error toast if any error happens
d) Show error toast if the product is out of stock

10) Develop Product Detail Page - When clicking on Any product image or name it should take to product details where it will show
a) Image carousel with all the images related to that product
b) Name
c) Price
d) In Stock or Out of Stock
e) Description
f) Quantity along with -+ button
g) Add To Cart Button
h) Related products

11) Develop Cart Details Page - This component will display all the details about the cart. All the items in the cart will be displayed in a row with
the below information
a) Price
b) Quantity
c) Short Description
d) Quantity increase decrease - + button
e) delete button
f) In the end, it will display the total of the cart items
g) It will also show a link to apply the coupon and if users click on Apply Coupon it should open a text field where users can enter the
coupon no. For, next steps check the next point

37
12) Develop Apply Coupon Component: -
a) It should check if the coupon entered by the user is valid or not.
b) If a coupon is valid the check the type of Coupon
c) Depending upon the type apply the coupon on the appropriate product and show the message next to the product
d) Also, show the updated amount of the cart with a message that the coupon has been applied.
e) One customer can only apply one coupon in a cart.
13) Develop Address Component - This component will display all the addresses related to users if any otherwise will ask the address
information from the user both shipping and billing address.
a) The Order should be placed to selected shipping and billing address
14) Develop Payment Page
a) By default, All the Orders should be COD for now
15) Develop Order Detail Page - This is the final destination of the Project which will show all the details of the order including
16) Order No
a) Estimated Delivery Date
b) Total Amount
c) Tax if Any?
d) Shipping and Billing Address side by side
e) All the items in Tabular form
f) Cancel Order & Re-Order button both bottom and top
17) Develop Cancel order Page - When the user clicks on the Cancel Order button then navigate to this page
a) Show a message that all the items will be canceled and the show continue and cancel button
b) If users click on cancel then go to the order details page
c) If the user clicks on Continue then verify if the Order is In process or below stage then Cancel otherwise show the error message that
the Order can not be canceled contact to E-Zone.

38
Module 4 - Integration Payment Gateway

Before we Integrate the Payment Gateway we need some custom objects

1. Payment Authorization
2. Process Exception
3. Gateway Log
4. Refund
5. Invoice

Payment Authorization Custom Fields


In this module, we will integrate the payment gateway and then we will modify the Payment Component to use PayPal or Credit Card as a Payment
Method. You can also use Stripe/Paytm/PayPal depending upon your location.

1. Account Setup
i. For PayPal use - https://www.paypal.com/in/welcome/signup/#/mobile_conflink to Signup
ii. For Stripe Use - https://dashboard.stripe.com/register
iii. For Paytm use - https://developer.paytm.com/docs/v1/payment-gateway
2. Read the Payment Gateway API for Authentication and then Make the request from Postman, SOAPUI, Advanced Rest Client, or any
other Web Service testing Tool
3. Create a Metadata to Store the Client Id, Client Secret
4. Check the possibility of using Named Credentials
5. Ready to Start? Check Next Steps

4.1 Modify Payment Component:

1. Now, as you are ready with the payment gateway it’s time to modify the Payment Page Component
2. The payment Page show all available payment options like
a. Credit Card
b. Stripe

39
c. PayPal
d. Paytm
e. Cash On Delivery
3. Keep Credit Card as Selected and ask the Information about the Card. Note: - Do not save any card details in the System ( Salesforce)
4. Whatever option is selected by the user, ask for the appropriate information
5. Now if the user clicks on proceed to payment then validate all the details by sending the details to API, If payment is a success then
navigate to Order Detail Page otherwise show an error message. “Something went wrong Please try after some time”

Module 5 - Develop My Profile Component:

In this phase, we will focus on the Profile component of the User. So when the user clicks on the My Profile link it should open our custom page and
this page will have the below information.

1. User Details - This will be the selected component by default and will display the basic user information like
i. Name
ii. Email
iii. Phone
iv. Address
2. My Account - If the user clicks on My Account then a New Component should be displayed where it will display all the details of the
account related to that user in read-only mode.
3. My Contact - If the user clicks on My Contact then a New Component should be displayed where it will display all the details of the
contact related to that user in read-only mode.
4. My Orders - When the user clicks on My Orders, then show all the orders to the users and there must be pagination implemented.
This component should have a filter to filter the orders for the selected range of dates. Next to each order, there should be 2 buttons
i. View Details which will take to order detail component
ii. Reorder: - If the user clicks on order then a new cart should be generated with all the items under that order and take the user
to the Cart Details Page
iii. For Further information check Phase 6.
5. My Address - When the User clicks on My Address then it should Open all the addresses in the grid format. So two addresses should
be displayed in 1 row with Edit, Delete HyperLink.

40
i. And there should be a button called add New Address which will add a new address into the system.
ii. This New Address is a new Component where users need to enter the details of the address.
6. My Carts :
i. When the user clicks on My carts then it should show all the carts related to users.
ii. This will be a new Component that will be built on top of LWC

Module 6 - Develop Order List Component:

In this module, you will need to develop the Order List component where you need to develop the order list component to display All the orders
related to the customer.

1. Orders must be displayed in tabular form


2. There must pagination and each page should display 10 records
3. There should be filters to display the order record for a selected date range.

Module 7 - Integrate with External System:

In this module, you will be sending the data to External System to store the order data and from that database, our business will do the order
processing.
As a developer, we only need to raise a platform event and the rest will be taken care of by the external team

7.1 Setup Order Event Platform Event

1. Create a Platform Event and Name it “Order Event” with API Name OrderEvent__e
2. Create All required fields under the Platform Event.
3. This platform event should carry below information from Salesforce
a. Order No
b. AccountId
c. Account Name

41
d. Contact Id
e. Contact Name
f. Contact Email
g. Contact Phone
h. Total Amount
i. Total Quantity
j. Shipping Address
k. Billing Address
l. Payment Status
m. Order Status
4. Once the platform event is ready. It’s time to publish the platform Event.
5. Once an order is created then send all the information using this platform event. Hint: - You need to create the Platform Event.

7.2 Setup Order Update Platform Event:

1. Create a Platform Event and Name it “Order Update”


2. Create the required fields to send the data which are given below
a. Order #
b. Order Status
c. Order Amount

Module 8 - Implement Return Order Functionality:

In this module, We will implement the Return Order functionality. And it will have below functionality

1. The user must be able to return the order


2. The Return button should only display next to the order if the order is in the delivered state
3. If the User clicks on Return next to any order then it will ask for a reason. If the user has provided a valid reason then cancel the order
and Change the State to Return Requested.

42
4. The user should get an email that we have got the request to return the order and it will share the Order No along with the expected
pickup date.
5. Once the order is returned then there should be automation behind the scene which will take all the Line Items quantity and update the
Related product Remaining Quantity to change the Inventory.

Module 9 - Develop Account Request Component:

In this module, you will be implementing the Account Request LWC Component. This component will display the input parameters for all the
information and once the user clicks on submit button then a new record for Account Request must be created and the other functionality should
take place behind the scene.

This component will include all the fields which you have created into the object and all fields must be required to input from the User.

Module 10 - Club Everything into a Single Digital Experience:

10.1 Modify the Digital Experience

1. Add Navigations into the Digital Experience


a. Home - The custom component that you have developed
b. Shop - Add Product List page Here
c. Offers - This is a dummy page where there will be an image saying Coming Soon
d. About - Add some sample text for about
i. Contact Us - Should open a new component that will ask for basic information and creates a case
ii. Request Account - Uses the Account Request component to create an Account Request component
e. FAQ - Add some FAQ here later it will be replaced with Knowledge Article

10.2 - Modify User Profile and User Setting Page:

1. Open User Profile Page and Add My Profile Component There that you have developed

43
2. Open User Setting page and add My Profile Component There that you have developed

Module 11 - Setup Email to Case and Web to Case:

1. Setup email to case so that customers can directly send the email for their issues or for any inquiry
2. Set up the web to case so that users can create the case from the website directly

Module 12 - Enable Knowledge Article and Create some knowledge Articles:

Watch this video - https://www.youtube.com/watch?v=eCbRUDGO79w

Module 13 - Setup Omnichannel and add the omnichannel into the digital experience:

13.1 Check out this video on how to enable omnichannel - https://www.youtube.com/watch?v=MS58u13uAQI&t=35s4


13.2 Add the Omnichannel into Digital Experience so that customers can chat with Sales/Service Reps

Module 14 - Add the Knowledge article into a digital experience:

Modify the FAQ tab and show all your knowledge articles there and these articles must be public. Check out the below video for the same
https://www.youtube.com/watch?v=oKRFsKQCp8c&list=PLaGX-30v1lh0yjm8UbB-4smaykJzCsH2y&index=6

Module 15 - Go Live & Celebration:

44
45
Phase 2

Module 1 - Create necessary objects:

​ Wishlist - The custom object to store the wishlist created by the user
​ Wishlist Items - The child of the Wishlist object which will contain the information about the product added to the wish list
​ Related Products - The custom object which will contain the information about the similar related products
​ Product Ratings - The custom object contains the information about the product rating.

1.1 Create Fields for WishList Object

Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object

1 Product Product__c Lookup Product NA The related product NA NA

2 URL URL__c Url NA NA The URL for the image Na NA

3 Image Type__c PickList NA URL, Static The type of image which will Na NA
Type Resource, determine what to display
None

4 Static Resource__c Text NA NA Required if Static Resource is Na Na


Resource Selected in Image Type

5 Resource ResourceURL Text NA NA Contains the fully Qualified NA NA


URL __c Path of the image to be shown
on the product detail page

6 Hero HeroImage__ CheckBo NA NA If Selected this image will be NA NA


Image c x displayed on the Product List
Page

46
1.2 Create Fields for WishList Items Object:

Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object

1 User User__c Lookup User NA The User who is creating the NA NA


Wishlist

2 Name Name AutoNumber : NA NA The name of the WishList 80 This is standard


{ITEM-{0000} Name Field
Starting
Number: 1

3 WishList WishList__ Master-Details WishList__c NA The wishlist under which the NA NA


c items is created

4 Product Product__c Lookup Product NA The product which is being NA NA


added as Wishlist Item

1.3 Create Fields for Related Product Object:​

Sr. No Field Field API DataType Parent Options HelpText Length Note
Label Object

1 Product Product__c Lookup Product NA The Parent product NA NA

2 Show on Visible__c Checkbox NA NA If checked, the product will be


Page visible on the Product Detail Page

47
1.4 Create Fields for Product Rating:

Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object

1 Product Product__c Lookup Product NA The Parent product NA NA

2 Comment Comment__c Text Area NA NA The Rating Comment entered by NA NA


Rich the user

3 Rating Rating__c(Required) Number(1) NA NA The * Rating provided by the NA NA


customer

4 User User__C Lookup User NA The customer who has rated the NA NA
Product

48
Module 2 - Validation Rule Setup:

2.1 While creating or updating the Wishlist Object User must be selected.
2.2 While Creating the Wishlist Item the User & Product must be selected.
2.3 While Creating the Related Product it is required to select Product
2.4 While Creating the Product Rating, all the fields are required

Module 2 - Develop Related Product Component

Develop a Lighting Web Component that will sit inside the Product Detail Page and will display the related products if there are any. If there is no
related product then it will show “No Related Products”

In the related products tab, it should be showing the Short Description of the Product and The product Thumbnail along with the Unit Price.

It should also have the ability to add the product to the cart itself.

Here is the tab mockup for the Product detail page

49
Module 3 - Develop Rating Component:

Develop a New Lightning Web Component which will display the Product Rating under the Product Detail Page.
This component should display rating like below.

Module 4 - Modify the Product List Component:

Modify the Product List Component to display the Average rating next to each product. And rating should be displayed in the form of *. You might
need to develop the rating component separately.

50

You might also like