Most visual flow builders are limited to rigid linear menus. If you need to calculate complex pricing, parse formatted date objects, or perform arithmetic discount mappings, you are forced to deploy custom webhooks.
Botalyzer solves this using the **JavaScript Sandbox Node**. You can write standard JS directly inside the canvas:
const subtotal = parseFloat(variables.cart_total);
const code = variables.discount_code;
let discount = 0;
if (code === "SAVE10") {
discount = subtotal * 0.1;
}
return {
discount_amount: discount,
final_price: subtotal - discount
};
The values returned in the object are automatically parsed and saved as flow variables, which you can use directly in the succeeding nodes.