---
title: 'Spend in Shopify Store'
description: "Shopify purchase loyalty rule. Reward users for spending in your Shopify store."
keywords: ["Shopify loyalty integration", "purchase rewards", "Shopify points program", "ecommerce Web3 loyalty"]
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

import RewardWithMultiplierRangeAmount from '/snippets/rules/reward-with-multiplier-range-amount.mdx'

## Overview

Reward users based on how much they have spent in your Shopify store. On claim, we match the user’s connected email to a Shopify customer and evaluate their lifetime spend against your configured ranges to award points or a multiplier.

## Prerequisites

- Shopify must be connected in Snag with a Shopify Admin API access token.
  - Required scopes: `read_customers` and `read_orders` (needed to look up customers and read lifetime spend).
- The user must have connected an email address in Snag (used to find the Shopify customer).
- You must provide your Shopify store URL in the rule configuration.

<Warning>
  Store your Shopify Admin API access token securely and grant only the minimum
  required scopes.
</Warning>

## Rule Configuration Fields

<RewardWithMultiplierRangeAmount />

### Basic Settings

- **Claim type**: Manual — users click "Claim" to trigger evaluation and rewards.
- **Frequency**: Immediately — the rule evaluates and awards at the time of claim.
- **Interval**: Once — users can claim once (unless otherwise configured globally).
- **Reward lifetime**: Permanent — awarded points remain unless explicitly removed.

### Custom Settings

- **Shopify Store URL**: Your store domain (for example, `your-store.myshopify.com`).
- **Skip the multiplier for this rule**: If enabled, only fixed point rewards are used for matching ranges.

## How it works

1. When a user clicks "Claim", Snag queries the [Shopify Admin GraphQL API](https://shopify.dev/docs/api/admin-graphql) for the customer by the user’s connected email.
2. We read the customer’s lifetime `amountSpent` and compare it to your configured spend ranges.
3. The user is awarded the points or multiplier defined for the first matching range.

<Tip>
  If the email doesn’t match a Shopify customer, `amountSpent` is treated as 0 —
  ensure users connect the same email they use at checkout.
</Tip>

## Troubleshooting

- **Shopify not connected**: Ensure you’ve connected Shopify in Snag and selected the integration when creating this rule.
- **Email not connected**: Users must connect an email address in their Snag profile before claiming.
- **No reward given**: Confirm your ranges include 0 or the user’s actual spend, and that your store URL is correct.

## Data captured

For auditing, the reward stores the Shopify `customerId` and the evaluated `amountSpent` at claim time.
