How do I execute arbitrary JavaScript when the app applies/removes discounts?
The app exposes an event that you can listen to. Use the data inside the event payload as needed.
document.body.addEventListener('docapp-volume-update', (e) => { console.log(JSON.stringify(e)); });
document.body.addEventListener('docapp-volume-update', (e) => { console.log(JSON.stringify(e)); });
Updated on: 27/03/2024