Case Study

Using Shopify Scripts to solve promotion problems for Evy’s Tree

Evy's Tree Homepage

Evy’s Tree is a leading women’s apparel brand based out of Santa Rosa, California. They make comfortable, high-end luxury hoodies.

Their promotions problem

The team at Evy’s Tree were running into a problem that plagues a lot of Shopify merchants – how to best run promotional offers like “Buy One, Get One Free” or tiered discounts for their customers.

There are a number of applications on the Shopify App Store that attempt to do this, but they were falling down for Evy’s Tree in a number of ways.

The applications were clunky and difficult to configure for the sorts of promotions the team wanted to run. In some cases, desirable promotions weren’t possible to run at all.

To get around Shopify’s limitations, the applications worked by creating alternate products and variants with different prices. This not only clogged up the Shopify Admin with extraneous products, but also meant that serious inventory consistency issues were cropping up.


Samantha, IT Lead
Evy’s Tree
At Evy’s Tree, our business is growing at an orders of magnitude rate year-over-year and a big part of that is our strategy to utilize our data to respond to industry, customer, and seasonal trends in real time. The problem is that most back end systems make you choose between high availability and scalability, at the cost of flexibility. In this day and age, that just doesn’t work.

We’d tried a number of discount and promotion apps from the App Store, but they were causing all sorts of problems with our inventory levels.

The bottom line was that they weren’t flexible enough and it was costing us real revenue.


Putting together a plan of action

Being a Shopify Plus merchant made Evy’s Tree a perfect candidate to try out Shopify’s new Scripts feature. Scripts give stores a way to write custom Ruby that is run on Shopify’s servers and affects carts at a fundamental level, meaning things like line item level discounts can be applied without the sort of hackery that existing applications need to perform.

We were stoked when Shopify reached out and put us in touch with Samantha (IT Lead at Evy’s Tree) to see if we’d be willing to give the new Scripts Editor a whirl. We love playing with new Shopify toys!

After talking to Samantha, we’d gotten a good idea of the sorts of promotions they were looking to run and the issues they were currently experiencing. On the Friday of that week, we set ourself an ambitious goal: have a script ready to try out for a “Buy Two, Get 20% Off” promotion for a couple of new hoodies, launching the following Tuesday.

Scripts documentation and samples.
The Shopify Scripts documentation and code examples.

We took some time over the weekend to read through Shopify’s Scripts documentation and more importantly their sample scripts repository. Come Monday, we were able to dive right in and get an initial pass at the script up and running on the store (the well-defined patterns Shopify has developed for scripts in their examples really helped here).

With a couple of code tweaks, and some changes to make the script more user-friendly for non-developers, we were ready well ahead of time for the Tuesday launch date.

Following the script

The first promotion went off without a hitch – we’d managed to avoid making any typos and Shopify’s Script runner did its job. Customers were getting all of the discounts they were entitled to (and no more) without the hassle of creating a bunch of extra variants, and even better the back end applications dealing with orders weren’t having any problems interpreting the data coming back.

Discounts in operation on the Evy's Tree store.
Left, the script-powered discounts in the cart. Right, the same discounts on the checkout page.

Overall, this was a great win for Evy’s Tree. They were able to remove some complexity from their store (removing apps doing discounts in a workaround way), maintain the integrity of their inventory (no extra products floating around), and provide cleaner data to other third party apps (invoicing and shipping software).


Samantha, IT Lead
Evy’s Tree

After Disco implemented Scripts on our store, our inventory issues disappeared.

Our customers were able to see discounts applied automatically, reducing redundant steps in the purchasing process. Even better, we’ve been able to keep more money in our business and are able to make decisions per product quickly now that we are able to do product based discounts.

Since that first launch, we’ve helped Evy’s Tree run a couple more promotions of the “Buy X, Get Y% Off” and tiered discount variety, as well as worked with them to generalise the scripts running on their store so that they’ll be able to manage the bulk of their promotions in the future without having to call on us or other Ruby developers.

Easily editable scripts.
We’ve set up the scripts to be as user-friendly as possible and allow the Evy’s Tree team to easily tweak the parameters of their promotions without having to rely on developer support.

Interested in Scripts?

If you’re interested in seeing what Scripts could do for your Shopify Plus store, please get in touch! We’d love to chat to see if we can help you out.