Shopify Plus Launchpad + Scripts

Michael on Oct 31

The best promotional campaigns are those that relate to your core brand, and enable your customers to build a personalised relationship with your business. Running short campaigns that focus on things connected with your brand is a great way to achieve this (for example, a sports merchandise store could run a campaign during the Superbowl weekend), and having the right tools to effectively drive these kinds of short, focused campaigns can make all the difference, which is where Launchpad comes in.

Shopify Plus's Launchpad app provides a suite of automation tools that simplify your ability to manage various aspects of your store, including sales campaigns, product releases, and promotional periods.

One of the most powerful components of this is the ability to schedule changes to your published scripts, allowing you to offer special line item discounts or shipping rates over a set period of time.

Today, we're going to look at how this works, how you can apply it to your store, and a real-world example combining Launchpad with our customer retention app PlusDelivery.


Let's say you want to schedule free shipping over Black Friday/Cyber Monday (BFCM). We'll need a script that discounts your shipping methods to free, and a Launchpad campaign that activates and deactivates that script over the BFCM weekend.

Setting up the Shipping Script

If you don't already have it installed, head to https://apps.shopify.com/script-editor to add the Script Editor to your store.

  1. Open the Script Editor app, click Create script, choose Shipping rates, select Blank template, and click Create script.

  2. Paste the following into the Ruby source code box (if that's not visible, click the Code button under the title)

1
2
3
4
5
6
7
8
9
# This example script will set all shipping rates configured on your store to free,
# with the message 'Free Shipping' shown to the customer at checkout
Input.shipping_rates.each do |shipping_rate|
  shipping_rate.apply_discount(
    shipping_rate.price,
    message: 'Free Shipping'
  )
end
Output.shipping_rates = Input.shipping_rates

To test the result of a script, click the Input button under the title, configure a sample order, and click Run script. This will simulate the script with that cart and customer, and show you the effect on your shipping methods

  1. Give the script a name, and click Save draft.

new script

Now we have our script set up and ready, we can head over to Launchpad to schedule this script coming online over the BFCM weekend.

Creating the Launchpad campaign

If you don't already have it installed, head to https://apps.shopify.com/launchpad to add Launchpad to your store.

  1. Once installed, open the app, and click Create event

  2. You're now able to configure when the event should be scheduled (including an optional end date), and what it should do. Let's fill out some details:

    1. Title: BFCM Free Shipping
    2. Start Date: Fri Nov 24, 12:00am
    3. End Date: Mon Nov 27, 23:59pm
    4. Enable shipping scripts
    5. Set the during event script to the script you previously created
    6. Set the after event script to Unpublish all shipping scripts

new campaign

  1. Click Save

With this complete, you're all set! Your free shipping script will come online automatically at the start of Black Friday, and shut down again at the end of Cyber Monday, without you needing to do anything.


Launchpad + PlusDelivery

The above is a fairly generic example to showcase how to use Launchpad, but let's now look at a real world usecase. Earlier this year we launched PlusDelivery, a Plus-only app to improve customer retention by enabling merchants to offer a free-shipping subscription to their customers.

Since the app works by allowing the customer to pay to join a members club on your store, we can use this to offer additional discounts exclusive to members over a promotional period.

This can be achieved by following the same steps outlined above, combined with activating a different script over the campaign period. By default, stores running plusDelivery have a shipping script active that checks the customer's membership during checkout, and discounts the defined shipping rate if they have an active membership. We could expand on that for BFCM, by offering members an exclusive free gift with each order.

Following the steps above, select Line items instead of Shipping rates in the Create script window, and then paste the below script, modifying the value of FREE_GIFT_ID to the product ID of the free gift product.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This script will set the product 9020420126 to free in the customer's cart,
# if they have the tag 'plus-delivery-membership'
FREE_GIFT_ID = 9020420126
MEMBERSHIP_TAG = 'plus-delivery-membership'
customer = Input.cart.customer

if customer && customer.tags.include?(MEMBERSHIP_TAG)
  Input.cart.line_items.each do |line_item|
    next unless line_item.variant.product.id == FREE_GIFT_ID
    line_item.change_line_price(
      line_item.line_price * 0,
      message: 'PlusDelivery Free Gift'
    )
  end
end

Output.cart = Input.cart

When creating the campaign in Launchpad, choose this new line item script to activate, and when the campaign starts, only your PlusDelivery members will get the FREE_GIFT_ID product free!


How are you thinking of using Launchpad for BFCM and other upcoming campaigns? Let us know what you think in the comments below, and if PlusDelivery sounds like it would be useful for your business, send us an email and we'd be happy to get you set up in time for the holiday season.


Header photo by SpaceX on Unsplash