Creating Notebooks

The ShopifyQL Notebooks app enables you to query your store data and create visualizations. By combining different data visualization with text blocks, you can create reports on your store called notebooks. For example you can create a notebook to explore your total product sales, and a notebook to help you understand which products are making the biggest contribution to your profit margins. You can create as many notebooks as you want.

Install the ShopifyQL notebooks app

  1. Go to theShopifyQL Notebooks pageon the Shopify app store.

  2. ClickAdd app.

  3. Log in to the Shopify store that you want to install the ShopifyQL Notebooks app on.

  4. To agree to share the required data with the ShopifyQL Notebooks app, clickInstall app.

After the app is installed on your store, you cancreate a new notebook.

Creating a new notebook

A notebook is a set of content blocks that you create and put in the order that you want. There are different types of blocks that you can use to create your notebook:

You can use a combination of data visualizations such as graphs and charts, as well as text to best tell the data story.

Create a new notebook

  1. From your Shopify admin, clickSettings>应用和销售渠道.

  2. From the应用和销售渠道page, clickShopifyQL Notebooks.

  3. ClickOpen app.

  4. ClickCreate notebook.

  5. By default, the new notebook has a single codeblock. Do either of the following:

    • Choose a template for your code block
    • Write your own code block
  6. Optional: Add additional code blocks or text blocks to your notebook by hovering your mouse where you want to add the block, and selecting eitherText blockorCode block.

  7. To save your notebook, click the...button, and then clickName.

  8. Enter a name for your notebook, and then clickSave.

After you save your notebook, you canexport the notebook, oredit the notebook.

Text blocks

A text block lets you add styled text or a static image to your notebook. Text blocks can be used for headings in your notebooks, introductions, or descriptions of data visualizations.

Code blocks

Code blocks let you add a a query to your notebook that uses the ShopifyQL query language to return data about your store. In your code block you can choose how the data displayed in your notebook.Learn more about using ShopifyQL for Notebooks.

Templates

Templates are pre-written ShopifyQL queries that you can use as-is, or as a starting place to create your own query. When you create a code block, you can select a template by clickingTemplatesand selecting a template from the list. Templates are available for a number of data visualizations, for example:

  • Sales over time
  • Top converting products
  • Top selling products

Autocompletion

ShopifyQL Notebooks automatically provide suggestions for your query as you write your code block. Click on the suggestion to add it to your query, or continue typing to add your own code.

Export a notebook

  1. From your Shopify admin, clickSettings>应用和销售渠道.

  2. From the应用和销售渠道page, clickShopifyQL Notebooks.

  3. ClickOpen app.

  4. In theNotebookssection, click the notebook that you want to export.

  5. Click the...button, and then clickPresentation mode.

  6. ClickExport.

Your notebook is downloaded as a PNG file.

Edit a notebook

  1. From your Shopify admin, clickSettings>应用和销售渠道.

  2. From the应用和销售渠道page, clickShopifyQL Notebooks.

  3. ClickOpen app.

  4. In theNotebookssection, click the notebook that you want to edit.

  5. Make changes to the notebook by editing blocks, adding new blocks, or deleting blocks.

  6. ClickSaveto save your changes.

Using Liquid to reference data

You can create dynamic data stories using Liquid, Shopify's templating language, to reference data in your ShopfyQL Notebooks. A reference is a data element from a ShopifyQL code block, and it can be edited using Liquid within a text block.

Steps:

  1. From your Shopify admin, clickSettings>应用和销售渠道.

  2. From the应用和销售渠道page, clickShopifyQL Notebooks.

  3. ClickOpen app.

  4. In theNotebookssection, click the notebook that you want to edit.

  5. Find the text where you want to create a reference.

  6. ClickAdd referenceto open the Liquid editor.

  7. Enter theLiquidcode for the data element that you want to reference.

  8. Use the autocomplete suggestions for available references, rows, and columns to ensure accuracy.

  9. ClickApplyto save your reference.

Running a Notebook

When you load a ShopifyQL Notebook, you are presented with code and text blocks in their previously-run state. You can use this view to understand prior work, but it might not show the latest data. To view current data, use one of the following options:

  • Re-run individual code blocks: To get the latest data, re-run the relevant code blocks by clickingRunfor each code block.

  • 运行所有的代码块:更新的所有数据your notebook and run all of the code blocks by clickingRun all.

When re-running a code block, any references linked to it are updated automatically, so your data stories show the latest information.

Ready to start selling with Shopify?

Try it free