How to keep tracking customers data effectively!

In this project, you will understand how you can keep track the information of your customers by using firebase database.

You will learn how add and retrieve data from a Real-Time Database. You will learn how filter and sort database from database as well.

I hope you enjoy your reading!

Step1: Set up A Database for Your Customers

For establishing a database, I highly recommend you using Firebase for such data. You can clik the link below to navigate on the website of Firebase: link to the official website of Firebase.

Then you just click "Start to use" and then "Add an Item" to kick off your real time database establishment.By the way, don't forget to name your item. Now, you have already created a blank database ready to store your customers' records.

You might have a interface on your computer like my screenshot below:

screenshot1


Step2: Add and Update Data in Your Database

Everytime your customer put an order and fill in his/her delivery address. You should get that information to make sure that you deliver the right things to the right person. To avoid repitition and increase accuracy, you can keep a record of your regular customers.

To achieve this, each time a person order someting in your shop and you've got his/her information, you just add that piece of information in your realtime database we just established in the previous step.

The code should be:"

screenshot2

And you can find your database being automatically updated like below:

screenshot3

Step3: Filt and Sort Data in Your Database

And now imagine that you have plenty of pieces of information of your customers in your database. Once a regular customer orders something normally, there's no need for you to ask for the payment information and delivery address thousands of times. You just refer to the databse to check all the information you have stored.

Furthermore, assuming Women's Day is coming, what if you want to send e-mails to only female customers. You can filt and sort information with database as well.

Here is an example of how to querry data based on Gitch and using our database:


You are almost done. Thanks for watching!