Business logic extensibility for online advanced orders
Key Takeaway
When custom logic changes an order on the Agentforce Consumer Goods desktop app, only the Gross Total and Value fields on the order header show the change right away. Every other field updates only after the user clicks "Save".
Business logic extensibility for orders lets you adjust or add to the standard order logic on the Agentforce Consumer Goods desktop app. You can also use it to change the list of products shown in the proposal list of an order. There are two ways to build the custom logic: as a Lightning Web Component (LWC) on the orders Lightning record page, or as a custom Apex class. The custom logic runs through an API when the user clicks Save on an order.
When the custom logic runs
Clicking the Save button on the orders UI calls your custom logic through an API. You can run your custom logic before or after the core logic, which is the save action.
When the user clicks Save, every custom validation must pass before the order can be saved.
Your team adds a custom validation that the Responsible field must be filled in. A sales rep, Marco, builds an order for a grocery chain and leaves Responsible empty. He clicks Save. The validation fails, so the order isn't saved. Marco fills in Responsible and clicks Save again. Every custom validation now passes, and the order saves.