Skip to main content

Use Custom JavaScript Helpers in Scenario Editor

  1. We are calling the JS function from the DS script and it returns the values after evaluation

The JS function that we have created is shown below

VsgzdZafeZ0RjkPU-b2d15578a9c8.png

This function will calculate a 10% discount on a Price that is entered. The usage of function in TD script is shown below

JkhfWQs0WC8KPKta-40fab5636b65.png

2. We can also make use of the Custom JS action in DS and then fetch the value using the locker

wDmjsG6bgaEnIwTN-08ddc2c4dee9.png iCCjRRJftNCxa0No-c20497d428ee.png

If you have any feedback on this topic, please contact us at documentation@appvance.ai

Last updated: October 16, 2026