The Inception Challenge: Inventory App

Hi,

I am creating an inventory management app that inputs product sales and outputs the number of parts left available in stock. So far I have data types of: Products that are made up of Assemblies and Assemblies that are made up of Parts. All of the above consists of a many-to-many relationship, which I why I’m in Bubble instead of excel.

When I sell a Product, I want this app to remove the Parts needed for that Product and then reveal how many Parts are remaining/ available. (So I know how much stock I have left or if I need to order more parts) Using ‘make changes to a list of things’, I’ve been able to decrease all Parts in an Assembly by one but that’s as far as I’ve gotten. I am stuck for 2 reasons:

  1. I don’t know how to subtract the number of available Parts in an Assembly on a Part by Part basis. (e.g. there are 9 Screws and 5 Pegs in 1 Assembly of 1 Birdhouse, so when I sell 1 Birdhouse, I want the quantities of each to decrement accordingly).

  2. I want to interact with this database on a Product level, so Parts are a few steps away. How can I sell a Product, then decrement the Assemblies within, then finally decrement the Parts remaining so I know how many Parts I have left in stock?

I suspect there are a couple steps or techniques here and I’m in over my head. Please send any ideas my way and I’ll gladly give them a shot.

Thanks -
Scott

Hi Scott,

Have you solved this problem yet? Integrating flat BOMs (Bill of Matierals) and indented BOMs is a challenge. I have built what you are describing within excel, but it is complicated and not as versatile, so I would agree that Bubble would be a better option if you can get it to work as intended (I’m fairly new here too, but have done a lot with inventory management).

In response to your #2 question:
You said that you have a many-to-many relationship. Are you are building up assemblies and storing them in inventory and then using the assemblies to build whichever product at a later date? If not, one way you can simplify this is to flatten your BOM - list all parts for all assemblies used in a product under the product, rather than an assembly. This allows you to avoid multi-layer incrementation. If you have the same assembly in both products you, you can have “Roof for small birdhouse” and “roof for medium birdhouse” be two different items even if they are both assemblies containing the same parts. In this case, you don’t have visibility to assembly inventory, but your part inventory should be clear.

Regarding #1 - I have the same question. Can someone with more Bubble experience help? I’m guessing there is a way we could use a workflow to reduce the quantity of the part (screw) by the value associated with the product (Screwperproduct field =5 on product type?) and have each part have an action mapped to that product’s part quantity field?