# How to Export Your Tesco Data

This guide explains how to get your Tesco order history into a format the dashboard can process.

## Option 1: Tesco Account Data Request (Recommended)

Tesco allows you to request a copy of your personal data under GDPR (UK Data Protection Act 2018).

1. Log in to your Tesco account at [tesco.com](https://www.tesco.com)
2. Go to **My Account** > **Settings** or search for "data request"
3. Submit a **Subject Access Request (SAR)** for your grocery order history
4. Tesco will send you a data export within 30 days (often faster)
5. The export typically includes order dates, items, quantities, and prices

Once you receive the data, you may need to reformat it into the markdown structure described in `QUICK-START.md`.

## Option 2: Order Confirmation Emails

If you have Tesco order confirmation emails:

1. Search your email for "Tesco" or "Your Tesco order"
2. Each email contains the order date, items list, and totals
3. Copy the relevant details into the markdown format

This works well if you have a manageable number of orders (under 100). For larger histories, Option 1 is more practical.

## Option 3: Tesco App Order History

1. Open the **Tesco Grocery** app
2. Go to **Orders** > **Order history**
3. Each order shows the date, items, and total
4. You can tap into each order to see the full item list with prices

Note: The app may only show recent orders. For full history, use Option 1.

## Expected Data Format

The `build_data.js` script expects each transaction as a markdown block:

```markdown
## Order: 2024-03-15

**Type:** GHS
**Gross:** £85.42
**Savings:** £4.20
**Net:** £81.22

### Items
- Tesco Blueberries 250G × 2 @ £2.50
- Tesco Finest Free Range Chicken Fillets 500G × 1 @ £5.50
- Warburtons Toastie White 800g × 1 @ £1.45
```

**Field details:**

| Field | Required | Notes |
|-------|----------|-------|
| Order date | Yes | YYYY-MM-DD format in the heading |
| Type | Yes | `GHS` for home delivery, `IN_STORE` for in-store |
| Gross | Yes | Total before Clubcard savings |
| Savings | No | Clubcard discount (omit if none) |
| Net | Yes | Amount actually paid |
| Items | Yes | Product name, quantity (× N), unit price (@ £X.XX) |

## Tips

- **Consistency matters more than completeness.** Even 6 months of data will produce useful insights. You don't need every order going back years.
- **Product names should match what Tesco uses.** The build script classifies items into categories and NOVA levels using keyword matching on these names.
- **GHS vs In-Store distinction** is useful but optional. If you don't know, default to GHS.
- **Savings/Clubcard data** feeds the savings tracker. If you don't have this, set Savings to £0.00.

## Screenshots to Take

[For your reference: if you want to document your own export process, take screenshots of these steps]

1. Tesco account settings page showing the data request option
2. The SAR confirmation email
3. A sample order from the export showing the data format
4. The Tesco app order history screen

*Last verified: February 2026. Tesco may change their data export process.*
