To extend or modify the business logic, create a Lightning Web Component (LWC) and add
it to the orders Lightning record page. With the custom LWC component, you can create
interactions with the standard components and modify the existing order. Any changes to the data
using the custom LWC component are reflected in the standard components.
Required Editions
| Available in: Lightning Experience in Professional, Enterprise, and
Unlimited Editions that have Consumer Goods Cloud enabled
|
Create custom objects, store data, and access the custom object data by using the custom
LWC.
Add custom validations for various order fields or add validations for custom fields of the
custom object. When the user clicks Save on an order, all custom validations must pass
successfully before they can save the order.
LWC extensibility examples:
- Update the order fields such as order currency and order name in the order header, or
update the custom text in the delivery note on the order details page.
- Calculate the total order weight based on the weight of the order items.
- Validate existing fields such as gross total (above a certain limit), delivery date
(duration or day of delivery), and responsible (mandatory check).
- orderExtensionUtils Service Component
To extract data from orders and push new data into orders, use the orderExtensionUtils service component to hook on the order state.
- orderExtensionUtils Service Component Methods
To access the retail order data, you can use a few out-of-the-box APIs that are exposed in the orderExtensionUtils service component. Example: Accesses order data when the getorderdata API is invoked from the custom LWC component.