CodeCanyon author Nikolay (nickys) walks us through his incredibly useful, and free to use sales tracking tool,SalesRobot.
What is SalesRobot?
SalesRobot is a free web app made for Envato Market authors. It provides a list of your most recent sales and a bunch of really useful statistics, like:
- Earnings today
- Earnings this month
- Estimated earnings this month
- Average earnings per day
- Average earnings per month
- Earnings in the last 30 days (chart)
- Earnings in the last 12 months (chart)
- Earnings by year (chart)
- Earnings monthly by product (chart)
- Product share of all earnings (pie chart)
- Earnings total
- Sales total
- A small clock on the homescreen which shows you Envato’s local time. All of the data in the app is in the Australia/Melbourne timezone, including “Earnings today” stat.
As an author and self-employed person, I think it’s important to have a good idea of your performance and perhaps most importantly – your expected income each month. To make sure the statistics are as accurate as possible, you can also upload all your sales data in .csv format by following the instructions in the Settings screen.
The last feature that sets this little app apart is the social login process. I chose to integrate Facebook, Twitter and Google+ as login options, rather than custom registration or pure browser cookies, for a few reasons:
- You don’t have to remember your email/username/password to login a year from now.
- You don’t have to enter your API key multiple times on your mobile devices (if the app relies just on cookies for login).
- By having a social login process, you setup the app just once from your desktop, like entering your API key and uploading your .csv file. Then you just tap to login on any device and you’re good to go.
Why did I make SalesRobot?
One of my motivations to start working on SalesRobot was to do a case study on UI/UX. I wanted to spend a couple of weeks to explore and improve my skills as a front-end developer and possibly get an inspiration for my next product for CodeCanyon.
A few months back Google released a really cool document on their Material Design concept. While it’s aimed at Android development, most of the information is generic and can be applied to any platform. This inspired me a lot, and really influenced the design of SalesRobot’s interface. I reference this document all the time since I found it and I strongly recommend it to every UI designer.
However, the number one reason I made SalesRobot was because I needed it! This is an app that I’ve been missing ever since I became an author. Yes, there are other good apps for sales tracking, but some of the features that are essential to me weren’t there.
The Development Process
Before I started working on the app, I set a few goals:
- Has to work on all platforms, including desktop PCs
- The sales data must be stored on a server instead of locally on your device
- The app must provide lots of statistics
To make the app cross-platform, a web app was the most obvious solution. Which meant I wouldn’t have to deal with app stores, development program fees, app review and other frustrations that go with native mobile apps. Luckily, push notifications were also out of the question. I say “luckily”, because running a push notification service is a whole other beast that I don’t want to get involved with ever again.
For the app’s backend I decided to stick with what I know and use PHP and MySQL. I have tried Node.js in the past and yes, it’s light years ahead of PHP in terms of speed, but I’m just not experienced enough with Node.js.
After having a good idea of which tools I wanted to use, I started with the login system first, then the database and finally the UI, where I spent most of my time. 10 days later the app was finished.
The bottom line – it works, it’s useful, it’s pretty and it’s free for everyone to use it.
A few thoughts on the Envato API
There is just one small thing that is missing from the Envato API, which could potentially cause wrong data in the app. The API doesn’t provide an ID for each sale and I just had to find a way to avoid duplicate sales in the database.
What I decided to do does not guarantee that duplicate sales won’t occur, but the chances are extremely slim. Basically, I’m combining the sale’s timestamp and the product’s name to generate a hash and using that as an ID. This solution would cause duplicate sales in the database only if you sold the same item two times or more within a minute. Yes, the timestamp gives you seconds as well, but I found out that the timestamps from the API and the .csv statements are slightly different, so I had to round the timestamps down to the minute.
Like I said, the chances that to happen are really, really small, unless you are Kriesi or ThemeFusion. In which case you can probably afford an accountant to do all of this for you.
Jokes aside, it would be much easier if Envato included a sale ID in the API and also in the .csv statements. Fingers crossed!
The future of SalesRobot
I don’t have anything planned for SalesRobot, at least not for now. I’m happy with the app as it is right now, it does it’s job well and I’m using it all the time. There are a couple of things that I’d like to add, like better colors for the charts, better looking clock and that’s pretty much it.
Share Your Sales Robot Feedback in the Comments
A question to the authors – is there a feature that you would really like to see implemented? Let me know in the comments below.
About the Author
Hello! My name is Nikolay, I’m 24 years old and I’ve been an author at CodeCanyon since 2012. My author name is “nickys” and I focus on jQuery/WordPress plugins.
Some of Nikolay’s CodeCanyon Work
I enjoy making interactive widgets and also tools that make my items really easy to use for my customers. My other work experiences include 3D animation and VFX, Unity3D game development with C# and some 2D texture drawing. I also like playing my bass guitar whenever I need a break from work.
If you’re an Envato Market author, you should really check out SalesRobot!
This article was originally published on community.envato.com by Nikolay.