# E-commerce

Connect **Shopify** to plan on your store's real sales, margins, cash and stock: orders, products, customers, payouts, returns and inventory come into Peaky as metrics and — when custom metrics are enabled for your company — as tables on the **Data** page. You find it under the **E-commerce** tab on the **Integrations** page.

The general flow is on [Connecting an Integration](/doc/connecting-integrations-XTfOCgvGYz).


---

## Connect Shopify

Shopify connects **one store at a time**, so Peaky needs your store's address before it sends you to Shopify.


1. Find **Shopify** under the **E-commerce** tab and click **Connect**.
2. In **Connect Shopify**, enter your **Shop domain** — for example `mystore.myshopify.com`, or just `mystore`.
3. Click **Connect**, sign in to Shopify and approve access.
4. You return to Peaky; the card is marked **Connected** and the first sync starts, for the entity whose **Integrations** page you used.

When your company has more than one legal entity, connect from the entity that should own this store's data. Peaky renews access in the background, so daily syncs keep working without reconnecting.

**Order history.** The permission screen includes access to your **full order history**. Shopify otherwise limits apps to the last **60 days** of orders — too short to plan against, since revenue trends, seasonality and last year's comparison all need the history behind them. Without that access the connection still works; it simply starts 60 days back.


---

## What Shopify Syncs

Each sync refreshes your **orders** (with their line items), **products**, **product variants** and **customers**. When your store grants the access, it also brings in **Shopify Payments payouts**, **disputes**, **returns**, **discount campaigns**, **locations** and **inventory**. If a permission is missing, the sync still completes and only that data is skipped.

**Metrics** include **Revenue**, **Net Sales**, **Orders**, **Units Sold**, **Average Order Value**, **Refunds**, **Shipping Revenue**, **Tax Collected**, **New Customers**, **Repeat Customers**, **Average Customer LTV**, **COGS**, **Gross Profit**, **Net Payouts**, **Processing Fees**, **Disputed Amount**, **Return Units**, **Average Inventory Value** and **Active Discounts**, among others.

* **Revenue timing.** Order-based metrics use each order's **processed date** — when Shopify recognizes the sale — rather than the date the order was created.
* **Margins.** **COGS** and **Gross Profit** need access to your **inventory cost**. Without it the sync still completes; those two metrics are simply left out.

**Data page** tables: **Orders**, **Order Line Items**, **Products**, **Product Variants**, **Customers**, **Payouts**, **Disputes**, **Returns**, **Discounts**, **Locations**, **Inventory Levels** and **Inventory Snapshots** — for building your own metrics on sales, cash settlement, reversals and stock.

**Sync logs.** Expand a completed sync under **Logs** to see the counts for **Orders**, **Line items**, **Products**, **Variants**, **Customers**, **Payouts**, **Disputes**, **Returns**, **Discounts**, **Locations**, **Inventory levels** and **Metrics**. A failed sync usually says whether Shopify blocked access because of **missing scopes** or **Protected Customer Data** approval — check the Peaky app's permissions in your Shopify admin or Partner Dashboard, then run a manual sync.


---

## Shopper Privacy and Data Deletion

Peaky responds automatically to the privacy requests Shopify sends on your behalf — you do not need to do anything, and there is no screen to visit.

| What happens in Shopify | What Peaky does |
|-------------------------|-----------------|
| A shopper asks you for the data you hold about them | Peaky locates everything it stores about that shopper and our support team sends it to you, within 30 days |
| You request deletion of a shopper's data | Peaky deletes that shopper's record and the orders Shopify names. Their remaining orders stay in your revenue figures but are no longer linked to a person |
| You uninstall the Peaky app from your store | Shopify tells Peaky straight away, and the Shopify card is no longer marked **Connected** — syncing stops there and then. Shopify notifies Peaky again 48 hours later, and Peaky erases everything synced from that store — orders, products, customers, payouts, inventory, and the metrics built from them |

**Aggregated metrics are unaffected by a single shopper's deletion.** Revenue, orders and other totals are not personal data, so a deletion request does not restate your reporting history.

**Disconnecting is not the same as uninstalling.** Removing the integration on the Peaky **Integrations** page stops future syncs and drops the connection, but leaves the store data already in your workspace in place — it is still your data. Uninstalling the app in Shopify is what triggers the full erasure above.