# ShipEasy: Tips, Command Line and Troubleshooting

> Best practices, the ShipEasy command-line reference, and answers to common orders grid problems.

---

This page is part of the [ShipEasy guide](/docs/shipeasy). Start there for what the extension does, installation and the frequently asked questions.

## Tips & best practices

- **Start with fewer columns.** Enable only the columns your team actually reads on the grid. A dense grid with 20 columns slows down your team; 6-8 focused columns is often faster.
- **Enable the indexer and leave it on.** The Pre-Process: Order Data cron is required for accurate SKU counts, revenue, and stock columns. Disabling it causes those columns to show stale or blank data.
- **Test ShipRules with `--dry-run` first.** Before enabling rules in production, use the CLI dry-run to verify the correct rule matches each order type. A mis-configured rule silently overwrites tags.
- **Match your CSV column headers exactly.** The CSV import does a case-sensitive match against the column title fields in Process: CSV configuration. If your carrier changes a column name, update the config field to match.
- **Use the batch-size setting conservatively.** The default of 500 orders per indexer run is appropriate for most stores. Only raise it if your server has headroom to spare; a too-large batch can cause memory pressure during peak traffic.
- **Suppress comments in high-volume stores.** If your order history becomes cluttered with automated status comments, enabling the comment-suppression options in General keeps order history readable.
- **For US/AU carriers, enable the relevant patterns.** The carrier auto-detection pattern table ships with AMZL US, USPS, AusPost, and broad numeric patterns disabled. Enable the ones you need in Process: CSV > Carrier auto-detection: Pattern rules.
- **Check `var/log/moogento_shipeasy.log` when a mass action doesn't complete.** Enable logging temporarily in General, reproduce the issue, then check the log for which orders caused the problem.

---

## CLI Reference

ShipEasy includes command-line tools for automation, configuration, and reporting. Use `--help` on any command to see the complete option list.

### ShipRules management

Manage and test ShipRules automation from the command line:

```bash
# List all rules
php bin/magento moogento:shipeasy:shiprules --action=list

# Enable a rule
php bin/magento moogento:shipeasy:shiprules --action=enable --rule-id=5

# Disable a rule
php bin/magento moogento:shipeasy:shiprules --action=disable --rule-id=5

# Test a rule against a specific order (preview, no changes)
php bin/magento moogento:shipeasy:shiprules --action=set-for-order --increment-id=100000123 --dry-run

# Apply matching rules to an order
php bin/magento moogento:shipeasy:shiprules --action=set-for-order --increment-id=100000123

# Clear rules from an order
php bin/magento moogento:shipeasy:shiprules --action=clear-from-order --increment-id=100000123
```

Always test rules with `--dry-run` before applying them to production orders.

### Order status management

Change order status for individual or bulk orders:

```bash
# Change single order
php bin/magento moogento:shipeasy:order-status --action=change-status --increment-id=100000123 --status=shipped

# Bulk orders
php bin/magento moogento:shipeasy:order-status --action=change-status --increment-id=100000123,100000124,100000125 --status=processing

# By entity ID instead of increment ID
php bin/magento moogento:shipeasy:order-status --action=change-status --order-id=1,2,3 --status=complete

# Notify customer of status change
php bin/magento moogento:shipeasy:order-status --action=change-status --increment-id=100000123 --status=shipped --notify-customer=1

# Preview changes without applying
php bin/magento moogento:shipeasy:order-status --action=change-status --increment-id=100000123 --status=shipped --dry-run
```

### Order details and snap-process

Analyze and index order data:

```bash
# Show last 5 orders (default)
php bin/magento moogento:shipeasy:order-details

# Show specific number of recent orders
php bin/magento moogento:shipeasy:order-details --count=10

# Show specific order
php bin/magento moogento:shipeasy:order-details --increment-id=100000123
php bin/magento moogento:shipeasy:order-details --order-id=456

# List all available ShipEasy columns
php bin/magento moogento:shipeasy:order-details --show-columns

# Index order data (Pre-Process)
php bin/magento moogento:shipeasy:snap-process

# Process specific number of orders
php bin/magento moogento:shipeasy:snap-process --count=100

# Process specific order
php bin/magento moogento:shipeasy:snap-process --increment-id=100000123

# Preview without applying changes
php bin/magento moogento:shipeasy:snap-process --count=50 --dry-run
```

