Order Management System
Order Management System
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.
6
End-User Functionalities
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
9
1.2 Payment Custom Fields:
Sr. Field Label Field API DataType Parent Options HelpText Leng Note
No Object th
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
12
BillingCity__ Text
6 Billing City 80
BillingState__c Text
7 Billing 40
State
BillingPostalCode__C Text
8 Billing 6
Postal
Code
ShippingCity__c
11 Shipping
City
13
ShippingState__c
12 Shipping
State
ShippingPostalCode__
13 Shipping C
Postal
Code
14
FirstName__c Text NA The First Name of the NA
17 Primary Primary Contact 80
Contact
First Name
15
1.4 Coupons Custom Fields:
Sr. Field Label Field API DataType Options Help Text Parent Len Note
No Object gth
16
Flat_Discount__C Currency(10,2) Required if type
6 Flat is Flat
Discount
17
1.5 Address Book Custom Fields:
Sr.N Field label Field API DataType HelpText Options Length Note
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
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
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)
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
Product__c Lookup Product The item to be included & This will be made NA
2 Product required from the Validation Rule
23
1.8 Product - custom fields:
RemainingQuantity__ Number(8)
2 Remaining c ( required )
Quantity
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
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
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
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
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
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
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.
1 Account Private
3 Order Private
8 Payment Private
31
13 Product Categories Controlled By Parent
14 Cart Private
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.
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
● 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
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
1. Payment Authorization
2. Process Exception
3. Gateway Log
4. Refund
5. Invoice
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
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”
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
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.
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
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.
In this module, We will implement the Return Order functionality. And it will have below functionality
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.
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.
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
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 13 - Setup Omnichannel and add the omnichannel into the 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
44
45
Phase 2
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.
Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object
3 Image Type__c PickList NA URL, Static The type of image which will Na NA
Type Resource, determine what to display
None
46
1.2 Create Fields for WishList Items Object:
Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object
Sr. No Field Field API DataType Parent Options HelpText Length Note
Label Object
47
1.4 Create Fields for Product Rating:
Sr. Field Field API DataType Parent Options HelpText Length Note
No Label Object
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
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.
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.
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