# Shopify Automation Toolkit (`waxlike_polecat/shopify-automation-toolkit`) Actor

Automate Shopify operations: export products/orders, backup store data, sync inventory, generate sales reports. 9 powerful tasks, no coding required.

- **URL**: https://apify.com/waxlike\_polecat/shopify-automation-toolkit.md
- **Developed by:** [Mohamed Ali DHIBA](https://apify.com/waxlike_polecat) (community)
- **Categories:** Automation, E-commerce, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ⚡ Shopify Automation Toolkit

**Automate your Shopify store operations with powerful, no-code automation tools.** Export products, manage inventory, generate reports, and streamline your e-commerce workflows—all without writing a single line of code.

Perfect for **store owners**, **developers**, and **agencies** managing multiple Shopify stores.

***

### 🚀 Quick Start

Get started in 3 simple steps:

1. **Get your Shopify credentials** (store URL + Admin API access token)
2. **Choose a task** from 9 powerful automation options
3. **Run the actor** and download your results

That's it! No setup, no installation, no coding required.

***

### ✨ Features

#### 9 Powerful Automation Tasks

| Task | Description | Use Case |
|------|-------------|----------|
| 📦 **Export Products** | Export your entire product catalog to CSV/JSON | Product analysis, backup, migration |
| 🛒 **Export Orders** | Export orders with advanced filtering | Financial reporting, fulfillment |
| 💾 **Backup Store** | Complete backup of products, collections & customers | Disaster recovery, migration |
| 📊 **Sync Inventory** | Synchronize inventory levels across variants | Stock management, multi-channel sync |
| 👥 **Export Customers** | Export customer database with metadata | Marketing campaigns, CRM integration |
| 🛍️ **Export Abandoned Carts** | Export abandoned checkout data | Cart recovery campaigns |
| 📈 **Sales Reports** | Generate detailed sales analytics | Business intelligence, forecasting |
| ✏️ **Bulk Update Products** | Mass update prices, tags, or inventory | Sales events, catalog management |
| 📉 **Store Analytics** | Comprehensive store statistics | Performance monitoring, insights |

#### Key Capabilities

✅ **Multiple Export Formats** - CSV, JSON\
✅ **Advanced Filtering** - Date ranges, status, tags, vendors\
✅ **Dry Run Mode** - Preview changes before applying\
✅ **Rate Limiting** - Automatic handling of Shopify API limits\
✅ **Flexible Output** - Dataset or Key-Value Store\
✅ **Metafields Support** - Include custom fields in exports\
✅ **Error Handling** - Robust error recovery and logging

***

### 📖 How to Use

#### Prerequisites

You need two pieces of information from your Shopify store:

1. **Store URL**: Your myshopify.com domain (e.g., `my-store.myshopify.com`)
2. **Admin API Access Token**: A private app access token with appropriate permissions

##### Getting Your API Credentials

**Step 1: Create a Custom App**

1. Go to your Shopify admin panel
2. Navigate to **Settings** → **Apps and sales channels**
3. Click **Develop apps** → **Create an app**
4. Name your app (e.g., "Automation Toolkit")

**Step 2: Configure API Scopes**

Enable these scopes based on the tasks you want to use:

- `read_products` - For product exports and analytics
- `write_products` - For bulk product updates
- `read_orders` - For order exports and sales reports
- `read_customers` - For customer exports
- `read_inventory` - For inventory sync
- `write_inventory` - For inventory updates

**Step 3: Get Your Access Token**

1. Install the app to your store
2. Copy the **Admin API access token** (starts with `shpat_`)
3. Keep this token secure and never share it publicly

***

### 🎯 Task Documentation

#### 1. Export Products

Export your entire product catalog with variants, images, and pricing.

**Input Example:**

```json
{
  "task": "export_products",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "csv",
  "includeMetafields": true,
  "limit": 0
}
```

**Output Fields:**

- Product ID, title, handle, vendor, type
- Variant details (SKU, price, inventory)
- Images, tags, status, dates
- Optional: metafields

**Use Cases:**

- Product catalog backup
- Price analysis and optimization
- Inventory audits
- Data migration to other platforms

***

#### 2. Export Orders

Export orders with powerful filtering options.

**Input Example:**

```json
{
  "task": "export_orders",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "json",
  "dateRange": {
    "from": "2024-01-01",
    "to": "2024-12-31"
  },
  "orderStatus": "fulfilled",
  "limit": 1000
}
```

**Filtering Options:**

- **Date Range**: Filter by order creation date
- **Status**: all, open, closed, cancelled, fulfilled, unfulfilled
- **Limit**: Cap the number of orders to export

**Output Fields:**

- Order ID, number, customer info
- Financial status, fulfillment status
- Totals, tax, discounts
- Shipping and billing addresses
- Line items summary

**Use Cases:**

- Monthly sales reports
- Tax and accounting exports
- Fulfillment tracking
- Customer service data

***

#### 3. Backup Store

Create a complete backup of your store data.

**Input Example:**

```json
{
  "task": "backup_store",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "json",
  "includeMetafields": true
}
```

**What's Included:**

- All products and variants
- Custom and smart collections
- Customer database
- Shop information
- Inventory locations

**Use Cases:**

- Disaster recovery preparation
- Store migration
- Development/staging setup
- Compliance and auditing

***

#### 4. Sync Inventory

Synchronize inventory levels across your store.

**Input Example:**

```json
{
  "task": "sync_inventory",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "inventorySyncConfig": {
    "source": "external_csv",
    "csvUrl": "https://example.com/inventory.csv",
    "updateMethod": "set",
    "notifyOnLowStock": true,
    "lowStockThreshold": 10
  },
  "dryRun": true
}
```

**Features:**

- Low stock notifications
- Dry run mode for safety
- Multiple update methods (set, adjust)
- SKU-based matching

**Use Cases:**

- Multi-channel inventory sync
- Warehouse integration
- Stock level audits
- Low stock alerts

***

#### 5. Export Customers

Export your complete customer database.

**Input Example:**

```json
{
  "task": "export_customers",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "csv",
  "includeMetafields": true
}
```

**Output Fields:**

- Customer ID, name, email, phone
- Orders count, total spent
- Marketing preferences
- Tags and segments
- Address information
- Account status

**Use Cases:**

- Email marketing campaigns
- Customer segmentation
- CRM integration
- Loyalty program setup

***

#### 6. Export Abandoned Carts

Export abandoned checkout data for recovery campaigns.

**Input Example:**

```json
{
  "task": "export_abandoned_carts",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "csv",
  "dateRange": {
    "from": "2024-11-01",
    "to": "2024-12-31"
  }
}
```

**Output Fields:**

- Checkout ID, token, URL
- Customer information
- Cart totals and items
- Timestamps
- Recovery status

**Use Cases:**

- Cart recovery email campaigns
- Conversion rate analysis
- Customer behavior insights
- Revenue recovery

***

#### 7. Sales Reports

Generate comprehensive sales analytics.

**Input Example:**

```json
{
  "task": "sales_reports",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "dateRange": {
    "from": "2024-01-01",
    "to": "2024-12-31"
  }
}
```

**Report Includes:**

- **Summary Metrics**: Total revenue, orders, AOV
- **Monthly Performance**: Trends and patterns
- **Top Products**: Best sellers by revenue
- **Top Customers**: Highest spending customers
- **Product Analysis**: Units sold, revenue by product

**Use Cases:**

- Monthly business reviews
- Performance tracking
- Inventory planning
- Marketing ROI analysis

***

#### 8. Bulk Update Products

Mass update product attributes safely.

**Input Example:**

```json
{
  "task": "bulk_update_products",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "bulkUpdateData": {
    "action": "update_prices",
    "filter": {
      "tags": ["summer-sale"],
      "vendor": "MyBrand"
    },
    "updates": {
      "price_adjustment": "-20%"
    }
  },
  "dryRun": true
}
```

**Update Types:**

- Price adjustments (percentage or fixed)
- Tag modifications
- Inventory quantities
- Product status

**Safety Features:**

- Dry run preview mode
- Detailed change logs
- Filter-based targeting
- Rollback support

**Use Cases:**

- Flash sales and promotions
- Seasonal price adjustments
- Inventory corrections
- Catalog reorganization

***

#### 9. Store Analytics

Get comprehensive store insights.

**Input Example:**

```json
{
  "task": "store_analytics",
  "shopifyStore": "my-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "dateRange": {
    "from": "2024-01-01",
    "to": "2024-12-31"
  }
}
```

**Analytics Included:**

- **Shop Info**: Plan, timezone, currency
- **Product Metrics**: Total products, variants, status breakdown
- **Order Metrics**: Revenue, AOV, items sold
- **Customer Metrics**: Total customers, LTV, order frequency
- **Collection Stats**: Custom and smart collections count

**Use Cases:**

- Business performance monitoring
- Growth tracking
- Inventory health checks
- Strategic planning

***

### 💡 Use Cases

#### For Store Owners

- **Daily Operations**: Export orders for fulfillment
- **Inventory Management**: Sync stock levels across channels
- **Customer Service**: Quick access to customer data
- **Financial Reporting**: Monthly sales and tax reports

#### For Developers

- **Data Integration**: Export to external systems
- **Custom Analytics**: Build dashboards with exported data
- **Testing**: Backup before making changes
- **Automation**: Schedule regular exports

#### For Agencies

- **Client Reporting**: Automated performance reports
- **Store Migration**: Backup and transfer stores
- **Bulk Operations**: Manage multiple stores efficiently
- **Data Analysis**: Compare performance across clients

***

### 🔧 Configuration Options

#### Export Formats

Choose the format that works best for your workflow:

- **CSV**: Perfect for Excel, Google Sheets, and most tools
- **JSON**: Ideal for developers and API integrations

#### Output Destinations

- **Dataset**: Structured data viewable in Apify Console
- **Key-Value Store**: Downloadable files for offline use

#### Advanced Options

- **Limit**: Cap the number of records processed
- **Date Range**: Filter by creation/update dates
- **Include Metafields**: Export custom field data
- **Custom Fields**: Select specific fields to export
- **Dry Run**: Preview changes without applying them

***

### 📊 Pricing

This actor uses **Apify platform credits**. Typical costs:

- **Actor Start**: ~$0.00005 per run
- **Result Completion**: ~$0.0001 per task
- **Per 1,000 Records**: ~$0.00001

**Example**: Exporting 10,000 products costs approximately **$0.001** (less than a penny!)

💡 **Free Tier**: Apify offers free credits for new users. Perfect for testing!

***

### 🛡️ Security & Privacy

Your data security is our priority:

✅ **Secure Connection**: All API calls use HTTPS\
✅ **Token Privacy**: Access tokens are never logged or stored\
✅ **Shopify Official API**: Uses official Shopify REST API\
✅ **No Third Parties**: Data goes directly from Shopify to Apify\
✅ **Automatic Rate Limiting**: Respects Shopify API limits

**Best Practices:**

- Use a dedicated custom app for automation
- Grant only necessary API scopes
- Rotate access tokens regularly
- Monitor API usage in Shopify admin

***

### 🐛 Troubleshooting

#### Common Issues

**❌ "Invalid Shopify access token"**

- Ensure token starts with `shpat_`
- Check token has necessary scopes
- Verify app is installed on your store

**❌ "Rate limited"**

- The actor automatically handles rate limits
- Consider reducing the number of records
- Shopify allows 2 requests/second

**❌ "Connection timeout"**

- Check your Shopify store is accessible
- Verify store URL format: `store-name.myshopify.com`
- Try again in a few minutes

**❌ "Missing permissions"**

- Review API scopes for your custom app
- Ensure app has required read/write permissions
- Reinstall the app if needed

#### Need Help?

- 📧 **Email Support**: Contact actor creator
- 💬 **Apify Discord**: Join the community
- 📚 **Documentation**: Check Shopify API docs
- 🐛 **Report Issues**: Use GitHub issues

***

### 🔄 Updates & Changelog

#### Version 1.0 (Current)

**Initial Release**

- ✅ 9 automation tasks
- ✅ Multiple export formats (CSV, JSON)
- ✅ Advanced filtering options
- ✅ Dry run mode
- ✅ Rate limiting handling
- ✅ Comprehensive documentation

**Coming Soon**

- Product image downloads
- GraphQL API support
- Scheduled automations
- Multi-store support
- Advanced reporting templates

***

### 📚 Resources

#### Official Documentation

- [Shopify Admin API](https://shopify.dev/docs/api/admin-rest)
- [Apify Documentation](https://docs.apify.com/)
- [Shopify App Development](https://shopify.dev/docs/apps)

#### Helpful Links

- [Shopify API Rate Limits](https://shopify.dev/docs/api/usage/rate-limits)
- [Create Custom App](https://help.shopify.com/en/manual/apps/app-types/custom-apps)
- [API Scopes Reference](https://shopify.dev/docs/api/usage/access-scopes)

***

### 📝 License

MIT License - See [LICENSE](LICENSE) file for details

***

### 👨‍💻 Author

**Ali Dhiba**

Created with ❤️ for the Shopify community

***

### 🌟 Support This Project

If you find this actor useful:

- ⭐ Star the actor on Apify Store
- 📝 Leave a review
- 🐛 Report bugs or suggest features
- 💬 Share with other Shopify users

***

### ❓ FAQ

**Q: Do I need coding skills to use this actor?**\
A: No! Everything is configured through a simple form. Just provide your credentials and select a task.

**Q: Is this safe to use on my production store?**\
A: Yes. The actor only reads data by default. For update tasks, always use dry run mode first.

**Q: Can I schedule automatic exports?**\
A: Yes! Use Apify's scheduling feature to run tasks daily, weekly, or monthly.

**Q: How much does it cost?**\
A: Very affordable! Most exports cost less than $0.01. Apify offers free credits to start.

**Q: Can I export data from multiple stores?**\
A: Yes, run the actor multiple times with different store credentials.

**Q: What's the maximum number of records I can export?**\
A: No hard limit! The actor handles pagination automatically. Set a limit if needed.

**Q: Can I customize the export fields?**\
A: Yes, use the `customFields` parameter to specify which fields to include.

**Q: Is my data stored on Apify servers?**\
A: Exported data is stored temporarily in your Apify storage. You can download and delete it anytime.

***

**Ready to automate your Shopify store? Get started now! 🚀**

# Actor input Schema

## `task` (type: `string`):

Choose the automation task you want to perform on your Shopify store

## `shopifyStore` (type: `string`):

Your Shopify store URL (e.g., your-store.myshopify.com)

## `shopifyAccessToken` (type: `string`):

Your Shopify Admin API access token with necessary permissions

## `format` (type: `string`):

Choose the output format for exported data (applies to export tasks)

## `dateRange` (type: `object`):

Filter data by date range (optional, applies to orders and reports)

## `orderStatus` (type: `string`):

Filter orders by status (for export\_orders task)

## `limit` (type: `integer`):

Maximum number of records to process (0 = no limit)

## `bulkUpdateData` (type: `object`):

Configuration for bulk product updates (for bulk\_update\_products task)

## `inventorySyncConfig` (type: `object`):

Configure inventory synchronization (for sync\_inventory task)

## `outputDestination` (type: `string`):

Where to save the exported data

## `dryRun` (type: `boolean`):

Enable dry run mode to preview changes without applying them (for update/sync tasks)

## `includeMetafields` (type: `boolean`):

Include product/customer metafields in exports

## `customFields` (type: `array`):

Specify custom fields to include in exports (optional)

## Actor input object example

```json
{
  "task": "export_products",
  "shopifyStore": "my-awesome-store.myshopify.com",
  "shopifyAccessToken": "shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "format": "json",
  "dateRange": {
    "from": "2024-01-01",
    "to": "2024-12-31"
  },
  "orderStatus": "all",
  "limit": 1000,
  "bulkUpdateData": {
    "action": "update_prices",
    "filter": {
      "tags": [
        "summer-sale"
      ],
      "vendor": "MyBrand"
    },
    "updates": {
      "price_adjustment": "-20%",
      "compare_at_price_adjustment": "0"
    }
  },
  "inventorySyncConfig": {
    "source": "external_csv",
    "csvUrl": "https://example.com/inventory.csv",
    "updateMethod": "set",
    "notifyOnLowStock": true,
    "lowStockThreshold": 10
  },
  "outputDestination": "dataset",
  "dryRun": true,
  "includeMetafields": false,
  "customFields": [
    "custom_field_1",
    "custom_field_2"
  ]
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "task": "export_products",
    "shopifyStore": "my-store.myshopify.com",
    "format": "json",
    "dateRange": {
        "from": "2024-01-01",
        "to": "2024-12-31"
    },
    "orderStatus": "all",
    "limit": 0,
    "bulkUpdateData": {
        "action": "update_prices",
        "filter": {
            "tags": [
                "sale"
            ]
        },
        "updates": {
            "price_adjustment": "-10%"
        }
    },
    "inventorySyncConfig": {
        "source": "external_csv",
        "updateMethod": "set",
        "notifyOnLowStock": true,
        "lowStockThreshold": 5
    },
    "outputDestination": "dataset"
};

// Run the Actor and wait for it to finish
const run = await client.actor("waxlike_polecat/shopify-automation-toolkit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "task": "export_products",
    "shopifyStore": "my-store.myshopify.com",
    "format": "json",
    "dateRange": {
        "from": "2024-01-01",
        "to": "2024-12-31",
    },
    "orderStatus": "all",
    "limit": 0,
    "bulkUpdateData": {
        "action": "update_prices",
        "filter": { "tags": ["sale"] },
        "updates": { "price_adjustment": "-10%" },
    },
    "inventorySyncConfig": {
        "source": "external_csv",
        "updateMethod": "set",
        "notifyOnLowStock": True,
        "lowStockThreshold": 5,
    },
    "outputDestination": "dataset",
}

# Run the Actor and wait for it to finish
run = client.actor("waxlike_polecat/shopify-automation-toolkit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "task": "export_products",
  "shopifyStore": "my-store.myshopify.com",
  "format": "json",
  "dateRange": {
    "from": "2024-01-01",
    "to": "2024-12-31"
  },
  "orderStatus": "all",
  "limit": 0,
  "bulkUpdateData": {
    "action": "update_prices",
    "filter": {
      "tags": [
        "sale"
      ]
    },
    "updates": {
      "price_adjustment": "-10%"
    }
  },
  "inventorySyncConfig": {
    "source": "external_csv",
    "updateMethod": "set",
    "notifyOnLowStock": true,
    "lowStockThreshold": 5
  },
  "outputDestination": "dataset"
}' |
apify call waxlike_polecat/shopify-automation-toolkit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=waxlike_polecat/shopify-automation-toolkit",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AAb21vgswvD68lSNY/builds/5NkhzdgDJaGD79kjg/openapi.json
