> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subtotal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Link accounts to your Shopify store

> Learn how to launch Subtotal Link from your Shopify store

## Overview

We'll create a button that customers can use to launch Subtotal Link from your Shopify store and link their accounts.

## Edit the code in your Shopify theme

Sign in to Shopify Admin. Navigate to *Online Store -> Themes -> Edit Code*.

<img src="https://mintcdn.com/typecastleinc/rWC4pMP5Mv_G5OWc/images/integrations/shopify/edit-code.png?fit=max&auto=format&n=rWC4pMP5Mv_G5OWc&q=85&s=e4da9f7b0078133ada0614ecfb932bae" alt="shopify edit code" className="rounded-lg border border-gray-100" width="2186" height="1412" data-path="images/integrations/shopify/edit-code.png" />

## Create a custom button

Create a new file called `link_account_button.liquid` and customize your button using [Liquid](https://shopify.dev/docs/api/liquid).

Here's an example of a simple `Link your Walmart account` button.

<Note>
  Make sure you update the `href` to a [Link URL](/docs/subtotal-link/link-urls) from your Subtotal Dashboard. Include the `customer_id` query paremeter to ensure that any new connection is associated with this Shopify customer.
</Note>

```liquid theme={null}
<!-- Minimal Subtotal Link Button -->
{% if customer %}
  <!-- Replace NryQamtd with your Link URL from the Subtotal Dashboard -->
  <a href="https://link.subtotal.com/NryQamtd?customer_id={{ customer.id }}" >
    Link your Walmart Account
  </a>
{% endif %}

{% schema %}
{
  "name": "Subtotal Link Button",
  "settings": [],
  "presets": [
    {
      "name": "Subtotal Link Button"
    }
  ]
}
{% endschema %}
```

## Add the button to your Shopify store

Customize your Store's theme and add the Subtotal Link Button to any page.
