Codementor Events

How and why I built Customer contact application

Published Jan 02, 2019

About me

My name is Darrell Pawson and I am 33 years old. I currently spend most of my free time helping others or learning new things in Node.js. I am currently a Teachers Assistant for a online Node.js class on devsprout.io

The problem I wanted to solve

I currently work full time in Pest-Control and I wanted an easier way to schedule my customers and also to be able to view their location on a map for routing purposes.

What is Customer contact application?

So I started building this app. And at first it only sent out emails. Well I started searching online for sending texts with node.js and found out that Twilio offered exactly what I wanted. So after playing around and testing things out I finally built the app the way I wanted it.

Here's how it works
A technician can register for an account which uses Joi to validate use input and also uses Kickbox to validate the email address. If the email is not valid the registration is terminated.
If the email is valid then it creates a temp user and sends out a text message with numbers to be entered into a form to validate their account.
Once the account is validated the temp user is moved to a persistent user collection.
The service tech enters in the customers information ... Name, Company Name, Address, Phone number, time preferences, contact preference and so on.
I also use mapbox to display the customers location on a map.
You can search the customer by name or phone number or if you select by week and day it searches for customers whose service is coming up and only displays that data. Then you can either send out a blanket text to all customers or send individual messages out if needed.

Tech stack

Node.Js Mongodb Mongoose Moment Kickbox Twilio Bootstrap Joi, sendgrid, and csurf are what I used to make the application.

The process of building Customer contact application

I was at work one day and the idea hit me and that's why I decided to build it. It started small but over about 3 months I had it working smoothly and had 4 people using it everyday. We only use it at my office and there are 7 techs so 4 out of 7 constantly using it was pretty good to me.

Challenges I faced

Using new modules like Kickbox and Twilio ... I had never used them before so reading the docs and figuring out how to implement them into my code was a little challenging at first.

Key learnings

I learned a lot from this app. I used async/await and loved how much less code was used vs using a lot of callbacks.

Tips and advice

Learning to debug will save you a lot of time and headaches. Also, don't be afraid to use google or stackoverflow to find the answers.

Final thoughts and next steps

My next steps will be to pitch this idea to the company as a whole and maybe even turn it into a paid service.

Discover and read more posts from Darrell Pawson Jr
get started