---
schema_version: "1"
id: 76da6f94c5b9164cc5fd1e22eac3e1e5c1aca46619330213badfd027a8c90d82
title: Business Logic Extensibility Through LWC
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_concept_admin_order_bl_extensibility_lwc.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_concept_admin_order_bl_extensibility_lwc.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c1ee1d34a514365d4a5e0fdd1a89754e084bee8f3c6a0477d586db1966a399fb
description: 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.
products:
  - Consumer Goods
release: "264"
---
# Business Logic Extensibility Through LWC

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_important.png)

Important All LWC customizations are order-specific.

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).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

Note Only the Gross Total and the Value fields on the order header are reactive (changes are reflected without invoking the save method). The remaining fields on the order pages are updated only when the user clicks Save.

- **[orderExtensionUtils Service Component](https://help.salesforce.com/s/articleView?id=ind.cg_task_admin_orderextension_service_component.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=ind.cg_task_admin_orderextension_service_component_methods.htm&release=264.0.0&type=5)**  
    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.

#### See Also

- [Create Lighting Web Components](https://developer.salesforce.com/docs/platform/lwc/guide/create-components-introduction.html)
- [Configure a Component for Lighting App Builder](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-app-builder.html)