# ExportEasy: Magento 2 Order Export CSV Automation

> Automate Magento 2 order export to CSV with custom templates, scheduled FTP delivery, and HTTP API integration - no code required.

---

## Overview

ExportEasy is a Magento 2 order export CSV automation tool that gives you full control over how order data leaves your store. Build CSV templates using token-based field codes, schedule automatic exports by order status, and deliver files to FTP servers or HTTP API endpoints - all without writing code. Every export is logged with request and response details, and any failed run can be replayed from the Export Log.

![ExportEasy configuration overview](images/overview.png)

This module helps you:

- Build unlimited CSV templates using a flexible token syntax that maps order, product, address, tax, and payment fields to any column layout
- Schedule automatic exports to run hourly, daily, weekly, or monthly - triggered by order status or new-order events
- Deliver export files directly to FTP/SFTP servers or HTTP API endpoints with built-in authentication support
- Replay any failed export run from the Export Log without re-configuring the job
- Track every export with a complete audit trail including execution time, order counts, and full API request/response logs

---

## When to use this

Use ExportEasy when you want to:

- Feed order data into a third-party warehouse, fulfilment, or courier system that expects a specific CSV layout
- Automate daily or hourly order feeds to a 3PL, ERP, or accounting platform without manual intervention
- Export one row per product line (rather than one row per order) for fulfilment systems that need per-SKU detail - requires ShipEasy (Growth/Pro plan)
- Pull profit and customer-lifetime-value fields into an export alongside order totals - requires ProfitEasy (Pro plan)
- Audit which orders have been exported, when, and with what result - and re-run the ones that failed

---

## Key capabilities

- **CSV template builder** - define column headers and field tokens in a single text line; supports order, address, product, payment, tax, and custom attribute fields
- **Auto-Export scheduler** - hourly cron with per-task options for status filter, date range, destination, and post-export status update
- **FTP/SFTP delivery** - send files to a remote server with username/password authentication; timestamped filenames prevent overwrites
- **HTTP API delivery** - POST or PUT to any REST endpoint; supports No Auth, Bearer Token, and Basic Auth; configurable headers and field mapping (Pro plan)
- **Export Log with replay** - every run is stored with status, order list, runtime, and full request/response; failed runs can be replayed individually or by order
- **ShipEasy integration** - adds per-product-line rows and shipping-rule fields to templates (Growth/Pro plan)
- **ProfitEasy integration** - adds CLV, AOV, order profit, and referral fields to templates (Pro plan)
- **State abbreviation** - converts full state names (e.g. "California") to abbreviations (e.g. "CA") across all address fields

---

## Installation

ExportEasy installs via Composer, then activates with a license key from your Moogento.com account. The whole flow takes about 5 minutes.

### Step 1: Get your Composer keys from Moogento.com

1. Sign in at **https://www.moogento.com** and open **My Plugins** in your account menu.
2. Find **ExportEasy** in the list of plugins you own.
3. Generate (or reveal) the Composer access keys for that plugin - a **public key** and a **private key**.
4. **Add your install domain to the key.** Each Composer key is tied to a specific domain - if you're installing on `yourstore.com`, add `yourstore.com` to the key's allowed domains. The Composer download will be rejected on any other domain.

If you run staging and production on different domains, add both - separate keys per environment are fine too.

### Step 2: Install the module with Composer

From your Magento 2 root directory:

```
composer require moogento/module-exporteasy
```

When Composer asks for credentials, paste the **public key** as the username and the **private key** as the password. They'll be cached in `~/.composer/auth.json` for future runs.

### Step 3: Enable the module in Magento

```
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
```

If you run `php bin/magento module:status Moogento_Exporteasy` you should see it listed as enabled.

### Step 4: Add your license key in the Moogento admin

1. Still on **https://www.moogento.com > My Plugins**, copy the **license key** for ExportEasy (separate from the Composer keys you used above).
2. In your Magento admin, go to Stores > Configuration > Moogento > Licenses.
3. Find the row for **ExportEasy** and paste the license key.
4. Click **Save Config**, then run `php bin/magento cache:clean` once.

