Bill from Invoice

Bill from Invoice

Hey Deluge experts, a little challenge if I may ask of you .....

When we invoice a certain item it is also billed at the same time !

On invoice creation, I'd like to iterate through line items, on encountering a certain sku, store a few lines of data from this line including CF data, store some data from the invoice , including custom fields as variables & then....

Create a draft bill with these variables - does this sound feasible with Deluge ?

I can do it with JavaScript but as it needs to be done immediately rather than waiting for my api calls which run every 6 - 7 minutes, I thought Deluge may be the way to go ?