How do I build a Pricing Calculator?
In this episode of Build it with Tim, we'll learn how to use Import Templates and Equations to build an automated pricing calculator from imported data.
Features Discussed:
-
Connection Fields (Time: 5:22)
Learn how to connect product price calculators to suppliers and products, dynamically calculating prices based on supplier data for accurate pricing management. -
Complex Formulas (Time: 8:26)
Learn how to use the maximum formula with two columns. For example, learn how to compare values between two columns to determine the highest value in each row. This technique is useful for evaluating multiple criteria across columns and automatically identifying the maximum value for further processing or analysis. -
Complex Formulas (Time: 11:10)
Learn how to create number formulas to calculate product costs using fields like "Base Cost" and "Markup." Example: Combine operations (multiplication, addition) to derive the final price, with currency symbols and precise decimal formatting. -
Complex Formulas (Time: 12:30)
Learn how to create a "Total Cost AUD" formula by applying base cost, markup, and currency conversion factors to calculate the final value in AUD. -
Import Templates (Time: 14:12)
Learn how to format your CSV correctly to ensure smooth data imports. Example: Structure your CSV and map fields to corresponding database columns. -
Import Component (Time: 20:23)
Learn how to utilize the import component to manage bulk data imports and use import templates to structure CSV files correctly for seamless integration.
Transcript Summary
Introduction
welcome back to Build It with Tadabase. On this week's episode, we've got some new graphics, we've got a new intro, and of course, a new video for you all.
This week, we are talking about building a pricing calculator. We're going to do most of this inside of the Data Builder, but I'll also show you some things inside of the Page Builder and the live app as well. The pricing calculator itself is not necessarily the point of this video. The point is to talk about equations, complex formulas, and import templates—how we can build a template to continuously and consistently import data into our application either from the Data Builder or the live app and have all of this pricing calculation stuff just work automatically.
When we are done with this build, we will be able to import records from a CSV from our live published application using an import template, which will automatically take product and supplier information like a SKU or a supplier name, look up a record from a connected table, set the connection, import a base cost, and then calculate markup, total USD cost, and total cost in AUD using complex formulas and equations. This will all happen automatically upon import. It's as easy as selecting our CSV, hitting next, and importing our data.
Let's take a look, and I'll see you in the Builder.
Building the Pricing Calculator
In order to build this pricing calculator, we're going to break things down into three different tables. First, let me provide some context for what we're doing here. We are an organization that purchases products from multiple suppliers. When we purchase those products, we have a spreadsheet or a CSV that contains all the products we received, the supplier, and a base cost. We want to bring that data into our database application and automatically calculate things like markup and exchange rates.
Setting Up the Tables
- Products Table:
- We'll create a table called Products.
- Add a product name and a SKU field to identify products.
- Suppliers Table:
- We'll create a table called Suppliers.
- Add a markup field to store the markup value, which will be set as a decimal with two decimal places.
- Product Price Calculator Table:
- We'll create a table called Product Price Calculator.
- This table will have connections to both the Products and Suppliers tables.
- Add a base cost field as a currency field.
- Set up a complex formula to dynamically calculate markup based on the supplier.
Adding Products and Suppliers
- Add products like White T-shirt (WT01), Black T-shirt (BT01), and Red T-shirt (RT01).
- Add suppliers like Supplier ABC with a 10% markup and Supplier XYZ with a 20% markup.
Calculating Costs
- Use a complex formula to calculate the total cost by adding the base cost and the markup.
- Set up another formula to calculate the total cost in AUD by applying an exchange rate.
Importing Data
- Set up an import template in the Automation tab.
- Map the fields from the CSV to the appropriate fields in the Product Price Calculator table.
- Use the import template to automatically set connections and calculate costs upon importing the CSV.
Setting Up the Live App
- In the Page Builder, set up tables to add and edit products and suppliers.
- Create a page for product price imports and add a table to display records from the Product Price Calculator table.
- Add an import component that allows users to import data directly from the live app using the template.
Conclusion
That's how we can build a pricing calculator using equations and import templates. I hope you enjoyed this week's video, and I'll see you on the next one. Take care, everybody!
We'd love to hear your feedback.