Create 'Apply Header Discount' UI Action in Quote table - Order Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
On CSM/ FSM Configurable workspace, there is a Declarative action 'Apply Header discount' and I want to replicate that functionality as UI Action on Quote table. I tried referring to all the related tables for that declarative action and didn't find the actual script it is executing.
When I use script tracer to tracer the changes for that declarative action, multiple tables are involved and multiple business rules are being triggerred.
Any inputs regarding this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hai @PhaniN
The “Apply Header Discount” declarative action in CSM/FSM Workspace is usually handled through a combination of Workspace client actions, Script Includes, APIs, Flow/BR logic, and recalculation engines rather than a single visible script like traditional UI Actions.
Since script tracer is showing multiple Business Rules and related tables, that behavior is expected because header discount updates normally trigger:
Quote line recalculations
Pricing engine logic
Tax/amount recalculations
Totals synchronization
A better approach would be:
Inspect the Declarative Action record and check for:
UX Form Action
Client Action
Action Assignment Definitions
Data Broker / Scripted REST / Script Include references
Enable Debug Business Rule + Debug Security and monitor logs while executing the action.
Check whether the workspace action is calling:
sn_cpq
sn_om
pricing-related Script Includes/APIs
Instead of recreating the entire logic manually in a UI Action, try invoking the same underlying Script Include/API used by the workspace action after identifying it.
Directly updating discount fields via UI Action may not trigger all dependent recalculations correctly unless the pricing engine methods are also executed.
If you find the exact underlying API or Script Include used, please share it here — it would help others facing the same requirement.
If this helps solve the issue, please mark it as Helpful.