How to Use Shopify Scripts to Create Personalized Shopping Experiences

Ready to offer a more personalized experience on your mobile app?

Tapcart works with Shopify Scripts and lets you can optimize and automate customer experiences in all sorts of ways.

You can use Scripts to create discounts that are applied to a cart based on the items in that cart as well as other cart properties. You can also use scripts to customize the shipping and payment options that are available to your customers.

Script examples

The following list contains examples of the types of discounts and customizations you can make with scripts:

  • discount products with specific tags to offer percentage (%) or fixed ($) discounts, or a combination of both
  • run promotions with simple or complex logic (buy one, get one free (BOGO); buy two get 10% off, buy four get 20% off)
  • offer dynamic pricing with volume-based price breaks
  • modify, hide, or re-order shipping options and prices
  • modify, hide, or re-order payment gateway methods

You can create the following types of scripts:

  • Line item scripts—These scripts affect line items in a cart and can change prices and grant discounts. These scripts run each time that an item is added, removed, or changed in your cart.
  • Shipping scripts—These scripts interact with shipping, and can change shipping methods and grant discounts on shipping rates. These scripts run each time that your customer accesses the shipping options page at checkout.
  • Payment scripts—These scripts interact with payments, and can rename, hide and re-order payment gateways. These scripts run each time that your customer accesses the payment method page at checkout. Payment scripts do not interact with payment gateways, such as PayPal Express or Apple Pay, that are shown to your customer before the checkout.

The Script Editor includes templates of common scripts. When you create a script, you can choose a template and edit it for the needs of your store. The following list contains examples of the templates that you can customize:

  • percentage (%) off a product
  • amount ($) off a product
  • percentage (%) and amount ($) off a product
  • bulk discounts
  • buy one get one free (BOGO)
  • modify shipping rate price
  • modify shipping rate name
  • hide shipping rates
  • re-order shipping rates
  • modify payment gateway name
  • hide payment gateway
  • re-order payment gateways

Using line item, shipping, and payment scripts you can implement custom logic and tailor the user experience during a customer’s checkout journey.