DEV Community

andyreadpnw
andyreadpnw

Posted on

Using Regex to Prevent User-Error during E-commerce Site-Content Turnovers

As is often the case with an environment with fast-paced deadlines and lots of last-minute site content decisions, humans often make mistakes and these mistakes can both impact the customer experience and the financial bottom line. E-commerce websites generally do not have guard rails for site content, promotions, or new product additions as these changes generally occur during an overnight cycle and will simply accept whatever is scheduled to load. No matter how detail-oriented a team is, inevitably the team will miss something and there will be a customer-facing error(usually from around midnight for the next 8 or 9 hours until business hours or whenever it is that someone on the team physically notices). My conclusion after many incidents and attempts to modify and perfect process that failed: DON’T TRUST YOURSELF, AUTOMATE YOUR SITE CHECKS!

My solution to the issue was to create regular expressions statements that checked every user that entered the site to search their session and confirm that these elements were present. Things I built include checks for an image name in our hosting site in our main content in case the scheduled content from the prior day fell off and no content replaced it, checks for some threshold of free shipping in checkout(almost all e-commerce sites have some form of threshold amount to qualify for free shipping), and a check at checkout to run the promotion against the database to make sure all promotions were set up. These checks can be implemented multiple ways; Checks can be created in any server-side A/B testing platform or in most of the enterprise analytics platforms with a simple regex statement to identify these elements. How you configure them will depend on your individual systems, but implementing these small checks could mean the difference between a quick fix at midnight (when almost no one would notice) and 9 hours of customer facing errors. I recommend you check into a quick implementation for your own needs.

Top comments (0)