Order Management Project
Order Management 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 be a digital experience built on top of the
Salesforce Platform where users can perform the below tasks.
END-USER FUNCTIONALITIES
1. The user Must be able to see the cases and work on those
2. User Must be able to see the knowledge article and then attach those articles to that case
3. Can Work on Orders and Edit those order records
4. User Must be able to see the Account Request record and approve/reject them
NOTE: -
1. There might be some requirements that will not be mentioned in the document and you also need to implement that if
you implement anything which is not outlined in the requirement then consult with the client/ senior and then implement
that part.
2. 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
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.
1. Account - Standard Salesforce Component which will be used as the Parent of the End Customer ( Community User )
2. Contact - Standard Salesforce Component which will be used to create the Community User in Salesforce.
3. 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.
4. 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.
5. Product - Standard Salesforce Object
6. Account Request - Custom Salesforce Object which will be used to request a new account for the community.
7. Address Book - Custom Salesforce Object to store the address information
8. Payments - Custom Salesforce Object to store the information about the payment of order records.
9. Coupons - Custom Objects to store the coupon and
10. Product Offers - Junction object between product and Coupons to indicate which product is eligible for the offer
11. Product Images - A Child object to the Product that will store the Images related to the Product.
12. Cart - The custom object which will store the information about the current cart of the user
13. Cart Items - The child of the cart object is associated with the Master-Detail relationship and will contain all the
information about the items which the user has added to the cart.
14. Categories - Custom objects hold the name of the category with which the product will be associated.
15. Product Categories - Custom salesforce object which will be the child of category and product to link product and
category.
THE BELOW OBJECTS ARE NOT INCLUDED IN THE FIRST PHASE OF THE PRODUCT LAUNCH
1. Wishlist - The custom object to store the wishlist created by the user
2. Wishlist Items - The child of the Wishlist object which will contain the information about the product added to the wish
list
3. Related Products
4. Product Ratings
The type of
URL, Static image which
3 Image Type Type c PickList NA Resource, will determine Na NA
None what to display
Required if
Static
Static
4 Resource Resource c Text NA NA Resource is Na Na
Selected in
Image Type
Contains the
fully Qualified
Path of the
ResourceURL
5 Resource URL Text NA NA image to be NA NA
c shown on the
product detail
page
If Selected this
image will be
6 Hero Image HeroImage c CheckBox NA NA displayed on NA NA
the Product List
Page
1.2 PAYMENT CUSTOM FIELDS
Sr. No Field Label Field API DataType Parent Object Options HelpText Length Note
The related
customer who
1 Customer Customer C Lookup Contact NA
is making the
payment
Created, Failed,
Success, Hold,
3 Status Status C Picklist NA Review,
Declined
The Total
4 Amount Amount c Currency(10,0) NA TNA amount of the 10
payment
The Unique Id
TransactionId_
6 Transaction Id text NA NA of the 255
_c transaction Id
The Name of
1 Name Name Text the Account NA 80 NA
Open, In
Process, The status of
2 Status Statuc c Picklist Approved, the Account NA NA
Declined, Hold
Phone of the
3 Phone Phone c Phone NA Account NA NA
Owner
The Email for
4 Email Email C Email NA the customer
ShippingStreet
10 Shipping Address of the
Street c Customer
ShippingCity_
11 Shipping City
_
ShippingState
12 Shipping State c
Shipping ShippingPosta
13 Postal Code lCode C
Shipping ShippingCount All available
14 Country ry c PickList countries
Description
15 Description C TextArex Long NA 500
The date of
16 Date of Birth DOB c Date NA birth of the NA NA NA
customer
The First
Primary
Name of the
17 Contact First FirstName c Text NA NA 80
Primary
Name
Contact
The Last
Primary Name of the
18 Contact Last LastName C Text NA Primary NA 80 NA
Name Contact
The email of
PrimaryEmail_
19 Primary Email NA the promary NA NA
Contact Email _c Contact
The title of the
20 Primary PrimaryTitle primary
Text Na NA 255 NA
Contact Title c Contact
The phone no
21 Primary Contact PrimaryPhone Phone NA of the primary NA NA NA
Phone Contact
1.4 COUPONS CUSTOM FIELDS
Sr. No Field Label Field API DataType Options Help Text Parent Object Length Note
Flat, The type of
1 Type Type c PickList Percentage discount NA NA
The total no of
discount
2 Total Quantity Quantity c Number(10,0) NA NA 10
coupons
available
Total no of
discount
3 Remaining RemainingQu Number(10,0) NA NA 10
Quantity antity c coupons availble
Indicates when
4 Expiry Date ExpiryDate c Date NA the coupon will NA NA
be expired
Sr.N Field label Field API DataType HelpText Options Length Note
Street of the
1 Street Steet C Text address NA 255 NA
The Landmark
6 Land Mark LandMark c Text for Location 255
detetection
The parent
customer who
7 Customer User c Lookup (User) is creating the NA NA NA
address
1.6 ORDER
SR.
Field Label Field API DataType Help Text Options Length
N
Parent Account
1 Account Name AccountName c Lookup to Account related to NA
customer
The customer
record under
2 Customer Customer c Lookup to Contact which order is NA
created
Open, In
Process,
Dispatched,
Shipped, Out for
Status of the Delivery,
3 Status Status c PickList
Order Record Delivered,
Closed, Return
Requested,
Returned,
Cancelled
Shipping
4 Shipping Address ShippingAddress c TextArea Long Address of the 500
Order
Billing Address
5 Billing Address BillingAddress c TextAres Long 500
of the Order
The order
6 Total Items TotalItems c Rollup: SUM of All Order Item Quantity Quantity
7 Total Total c Rollup: SUM of All Order Item Total Order Amount
Status of the
8 Payment Status PaymentStatus c PAID, COD, Partially Paid, EMI Payment for
the order
The amount
which has
9 Paid Amount AmountPaid c Rollup: SUM of All Payment Record Amount been paid for
order record.
The Unique
10 Order Number Name ( Standard Name Field) Auto Number: Format : (O-000000) Identifer for the
order record
The expected
13 Expected Delivery Date ExpectedDate c Date delivery date
of the order
COD, Net
Banking, CC,
14 Payment Method PaymentMethod c Picklist
Debit Card,
EMI, Wallet
1.7 ORDER LINE ITEM
TotalQuantity_
1 Inventory Number(8) The total quantity for the product 10
_c ( required )
RemainingQu
Remaining
2 antity c ( Number(8)
Quantity
required )
If true the product is available for the OFF
3 Offer Available Discount c Checkbox NA
SALE
Sr. No Field Label Field API DataType Parent Object Options Length Note HelpText
Sr. No Field Label Field API DataType Parent Object Options Length Note HelpText
This is the
standard field
1 Name Name Text NA NA 80
provided by
salesforce
The sequence
for the
2 Sequence Sequence c Number(4,0) NA NA 4
category to be
displayed
The parent
Parent ParentCategor y category if this
3 Category c Lookup Category c Na NA NA is the child
category
1.11 PRODUCT CATEGORY CUSTOM FIELDS
Sr. No Field Label Field API DataType Parent Object Options Length Note HelpText
This will be
made required The product for
1 Product Product c Lookup Product NA NA from the the category
Validation Rule
The category
2 Category Category c Master-Detail Category c NA NA NA
for the product
The sequence
for the
3 Sequence Sequence c Number(3,0) NA NA 3 NA category to be
displayed
The actual Id
for the cart will
be the unique
Id for all the
2 Cart Id CartId c Text NA NA 255 carts. Note
while creating
the cart
generates a
random string
The status of
the cart. By
default, all
Open, Closed, carts will be
3 Status Status c Picklist NA Ordered NA NA open and only
one cart can
be open for a
customer at a
time
Rollup
Summary: The total
4 Total Quantity Quantity c SUM of All NA NA 3 NA Quantity
Quantity for the related to this
related cart cart record
Item record
Rollup
Summary:
SUM of All
5 Total Amount Amount c Total Amount
for the related
cart Item
record
8
9
10
1.13 CART ITEM CUSTOM FIELDS
Sr. No Field Label Field API DataType Parent Object Options Length Note HelpText
The auto-
Standard generated Id
1 Item # Name AutoNumber NA NA 80 Name Field for the cart
item record
The parent cart
under which
2 Cart Id Cart c Master-Detail Cart c NA NA NA the item is
added
Once you have completed the Data Model for the project, now you need to start the development of the component inside
salesforce.
Check the below points and apply your knowledge to achieve the below functionality.
1. Once 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 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.
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 the 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 )
2.5 - FUNCTIONALITY RELATED TO ORDER
1. Send an email alert to the customer once the order is created in 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. Sent an email to the customer once the order is delivered with a Survey link.
6. Sent an email to the customer if the order is canceled with the proper reason.
7. Sent 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
b. Order Amount
c. 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 Quantities must be updated so that
the customer can see updated information on product detail and the product list page.
9. Once the Order is Cancelled then also the related product's Remaining Quantity must be updated
1. Payment Authorization
2. Process Exception
3. Gateway Log
4. Refund
5. Invoice
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 on your location.
1. Account Setup
a. For PayPal use - https://www.paypal.com/in/welcome/signup/#/mobile_conf link to Signup
b. For Stripe Use - https://dashboard.stripe.com/register
c. 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 Webservice 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 shows all available payment options like
a. Credit Card
b. Stripe
c. PayPal
d. Paytm
e. Cash On Delivery
3. Keep the Credit Card as Selected and ask for 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
a. Name
b. Email
c. Phone
d. 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 shows 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
a. View Details which will take to order detail component
b. Reorder: - If the user clicks on the order then a new cart should be generated with all the items under that order
and take the user to the Cart Details Page
c. 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.
a. And there should be a button called add New Address which will add a new address to the system.
b. This New Address is a new Component where users need to enter the details of the address.
6. My Carts :
a. When the user clicks on My carts then it should show all the carts related to users.
b. 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 the 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 the below information from Salesforce
a. Order No
b. AccountId
c. Account Name
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 the below functionality
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 be input from
the User.
Module 10 - Club Everything into a Single Digital Experience
10.1 MODIFY THE DIGITAL EXPERIENCE
1. Open User Profile Page and Add My Profile Component There that you have developed
2. Open the User Setting page and add the 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
Module 15 - Go Live & Celebration
Phase 2 -
Module 1 - Create necessary objects
1. Wishlist - The custom object to store the wishlist created by the user
2. Wishlist Items - The child of the Wishlist object which will contain the information about the product added to the wish
list
3. Related Products - The custom object which will contain information about the similar related products
4. Product Ratings - The custom object contains information about the product rating.
Sr. No Field Label Field API DataType Parent Object Options HelpText Length Note
This is
The name of
2 Name Name Text NA NA 80 standard
the WishList
Name Field
If checked then
the wishlist will
3 Public Public c Checkbox NA NA NA NA
be publically
visible
1.2 CREATE FIELDS FOR WISHLIST ITEMS OBJECT
Sr. No Field Label Field API DataType Parent Object Options HelpText Length Note
The wishlist
under which
3 WishList WishList c Master-Details WishList c NA NA NA
the items is
created
The product
which is being
4 Product Product c Lookup Product NA NA NA
added as
Wishlist Item
Sr. No Field Label Field API DataType Parent Object Options HelpText Length Note
The Parent
1 Product Product c Lookup Product NA NA NA
product
If checked, the
product will be
2 Show on Page Visible c Checkbox NA NA visible on the
Product Detail
Page
Sr. No Field Label Field API DataType Parent Object Options HelpText Length Note
The Parent
1 Product Product c Lookup Product NA NA NA
product
The Rating
Comment
2 Comment Comment c Text Area Rich NA NA NA NA
entered by the
user
The * Rating
Rating c(Re
3 Rating Number(1) NA NA provided by NA NA
quired)
the customer
The customer
4 User User C Lookup User NA who has rated NA NA
the Product
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 the 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 List Price. It should also be having the ability to add the product to the cart itself. Here is the tab mockup for the Product detail page
Module 3 - Develop Rating Component
Develop a New Lightning Web Component which will display the Product Raring under the Product Detail Page.
This component should display a 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.