---
title: "Automated ecommerce reporting from your users' stores"
description: "Build automated ecommerce reports that pull each merchant's Shopify or WooCommerce orders and Klaviyo campaigns and write them to Notion, on AIsa Connect."
canonical: "https://aisa.one/solutions/ecommerce-reporting"
---

# Send every merchant a weekly store report automatically

> Build automated ecommerce reports that pull each merchant's Shopify or WooCommerce orders and Klaviyo campaigns and write them to Notion, on AIsa Connect.

Merchants connect their store, Klaviyo and Notion once, your agent pulls the week's orders and campaigns, writes the summary to a Notion page, and a report costs a fraction of a cent.

- Web page: https://aisa.one/solutions/ecommerce-reporting
- Who it suits: Agent builders and Marketing agencies
- Data domain: AIsa Connect
- Runs on AIsa Connect: [AIsa Connect](https://aisa.one/products/connect)

## Four requests from connected apps to a Notion report

The same requests run for every merchant on your schedule, each with that merchant's externalUserId and connections.

### 1. The merchant connects Klaviyo

Klaviyo connects with a private API key the merchant enters in your product. The store connects with credentials, and Notion through AIsa's hosted page.

```
curl -X POST "https://api.aisa.one/apis/v1/connector/connect/klaviyo/credentials" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalUserId": "store_8812",
    "apiKey": "pk_..."
  }'
```

### 2. Pull the week's orders

shopify.list_orders takes a created_at range and returns up to 250 orders a page, and woocommerce.list_orders takes after and before dates. Page through until the week is complete.

Shopify:

```
curl -X POST "https://api.aisa.one/apis/v1/connector/actions/run" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actionKey": "shopify.list_orders",
    "externalUserId": "store_8812",
    "input": {
      "first": 250,
      "query": "created_at:>=2026-11-10 created_at:<2026-11-17"
    }
  }'
```

WooCommerce:

```
curl -X POST "https://api.aisa.one/apis/v1/connector/actions/run" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actionKey": "woocommerce.list_orders",
    "externalUserId": "store_8812",
    "input": {
      "after": "2026-11-10T00:00:00Z",
      "before": "2026-11-17T00:00:00Z",
      "perPage": 100
    }
  }'
```

### 3. Add the week's email campaigns

klaviyo.list_campaigns lists the merchant's email campaigns, newest first, so the report can set sales beside what was sent.

```
curl -X POST "https://api.aisa.one/apis/v1/connector/actions/run" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actionKey": "klaviyo.list_campaigns",
    "externalUserId": "store_8812",
    "input": {
      "channel": "email",
      "sort": "-scheduled_at",
      "pageSize": 10
    }
  }'
```

### 4. Write the report to Notion

notion.create_page adds a page under the parent page the merchant picks, with the summary as Markdown. It is a write, so it runs once; check the page before you run it again.

```
curl -X POST "https://api.aisa.one/apis/v1/connector/actions/run" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actionKey": "notion.create_page",
    "externalUserId": "store_8812",
    "input": {
      "parentId": "1f2e3d4c5b6a49788796a5b4c3d2e1f0",
      "title": "Store report, 10 to 16 November",
      "markdown": "## Sales\n...\n## Email campaigns\n..."
    }
  }'
```

## Let your coding agent build it

Paste this into Claude Code, Codex or Cursor in your product's repository, and keep your AIsa key in the server's environment.

```text
Add a weekly store report to this app with AIsa Connect (https://aisa.one/docs/resources/aisa-connect).

Read the guide first. Call AIsa only from the server with AISA_API_KEY from the environment.

1. Let each merchant connect Shopify or WooCommerce and Klaviyo with credentials, and Notion through the hosted connect page, with their ID as externalUserId.
2. Every Monday, for each merchant, page through last week's orders with shopify.list_orders (a created_at query) or woocommerce.list_orders (after and before).
3. Add last week's email campaigns from klaviyo.list_campaigns.
4. Compute revenue, order count and average order value in code, not in the model.
5. Write the summary with notion.create_page under the page the merchant chose, once a week.

Read each action's inputSchema before writing the calls, and show me the plan first.
```

Your coding agent shows a plan before it writes code. Compare the first report with the store's own analytics before you send it to merchants.

## Questions about automated ecommerce reporting

### What is automated ecommerce reporting?

Automated ecommerce reporting pulls sales, orders and marketing results from a store's apps on a schedule and writes a summary without anyone exporting a spreadsheet. On AIsa Connect, your product does this for each merchant from their own connected accounts.

### Which apps can the report read from?

Shopify, WooCommerce and Square for orders, Klaviyo and Mailchimp for email, and Stripe for payments are verified in production. The Connectors tab lists other apps with their actions.

### How do I run the report every week?

Use your own scheduler, such as a cron job or a queue, to send the same requests for each merchant. Each run is one request to AIsa Connect.

### Can the report go to Google Sheets instead of Notion?

Not yet. Google apps connect with read access today, so the report can read a sheet but not write one. Notion and Airtable accept writes.

### Will the numbers match Shopify's own reports?

They follow the orders the API returns, so refunds, taxes and time zones depend on how your code counts them. Compare the first report with the store's own analytics and adjust.

### What does a weekly report cost?

A report that pages through orders twice, lists campaigns and writes one page makes four runs, about $0.0012 at $0.0003 per successful run. Connecting accounts is free.

## Related tasks

- [Build a Shopify AI agent](https://aisa.one/solutions/shopify-ai-agent.md): Merchants connect their store once, and your agent reads orders and stock and tags orders through AIsa Connect. For Agent builders and Cross-border sellers
- [Build an AI customer support agent](https://aisa.one/solutions/ai-customer-support-agent.md): Read order questions from a merchant's Gmail, look up each order in their store and draft the reply for a person to send. For Agent builders and Enterprise teams