### Columns configuration

Manage grid columns from the CLI:

```bash
# List current columns
php bin/magento moogento:shipeasy:columns --action=list

# Add a column for a custom product attribute
php bin/magento moogento:shipeasy:columns --action=add --attribute=shelf --title="Shelf Location" --width=120
```

### Order tags management

Set and retrieve order tags:

```bash
# List orders with any tag
php bin/magento moogento:shipeasy:ordertags --action=list-orders-with-any-tag --limit=50

# Set an order tag
php bin/magento moogento:shipeasy:ordertags --action=set-ordertag --increment-id=100000123 --tag-type=priority --tag-value=high

# Get a specific order tag
php bin/magento moogento:shipeasy:ordertags --action=get-ordertag --increment-id=100000123 --tag-type=priority
```

### Grid sorting optimization (Pro only)

Enable optimized sorting for large dataset columns:

```bash
# Enable optimized sorting for a custom attribute
php bin/magento shipeasy:column:grid-sort shelf --process=50

# Disable optimization for an attribute
php bin/magento shipeasy:column:grid-sort shelf --disable

# Check grid sort status
php bin/magento shipeasy:grid-sort:status --validate

# Repair sort indexes
php bin/magento shipeasy:grid-sort:status --fix
```

### ProfitEasy reporting (when ProfitEasy is installed)

Report on per-order profit and traffic attribution when ProfitEasy is enabled. Output is privacy-safe: no customer names, emails, or addresses.

#### Order profit reporting

Show cost breakdown and profit data for orders:

```bash
# Single order
php bin/magento moogento:shipeasy:order-profit --increment-id=100000123

# Recent orders
php bin/magento moogento:shipeasy:order-profit --count=25

# Date range
php bin/magento moogento:shipeasy:order-profit --from="2026-07-01 00:00:00" --to="2026-07-31 23:59:59"

# Entity ID range
php bin/magento moogento:shipeasy:order-profit --id-from=400 --id-to=500

# With cost line-item breakdown
php bin/magento moogento:shipeasy:order-profit --increment-id=100000123 --breakdown

# Machine-readable output
php bin/magento moogento:shipeasy:order-profit --count=25 --format=json
```

#### Order source (traffic attribution) reporting

Show which channel (organic search, ads, social, newsletter, etc.) drove each order:

```bash
# Single order with UTM and referrer details
php bin/magento moogento:shipeasy:order-source --increment-id=100000123 --detail

# Recent orders
php bin/magento moogento:shipeasy:order-source --count=50

# Collapsed summary (total revenue and order count per source)
php bin/magento moogento:shipeasy:order-source --count=50 --summary

# Date range
php bin/magento moogento:shipeasy:order-source --from="2026-07-01 00:00:00" --to="2026-07-31 23:59:59"

# Machine-readable output
php bin/magento moogento:shipeasy:order-source --increment-id=100000123 --format=json
```

**Available output modes:**
- Table format (default): human-readable rows and columns
- JSON format: structured data for scripts or analytics tools
- `--breakdown` (order-profit): include per-order cost line items
- `--detail` (order-source): include UTM parameters and referrer host
- `--summary` (order-source): aggregated totals per source identifier

Both commands gracefully degrade if ProfitEasy is absent or disabled - they exit with a clear message rather than erroring.

---

## Troubleshooting

### Grid columns show blank or stale data

Columns like "# SKUs in order", "Revenue", and "Stock" depend on the background indexer.

- **Cause:** The Pre-Process: Order Data cron is disabled, or the initial index hasn't finished.
- **Check:** Go to Stores > Configuration > Moogento > ShipEasy > Pre-Process: Order Data and read the "Current progress" progress bar. Confirm **Enabled?** = **Yes** and that Magento's cron is running (`php bin/magento cron:run` from CLI to test).
- **Resolution:** Enable the indexer, confirm cron is healthy, and allow time for the initial index to complete. Click the **Manual** button to index the last 50 orders immediately without waiting for cron.

---

### ShipRule tag not appearing on orders

