# Installing Scripts

Once you have completed your work to configure your rule(s), you must copy and paste the script(s) which Playwright generates for you into the Shopify Script Editor.

# Install Shopify Script Editor

Please be sure you have already installed Shopify Script Editor into your store environment. You can install it by visiting: https://apps.shopify.com/script-editor and installing the app.

Shopify Script Editor
Shopify Script Editor

# Types of Scripts

There are three types of scripts you can add to your Shopify Store checkout experience.

  • Line Items: also known as Line Item Rules in Playwright
  • Shipping Rates: also known as Shipping Rules in Playwright
  • Payment Gateways: also known as Payment Rules in Playwright

Example Rule
Example Rule

# Copying your Playwright Rule to Shopify Script Editor

Once you have completed setting up your rules within one or more of the rule types, you can generate the script to be copied and pasted into Shopify Script Editor. The process is the same for each rule type. Once you are happy with your rule, proceed with the following steps:

  1. Generate the script from Playwright (the big green button)

Generate the script
Generate the script

  1. Copy the resulting code to your clipboard

Copy the script
Copy the script

  1. Open Shopify Script Editor, and create a new Line Items (or your respective rule type) script from a Blank Template. Give the script a title, and then paste the Playwright code directly into the Code section by replacing everything that was in that field by default.

Paste the script
Paste the script

  1. Test your rules configuration

It's always important to test and verify your rules using the built in Script testing. Add items to your input (to simulate a customer's cart and the criteria you are configuring for), and ensure the output is consistent with your desired behavior.

🎉🎉🎉 CONGRATULATIONS!!! 🎉🎉🎉 You're well on your way to improving your sales while making customers even more satisfied!