Loading
Set Up and Maintain Retail Execution
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Business Logic Extensibility Through LWC

          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

          Available in: Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
          Important
          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
          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
            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.
           
          Loading
          Salesforce Help | Article