The license validates within a few seconds. You should see the module's status flip to active. If it stays inactive, double-check the domain on the license matches where you've installed - domain mismatch is the most common cause.

---

## Setup overview

Most setup happens in:

Stores > Configuration > Moogento > ExportEasy

You'll mainly work with:

- **General** - state abbreviation, keep CSV on server, log retention
- **CSV Export Templates** - define your field layouts and column headers
- **Auto-Export** - schedule tasks with status filters, destinations, and post-export actions

The Export Log is a separate admin page under Moogento > ExportEasy > Export Log.

---

## Common setups

### Build a CSV template for a fulfilment system

Most courier and fulfilment integrations require a specific column layout. ExportEasy templates let you define that layout once using token codes.

![CSV Export Templates config group](images/config-csv-setup.png)

#### How to set it up

1. Go to:
   Stores > Configuration > Moogento > ExportEasy > CSV Export Templates

2. In the template editor, enter one template row using the format `{token}[Column Header]`:

   ```
   {created_at}[Date],{increment_id}[Order ID],{grand_total}[Total],{currency_code}[Currency],{customer_email}[Email],{customer_name}[Name],{shipping_address}[Address],{shipping_postcode}[Postcode],{shipping_country_id}[Country]
   ```

   Omit the `[Column Header]` part to leave the column untitled. Use `{~Fixed text~}` to put the same value in every row of a column (useful for carrier account codes).

3. Give the template a name and click **Save Config**.

4. To export: go to Sales > Orders, select the orders you want, choose **Export CSV (ExportEasy)** from the Actions dropdown, select your template, and download.

#### Notes

- The Seed plan allows up to 2 templates; Growth allows 5; Pro is unlimited.
- Legacy single-template configurations are migrated automatically on upgrade - you do not need to re-enter templates after updating.
- Use `{order_products_list}` or `{order_skus_list}` to put all product names or SKUs into a single cell. For one row per product, use ShipEasy fields instead (see Features reference).

---

### Schedule an automatic nightly export via FTP

Instead of exporting manually each day, set ExportEasy to deliver a file to your FTP server automatically.

![Auto-Export config group](images/config-auto-export.png)

#### How to set it up

1. Go to:
   Stores > Configuration > Moogento > ExportEasy > Auto-Export

2. Add a new auto-export task and set:
   - **Export Method** = FTP
   - **Schedule** = Daily (set the time you want the export to run)
   - **Order Status** = the status(es) you want to export (e.g. "Processing", "Complete")
   - **Template** = the CSV template you created above
   - **FTP Host**, **Username**, **Password**, **Remote Path** = your FTP server details
   - **Once Only** = Yes (prevents the same order being exported again on the next run)

3. Optionally set **Update Order Status After Export** to automatically move orders to a new status (e.g. "Exported") so you can filter them out of future runs.

4. Click **Save Config**.

5. Confirm the cron job is active: the `moogento_exporteasy_auto_export` cron runs hourly. The first export will run at the next scheduled time.

#### Notes

- Auto-export requires a Growth or Pro license. Seed plan exports are manual only.
- FTP integration is available on Growth and Pro plans. API delivery requires Pro.
- The auto-export observer also fires immediately on `checkout_submit_all_after` and `sales_order_invoice_save_commit_after` when "Send Every Order" mode is enabled.

---

### Review and replay exports from the Export Log

The Export Log shows every export attempt with status, order count, timing, and full API details - useful for diagnosing delivery problems.

#### How to set it up

1. Go to:
   Moogento > ExportEasy > Export Log

2. Find the failed run in the list. The **Status** column shows Success, Error, Processing, or "Complete with Errors".

3. Click the row to see the full log entry - including the request body, response headers, and any authentication exchange.

4. To re-run: click **Replay** on the failed row. ExportEasy retries the delivery using the same template and destination from the original run.

#### Notes

