The order management system is a Salesforce app and environment meant to facilitate the creation and approval of orders generated by a firm’s clients. The firm’s order-handling team comprises employees in sales, business, and support roles. The system is meant to handle how an employee interacts with and handles order and client data while overriding the standard sales cloud utility with customizable lightning web components.
Scope
Inscope
1. Support user, Business User, and Sales User were given their own specific functionality as per the use case.
2. Order approval was automated.
3. Triggers were used to apply business logic.
4. Lightning Web Components used to create app home page and override actions(wrapped in aura component).
Outscore
1. Ensuring code coverage using test classes, to prepare for deployment was not done.
2. Batch apex jobs that could remove empty orders on a timely basis.
3. Limited salesforce license reduced the number of users.
Classes and Constituents
Users
Contains data such as EmailId, UserId, Password, Username, and utility controls such as profiles, roles, managers, and licenses, which are then used to configure sharing of data and utility.
Accounts
Contains data of the Clients such as their Contact information, related deals, and trade.
Orders
Contains order details to record client order data and facilitate order handling.
Invoices
It has payment data and progression details for an order.
Price books
Contains price lists and products
Products
Contains product details and stock details
Components
Lightning Web Components
Lightning Web Components were used to:
1. Creating an Order, using the lightning-record-edit-data form
2. Searching Products, using a Controller and an Apex imperative call
3. Adding Order Line Items, using a Controller and an Apex imperative cal
4. Generating the Order Summary
5. Overriding the New Order button on the Order home page, using a lightning Aura Component which calls a lightning web component.
Apex Triggers
1. Trigger on User Object:
Used to restrict the manager of a sales user to a business user. Also checks and restrains the number of accounts managed by a user based on profile.
2. Trigger on Account Object:
Sets email opt-out for an account’s contacts
3. Trigger on Order Object:
Used to control reversion of order stage
4. Trigger on OrderItem Object:
Used to maintain the stock quantity and update it
5. Trigger on Invoice Object:
Used to update the Order stage upon invoice generation
Approval Processes
Order Approval Process:
The order approval process works by directly approving orders having amounts under 100,000 dollars, and requiring a manager’s approval for orders above that.
Visit the Order Management System Salesforce Project Page, Download this project for reference purposes.
I want order management project where we can download