Behind the Screens: How Stitch Predicts the Future

IMG_3981

Meet Stephen, our boy-genius. For the past two years, Stephen’s been key in bringing many of Stitch’s new features to life including multi-warehousing, publishing listings and the WooCommerce integration.  He is a man of many talents. He reads a book a week, loves yoga and drinks bulletproof coffee from a bowl.  And it has been said that his beard has magical powers (it might warrant its own Behind The Screens interview).

But, we are here to discuss Stephen’s latest edition to the Stitch code: Minority Report. So, without further ado, let’s talk about the future.


So you say you can predict the future with Minority Report. That’s a bold claim.

It might be bold, but our Minority Report monitoring tool is pretty awesome.


Similar to the film’s plot, we’re not predicting murders per se, we’re predicting issues. Stephen, what exactly is our Minority Report?

It’s a way for us to proactively find potential issues within our application and fix it in advance of it becoming a problem for our customers.

It’s pretty rare for a company of our size to have this much insight into the health of our customers.  It is really only seen in bigger companies such as Netflix, who have a similar system which is able to find and fix issues.  They are also able to escalate their findings to many other teams depending on the severity of the issue.  

Minority Report is a pretty sophisticated system, I was able to initially get it off the ground during our Hax day and we’ve continued to add to it ever since.

Can you break it all down for us?

Yes. It definitely helps if you’ve seen the movie so that  more of this makes sense. But inside of Minority Report we have:

Precogs - The Precogs allow us to run reports across all our accounts to identify if something “could” become a problem. This could be anything, for example we could ask the system, “How many red shirts are there across all our accounts?” but that wouldn’t be a good indication of a future problem. So instead we will run one that says, “How many unlinked orders are there?” Since the majority of orders should be linked to an account, if we saw a surge happening across accounts, we would know there could be potential problem brewing. We run tens of thousands of Precogs each night to stay ahead of any potential issues.

Tom Cruises - The Tom Cruises take the information from the Precog and automatically make any fixes that we are able to do on the backend to prevent a problem from arising. Sometimes, the only way to fix it is to have a customer take action, in which case we will contact them directly.

Agatha -  Each morning, Agatha outputs the other Precog’s pass/fail results to our #foreknowledge Slack channel.  The engineering team looks the ‘foreknowledge’ and acts accordingly.  This could mean immediately writing another Tom Cruise, reaching out to a customer, or adding the fix to our next development cycle. Overall, Agatha allows us to be more proactive with fixing customer issues which, in turn removes stress from the customer as well as support and engineering case load.

pasted_image_at_2015_07_10_03_17_pm_1024Is it terrible that I have never seen Minority Report?

Yes. You should be ashamed.

Though I do want to see it now.

Good. Maybe we can watch it at our next Stitch movie night.

Did you use any cool or new technology when creating Minority Report?

Yeah. That was part of the initial interest. Alex on our team has contacts over at Famo.us and we wanted to find a way to use their technology at Stitch. So this was a perfect way to do that and create a better experience for our customers. Using Famo.us, we are able to visualize the results of the Precogs across all our accounts. Now, we can quickly look across all our accounts and know where to focus. So if I click on a red box, it opens a customer account and shows the results of each precog that ran earlier that morning. This is just one more way that we can address possible customer challenges before they would ever notice.

The way we’ve automated the whole monitoring to escalation process is also cool, but it is pretty techy.

minority_report_1024Ok, you’ve warned us. Let’s hear more.

First off, every Precog is a Laravel artisan command. We run the Precogs using Gearman, this allows us to run them across all our accounts without affecting the performance of the Stitch application. Every morning at 2:00am, a Precog master will queue up each Precog for each account. This whole process completes in just a few minutes; It then triggers any Tom Cruises that need to be run. We connect this information to our Famo.us visualization. It also generates and posts a report to the Slack channel. In the future, we will be automatically alerting our developers and success reps when an issue needs to be looked at further. The goal is to remove any and all possible problems before they happen.


On behalf of our customers and support team, thanks for creating such a stellar monitoring tool!

Thanks for wanting to hear more about it.

 

 

Other Posts You May Like: 

Our NEW Sales Forecasting Report Drives Home the Win for Retailers

Five Data Points that You're Missing with Spreadsheets

Creating a Purchase Order: What are You Forgetting

 

Gain control of your inventory today.
 Try Stitch Free! 

comments powered by Disqus

Grow Your Retail Business with Stitch

Learn How