- Log entries are retained for the number of days set in `moogento_exporteasy/general/log_length_days` (default: 2 days). Increase this if you need a longer audit window.
- The `moogento_exporteasy_auto_clean_export_logs` cron purges old entries daily.
- To replay a specific order (rather than a full run), use the replay-by-order action from the Orders grid.

---

## Features reference

### General settings

Controls basic behaviour that applies to all exports.

- **What it does:** Abbreviates state names in all address fields; keeps a copy of every generated CSV on the server; controls how many days log entries are retained.
- **When to use it:** Enable state abbreviation when your destination system expects two-letter state codes. Enable "Keep CSV on server" if you need a local file archive in addition to FTP/API delivery.
- **Config path:** `moogento_exporteasy/general/abbreviate_states`, `moogento_exporteasy/general/keep_csv_on_server`, `moogento_exporteasy/general/log_length_days`

Stores > Configuration > Moogento > ExportEasy > General

![General config group](images/config-general.png)

---

### ShipEasy data fields

Adds per-product-line fields and shipping rule fields to CSV templates when ShipEasy is installed.

- **What it does:** Exposes `{shipeasy_sku}`, `{shipeasy_product}`, `{shipeasy_qty}`, `{shipeasy_shiprule}`, `{shipeasy_ordertag_1}`, `{shipeasy_ordertag_2}`, `{shipeasy_comment}`, `{shipeasy_preshipment_tracking}`, `{shipeasy_is_multisku}`, and net revenue fields (`{shipeasy_net_order_revenue}`, `{shipeasy_base_net_order_revenue}`). Also exposes any product attribute you've configured in ShipEasy via `{shipeasy_product_attribute_[code]}`.
- **When to use it:** Use `{shipeasy_sku}` and `{shipeasy_product}` to generate one CSV row per ordered product rather than one row per order - essential for fulfilment systems that process at the line level.
- **Requirement:** ShipEasy must be installed and enabled. Growth or Pro ExportEasy plan required.
- **Config path:** `moogento_exporteasy/shipeasy_fields` (reference section - no editable fields here; configure ShipEasy columns in ShipEasy's own settings)

---

### Auto-Export scheduler

Defines one or more automated export tasks, each with its own schedule, filter, template, and destination.

- **What it does:** The `moogento_exporteasy_auto_export` cron evaluates all active auto-export tasks hourly and triggers delivery for matching orders. Supports FTP (Growth/Pro) and HTTP API (Pro) destinations. Each task can update the order status after a successful export and can be set to "once only" to avoid duplicate deliveries.
- **When to use it:** Any scenario where you need hands-free daily, hourly, or event-driven order export - fulfilment pipelines, ERP synchronisation, accounting feeds.
- **Schedule options:** Send Every Order (event-driven), Hourly, Daily, Weekly, Monthly, Monday–Friday.
- **Config path:** `moogento_exporteasy/auto_export/config`

Stores > Configuration > Moogento > ExportEasy > Auto-Export

---

## Advanced configuration

### API export (Pro plan)

Send order data as an HTTP POST or PUT request to any REST endpoint.

#### What it does

Instead of generating a CSV file, ExportEasy serialises the order data as an API payload and delivers it directly to a URL. You can configure request headers, choose between Bearer Token and Basic Auth, and map order fields to the API's expected field names.

#### Setup

1. Go to:
   Stores > Configuration > Moogento > ExportEasy > Auto-Export

2. Add or edit an auto-export task and set **Export Method** = API.

3. Set:
   - **API Endpoint URL** - the full URL including path
   - **HTTP Method** - POST or PUT
   - **Authentication Type** - No Auth, Bearer Token, or Basic Auth
   - **Auth Token / Username / Password** - depending on authentication type
   - **Custom Headers** - any additional headers the endpoint requires

4. Click **Save Config** and trigger a test export to verify the connection.

#### Notes

- API export is available on the Pro plan only.
- Full request and response bodies, including authentication exchanges, are stored in the Export Log. Review these when diagnosing delivery problems.
- The module retries failed API requests with exponential backoff. Check the Export Log to see retry attempts.

---

### Product attribute filtering (Growth/Pro)

Limit which orders are included in an auto-export task based on product attribute values.

#### What it does

Each auto-export task can define attribute filters so only orders containing products that match are exported. Supported match types: LIKE (text), IN (select/multiselect), and range (date, price, weight).

#### Setup

1. In the Auto-Export task configuration, locate the **Product Attribute Filtering** section.
2. Add a filter: choose the attribute code, match type, and value.
3. Multiple filters are evaluated with AND logic - an order must match all filters to be included.

#### Notes

- Available on Growth and Pro plans. Advanced filtering (more conditions) requires Pro.
- Attribute codes come from Stores > Attributes > Product.

---

## Tips & best practices

- **Start with the Default template**, then clone and modify it for specific destinations. This keeps a working fallback.
- **Use "Once Only"** on every auto-export task unless your downstream system is idempotent. Exporting the same order twice to a fulfilment system creates duplicate pick-pack jobs.
- **Set a post-export status** (e.g. "Exported") so you can filter the Orders grid and quickly identify which orders have already been sent.
- **Keep log retention at 7 days or more** during initial setup so you have enough history to diagnose any delivery issues before they age out.
- **Test FTP credentials manually** before enabling auto-export - use a command-line FTP client from your web server to confirm host, path, and firewall access before ExportEasy tries it.
- **For large catalogues**, use product attribute filtering to split a big export into smaller per-category or per-brand tasks. This reduces per-run order counts and keeps within plan limits.
- **Abbreviate states** if your destination system uses ISO state codes - it saves a transformation step on the receiving side.
- **Save a copy on server** (`keep_csv_on_server`) during onboarding so you can inspect exactly what ExportEasy generated, even if FTP delivery succeeded.

---

## Troubleshooting

### FTP delivery does not arrive at the destination server

The auto-export cron runs but no file appears on the remote server.

- **Cause:** Incorrect FTP credentials, wrong remote path, or the server is firewalled from your Magento host.
- **Check:** Open Moogento > ExportEasy > Export Log and find the failed run. The log entry shows the FTP response (connection refused, authentication failed, permission denied).
- **Resolution:** Verify the host, username, password, and remote path in the auto-export task. Test the same credentials from the command line on your web server using `ftp` or `sftp`. If the connection is refused, check whether the server IP is whitelisted in the destination firewall.

---

### CSV columns are empty or show `{token_name}` literally

Generated CSV contains the raw token text instead of order data.

- **Cause:** Incorrect token syntax in the template, a misspelled field code, or a product attribute that does not exist.
- **Check:** Compare the template field tokens against the full list in Stores > Configuration > Moogento > ExportEasy > CSV Export Templates (the comment block lists every valid token). Token syntax is `{field_name}[Column Title]` - curly braces, no spaces inside the braces.
- **Resolution:** Correct the token spelling. For `{product_attributes_[code]}` fields, verify the attribute code in Stores > Attributes > Product. For ShipEasy fields, confirm ShipEasy is installed, enabled, and has processed those orders.

---

### Scheduled export does not run

No new entries appear in the Export Log at the expected time.

- **Cause:** The Magento cron is not running, or the auto-export task is disabled or misconfigured.
- **Check:** Confirm the cron is executing by looking at `var/log/moogento_exporteasy.log`. Also check whether the auto-export task is set to active and that the order status filter matches orders that actually exist in that status.
- **Resolution:** Run `php bin/magento cron:run` manually to trigger the cron and watch for log output. If the cron itself is absent, set up the Magento cron job in your server's crontab. Auto-export requires a Growth or Pro license - verify the plan in Stores > Configuration > Moogento > Licenses.

---

### Orders are being exported more than once

The same orders keep appearing in successive auto-export runs.

- **Cause:** The "Once Only" option is not enabled in the auto-export task, so orders that match the status filter are re-exported every run.
- **Check:** Open the auto-export task configuration and check the **Once Only** setting.
- **Resolution:** Enable **Once Only**. Alternatively, set a **post-export status update** to move exported orders to a different status (e.g. "Exported") so they no longer match the task's status filter on subsequent runs.

---

### Large export takes too long or times out

Exports with many orders are slow or terminate before completing.

- **Cause:** Exporting a large number of orders in a single run can exceed PHP execution time limits or server memory.
- **Check:** The Export Log shows execution time per run. Check your PHP `max_execution_time` and `memory_limit` settings.
- **Resolution:** Use product attribute filtering to split the export into smaller batches. Schedule exports during off-peak hours. On the Growth and Pro plans, batch processing is enabled and handles up to 500 or 1000 orders per run respectively. If you consistently approach the limit, consider upgrading the plan.

---

## FAQs

<!-- seo: FAQPage schema - the page converter should emit JSON-LD for this section -->

## How do I set up Magento 2 order export CSV automation?

Go to Sales > Orders, select the orders you want, choose **Export CSV (ExportEasy)** from the Actions dropdown, pick a template, and download the file. See [Common setups](#common-setups) for instructions on building your own template with custom column headers.

## Can ExportEasy automatically send order exports to my fulfilment company?

Yes - configure an auto-export task in Stores > Configuration > Moogento > ExportEasy > Auto-Export, set the schedule (hourly, daily, etc.), choose FTP as the delivery method, and enter your fulfilment partner's FTP credentials. The export runs automatically every time the cron fires. FTP delivery requires a Growth or Pro plan.

## How do I get one row per product instead of one row per order?

Use `{shipeasy_sku}`, `{shipeasy_product}`, and `{shipeasy_qty}` field tokens in your CSV template. These fields require **ShipEasy** to be installed and enabled, and an ExportEasy Growth or Pro license. Once ShipEasy processes an order, those fields emit one row per product line.

## What is the difference between the Seed, Growth, and Pro plans?

Seed exports up to 100 orders per run, supports manual export only, and allows 2 templates. Growth raises the limit to 500 orders, adds FTP auto-export and ShipEasy integration, and allows 5 templates. Pro allows up to 1000 orders, adds HTTP API export, ProfitEasy integration, advanced filtering, and unlimited templates. See Stores > Configuration > Moogento > Licenses to check your current plan.

## How do I re-run an export that failed to deliver?

Go to Moogento > ExportEasy > Export Log, find the failed run, and click **Replay**. ExportEasy repeats the delivery using the same template and destination. You can also replay by individual order from the Orders grid.

## Does ExportEasy work with Hyvä, Luma, and Porto themes?

Yes - ExportEasy is a purely admin-side module. It adds functionality to the Magento admin panel and does not touch any storefront templates, so it is compatible with Hyvä, Luma, Porto, and any other storefront theme.

## Can I include profit margin or customer lifetime value in my exports?

Yes - add `{profiteasy_order_profit}`, `{profiteasy_clv}`, `{profiteasy_aov}`, and related tokens to your CSV template. This requires **ProfitEasy** to be installed and an ExportEasy Pro license.

## What happens to exports if I disable ExportEasy?

Disabling ExportEasy stops all auto-export cron tasks immediately. Manual export buttons disappear from the Orders, Invoices, and Shipments grids. The Export Log data remains in the database. Existing CSV files saved on the server are not deleted.

## How do I stop the same order being exported twice?

Enable **Once Only** in the auto-export task, or set a **post-export status update** so exported orders move to a different status and no longer match the task's filter on subsequent runs.

## Where can I see what ExportEasy sent to my API endpoint?

Open Moogento > ExportEasy > Export Log and click on any run. The log entry stores the full request body, request headers (including authentication headers), and the response body - so you can inspect exactly what was sent and what the server returned.

---

## Related guides

- **ShipEasy** - required for one-row-per-product exports using `{shipeasy_*}` field tokens; configure shipping rules and product attributes in ShipEasy before using those tokens in ExportEasy templates

---

## Need help?

- moo@moogento.com
- Include:
  - Magento version
  - Module name
  - What you're trying to do
