Update inventory after order

Hi, building my first app on bubble and facing an issue

Problem Statement - update inventory after order is placed
Things
Cart - it contains list of items added
Order - It contains list of cart items
Inventory - it contains list of items

I tried this when buy now is clicked

change list of inventory
current count = this inventory’s current count - cart’s each item’s quantity


Make it a api workflow with item and count that has a action to reduce the item by the count. Then schedule api workflow on list that list being the cart

Sorry didn’t understand - do you mean connecting to external API? Can you please elaborate, my first time on bubble :sweat_smile:

No worries. No, it is a internal back-end API workflow (used as a function) that takes 2 parameters - item and count (in the action it would reduce the inventory of that item by the count) . Then when the order is submitted you can run this API Workflow on a list and the list would be the list of items in the order and the proper parameters (item and the the count of each item) for all the items.

Hello jain31201522,

Were you able to apply a solution to your application. I have a project started similar to yours with the same challenge.

@espin.mais Did you see the solution above?