The correct rule exists in configuration but orders aren't getting the tag.

- **Cause:** The ShipRules engine is disabled, the order doesn't match any rule criteria, or the cron hasn't run yet.
- **Check:** Confirm **Enable ShipRules?** = **Yes** in ShipRules: Setup. Then run a dry-run: `php bin/magento moogento:shipeasy:shiprules --action=set-for-order --increment-id=XXXXXXX --dry-run` and read the output to see which rule (if any) matches.
- **Resolution:** Adjust the rule weight range, postcodes, or shipping method criteria to cover the order. Save config and allow up to 5 minutes for the next cron cycle.

---

### Mass action doesn't finish or only processes some orders

A bulk status-change or invoice action stops part-way through.

- **Cause:** A very large batch (20+ orders) can approach browser timeout limits; individual order-state conflicts also stop processing.
- **Check:** Enable logging in General and re-run the action. Review `var/log/moogento_shipeasy.log` for which order caused a halt and why.
- **Resolution:** For large batches, use the CLI instead: `php bin/magento moogento:shipeasy:order-status --status=processing --order-ids=100000001,100000002,...`. ShipEasy's batch processor handles 10 orders per internal cycle with timeout protection, so very large batches will complete but may take longer than expected in the browser.

---

### CSV import rows are skipped

Some rows in the uploaded file don't result in any order update.

- **Cause:** The Order ID column header in the file doesn't match what's configured in Process: CSV, or the row has no Order ID value, or the order number isn't found in Magento.
- **Check:** Open the import results page after the upload. Skipped rows are listed with a reason. Compare the header row of your CSV to the **CSV column title for: Order ID** setting. Rows with blank identifiers or unknown order numbers appear in the failed-rows list.
- **Resolution:** Update the config field to match the exact column header (case-sensitive), or rename the column in your carrier export. Every row must have a valid order increment ID that resolves to a Magento order.

---

### Carrier appears as "custom" after CSV import

Tracking is imported but the carrier is recorded as "custom" rather than the expected carrier name.

- **Cause:** The carrier name in the CSV didn't match any known Magento carrier title and no auto-detection pattern matched the tracking number format.
- **Check:** Enable **Carrier auto-detection: Log detection decisions?** (with the General log also on) and re-import. Check `var/log/moogento_shipeasy.log` for per-row decisions. Confirm the carrier's pattern row is enabled in the pattern table.
- **Resolution:** If the carrier is a US or AU carrier, its pattern may be disabled by default - enable it in Process: CSV > Carrier auto-detection: Pattern rules. For carriers not in the built-in list, add a custom pattern row. For marketplace integrations requiring an exact carrier code, use the **CSV column title for: Carrier Code** field (Pro plan) to pass the code directly and bypass title resolution.

---

### Duplicate tracking columns appear in the grid

Two tracking columns appear side by side - one labelled "sE: Tracking" and one "tE: Tracking".

- **Cause:** Both ShipEasy and TrackEasy are installed. This is expected behaviour. "sE: Tracking" shows pre-shipment tracking numbers managed by ShipEasy (editable inline). "tE: Tracking" shows post-shipment tracking data managed by TrackEasy. Only the ShipEasy column is visible by default; the TrackEasy column must be enabled deliberately in the column setup.
- **Resolution:** If you only need one column, disable the other in Stores > Configuration > Moogento > ShipEasy > Orders Page: Columns.

---

### Malware scanner flags Helper/Moo.php

- Cause: Your host's malware scanner (often Imunify360 on cPanel hosting) heuristically flags the encoded license-check files that ship inside every paid Moogento extension. The files are genuine and unchanged - the encoding protects the license check from tampering.
- Resolution: Add the files to the scanner's ignore list so the warnings stop, and restore any file the scanner already quarantined. Both steps, plus how to verify the files are byte-for-byte what we shipped, are covered in the [license file protection guide](../magento-guides/moogento-license-file-protection.md).

---

## Other pages in this guide

- [ShipEasy overview, installation and FAQs](/docs/shipeasy)
- [ShipEasy: Orders Grid Columns, ShipRules and Setup](/docs/shipeasy-setup-tasks)

<!-- docs-split: part-of="shipeasy" -->
