How to execute rules using Groovy on Order Management Extensions?
Summary:
I need to create an extension to achieve the following casuistry:
1. When the integration creates the sales order (SOURCE_ORDER_SYSTEM different to "OPS"), I need the extension to leave the "CARRIER ID / ShipModeOfTransportCode / ShipClassOfServiceCode" fields blank and the payload integration that will create this sales order will send that information and not the application.
2. When a user creates the sales order manually (SOURCE_ORDER_SYSTEM as "OPS"), the application will map the "CARRIER ID / ShipModeOfTransportCode / ShipClassOfServiceCode" fields according to the existing configuration.
I already achieved the second point, but I still to achieve the first point, please review the below extension and tell me what should i update on it? :