Hi there, may someone can help me) I am in the beginning of my journey in ADALO
I want to create an app to lead my accounting of the company. I have 10 clients for instance, and 50 products in my storage, I want to add individual price for each client. I am going to create an invoice and I want the app getting individual price automatically for a current client. My brain can’t get how the relationship between base should be organised
Welcome to the community @Vadimassssssssssssss!
So users purchase products and you need to create invoices? You can have a users collection for clients, another collection for products and lastly a collection for invoices. In the invoices collection you can create 2 one to many relationships for users collection and products collection. So each invoice can have one user and one product. Also each user and product can have many invoices. Create a number property in the invoices collection to store the price.
So now you get many invoices for different users and products and lastly a different price for each invoice. Users I mean Clients. Hope I understood you well!
Thank you so much for your support. There are some difficulties , each client has different price , individual price. When I will create an invoice, I want to choose a client ( I have 10 of them ) and products that he wants ( I have 50 products) and after that I push a button and system create an invoice that contains my client , products, and calculates everything by a individual price my client has
Each of 50 products should have 10 different prices for 10 clients
There are multiple possible paths to choose here.
- if prices for each product for each client has some common rule, e.g. for client A, all products are 0.85 of List price, then you can store the discount in Users and use a formula to calculate the price;
- if you have a fixed number of “price levels”, you can have properties for them in Products (e.g. PriceLevel1, PriceLevel2, … PriceLevel10), and store prices there. Then you have a PriceLevel property in Users, and you choose the correct price with visibility conditions / conditional actions based on User’s price level;
- instead of hardcoding these conditions, you can have a collection of Price Levels. You then can link this collection to Users (so each user is assigned one Price Level), and you add a relationship for a Product to a Price Level. Then you add all records for all products for all price levels (e.g. Product1 - Level 1 - price 100, Product 1 - Level 2 - price 85, etc.). So you will have multiple entries for each product SKU, but each entry will correspond to a certain price level. Then you can show products only for the exact Price Level (which a User has).
- You can extend the approach above. Products and Prices can be detached. So you create a separate collection for Prices. Price Levels are , and each Price entry is linked to Price Level and a Product. Then you don’t have to create multiple entries for one product (which is quite useful is product has a lot of properties), but you will create multiple Prices for each products. Filtering logic will be the same.
Of course all approaches will require an implementation of Shopping Cart and Orders. Adalo App Academy has some useful resources and videos about that.
The question, seemingly simple, does not have a simple answer. I’ve provided a few approaches (and there are more). The best technical and architectural approach depends on a business details: what’s the order size, what’s the number of items in the order, how frequently prices are changed, how complex the products are, how many clients there are, how many price levels exist, etc etc etc. For some cases the “simplest” solution is more than enough, for some cases not.
I’ve had an experience implementing projects with very similar requirements, and a lot of architectural decisions were made after understanding the business workflow and details.
Best,
Victor.
Thank you for useful detailed answer ) I will try to make this happen by your advice. The question seemed simple to me for first sight , but it isn’t, this is good) cause I was looking for simple solutions , I thought I got crazy and I can’t get the obvious
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.