Explore Business Logic Extensibility
Learning Objectives
After completing this unit, you’ll be able to:
- Define business logic extensibility as an extension to UI extensibility.
- Identify scenarios where business logic extensibility can address complex order-capture requirements.
- Describe how to use business logic extensibility with Lightning Web Components and custom logic.
Business Logic Extensibility Through LWC
So far, you’ve explored Online Order Extensibility to customize the UI of advanced order pages. By adding, removing, or reordering fields, you can tailor the interface and uplift the user experience.
But customization doesn’t stop there. Business Logic Extensibility goes further by giving you precise control over the underlying logic of order pages. With this feature, you can tailor the order-capture process with even richer and more dynamic functionality.
Use Business Logic Extensibility to modify or extend business logic through Lightning web components or APEX classes. These features support complex functionality, such as calculations, validations, and custom workflows, directly from order pages.
Use the interactive element to learn about the key features of Business Logic Extensibility.
Using Business Logic Extensibility
Alpine Group regularly handles bulk orders that require close monitoring of product weights to ensure compliance with shipping rules. However, their current order templates in CG Cloud don’t support the necessary calculations or validations.
Always looking for ways to improve the order-capture process, Fatima uses Business Logic Extensibility to add an Order Checklist component/field to the advanced order page. This new component determines the individual and total weight of products, calculates freight charges based on the total weight, and triggers an alert if the total weight exceeds the allowable shipping limit.
Fatima realizes CG Cloud’s standard templates need more customization to cater for the calculations. To solve this, she uses Business Logic Extensibility to customize the order-capture process. This way, Alpine can streamline their operations and ensure error-free order processing.
Here’s how Fatima implements the solution using Business Logic Extensibility.
1. Create a Custom LWC and integrate the LWC with the Order Page: Fatima develops a Lightning web component named Order Checklist, which performs:
- Weight calculations for individual products
- Aggregation of the total order weight
- Freight charge computation based on the total weight
- Real-time validation to flag excessive order weights
She adds the custom Order Checklist to the Advanced Orders Lightning record page, which works with standard components to display real-time data.
2. Update the Save Button Logic: Fatima configures the Save button to trigger the custom logic through an API, ensuring all calculations and validations run before finalizing the order.
3. Enhance the UI Using Online Order Extensibility: Fatima complements the business logic changes by adding a Weight column to the Order Items grid. This column displays individual item weights and the total weight directly on the page.
With the new Order Checklist field displayed, thanks to Business Logic Extensibility, Alpine Group’s order-capture process is significantly improved.
This example highlights how Business Logic Extensibility empowers businesses to build on standard templates to address unique operational challenges. To learn more about Business Logic Extensibility, see Business Logic (BL) Extensibility.
Wrap Up
In this final unit, you discovered how Business Logic Extensibility goes beyond UI customization, so you can tailor advanced order processes with custom logic. By integrating tools like Lightning Web Components and APEX, you can introduce dynamic workflows, validations, and calculations that makes business operations smoother.
While Fatima plans to explore Business Logic extensibility in greater depth for future projects, her current work has already transformed the order-capture experience at Alpine Group. By using both Online Order Extensibility and Business Logic Extensibility, she’s set up the businesses to create efficient, personalized, and scalable solutions for complex order requirements.
Now it’s your turn to apply what you’ve learned in your own organization. Go forth and streamline your order-capture process, uplift the user experience, and enjoy the success.