Advice on price & inventory comparison Data structure that is more light weight

I currently have a datatype product with relationship-linking datatypes from online retailers it’s a lot of workflows and recursive flows and I want to find a better way to do this that is more lightweight.

Example:

Data Type: Product
Fields:
Name
Current Price
Inventory Stock
SKU
URL
Relationship: Amazon
Relationship: eBay

Data Type: Amazon
Fields:
Current Price
URL
Inventory

Data Type: Ebay
Fields:
Current Price
URL
Inventory

A couple of times a day API data brings in fresh data to Ebay & Amazon Data types then I have Recursive workflows update pricing. This was fine for the first two or three online retailers but I plan on adding several more in the near future.

Would it be better to have just one Data structure “Online Merchants” and use a list and SKUs to do the price comparison? If anyone could give me an example of what a more lightweight data structure would look like that would be greatly appreciated. As mine isn’t going to scale

1 Like

Hello,
The challenge you are facing is one of the most critical issues of making this app, it is particularly good that you want to solve it before continuing.

Look, there is no doubt that “Online Merchants” should be a single data type. Of course, this does not guarantee that the performance of the app will be great, but it is definitely better than the separation mode.
And on the other hand, the separation mode is not applicable, because you have to manually create a data type for each retailer.
But the best thing is to do the operation with the help of other platforms and save the result in the bubble before saving the data in the database.
The database is not suitable for doing this at all.

As you can see Ebay and Amazon share the same attributes. So in terms of Database Modelling they are instances (=Things in bubble language) of the same entity (= Data Type).
So you should have a single Data Type “Online Merchants”.

What you should really think about is how to connect “Product” and “Online Merchants” data types. It depends on different factors - how are products and merchants are connected, how do you plan to search and display data on different pages and so on.

What platforms would you recommend? Right now I just use the backend workflows ghetto api method to transform the data as needed. I played around with Xano and Parabola both of these seem to offer better solutions for handing outside API data but I would like to keep everything in bubble if possible.

1 Like

If I went the Online merchant route, I was thinking about using Option sets and a list for merchants under data type “Product”

So product would have list of Online merchants then in the workflow I can use option sets to make sure it’s set to the correct retailers when I pull the api data

I understand that working with other platforms is not as attractive as bubble.
I didn’t mean to store the data somewhere else, if you only do this a few times during the day, even with tools like “Make” you can optimize the data before bringing it to the bubble.

Make | Work the way you imagine

One question: Do you want to show only the best price in the app? Because I am talking with this assumption.

Will it be a permanent list or you’ll need to add new merchants occasionally? Do you need to store some other attributes like website, description and so on for each merchant?