Skip to main content

Category Export Profile

The Category Export Profile synchronizes category structures from Magento to PlentyONE, creating and updating PlentyONE categories based on your Magento category tree.

Overview

Profile Type ID: plenty_category_export Direction: Magento → PlentyONE Purpose: Export category hierarchy, names, descriptions, and attributes to PlentyONE

What Gets Exported

  • Category structure and hierarchy
  • Category names (all store views/languages)
  • Category descriptions
  • Category attributes mapped to PlentyONE properties
  • Parent-child relationships
  • Category status (active/inactive)

Use Cases

  • Initial PlentyONE Setup: Export Magento categories to populate PlentyONE
  • Category Updates: Sync Magento category changes to PlentyONE
  • Multi-Language Export: Export translated category data for all locales
  • Automated Sync: Automatically export new categories as they're created

Key Differences from Import

The Category Export profile has the same configuration sections as Category Import, with one important addition:

Event Configuration

Purpose: Automatically trigger category exports when categories are created or deleted in Magento.

Add New Categories to Export Queue

Field: new_entity_observer Type: Checkbox Default: No Scope: Global

Automatically adds newly created Magento categories to the export queue.

How It Works:

  1. Admin creates a new category in Magento
  2. Observer detects the new category
  3. Category is added to export queue
  4. Next profile execution exports the category to PlentyONE

When to Enable:

  • ✅ You create categories in Magento frequently
  • ✅ You want real-time category synchronization
  • ✅ You have scheduled exports running regularly

When to Disable:

  • ❌ You manually control what gets exported
  • ❌ You only export during specific maintenance windows
  • ❌ You prefer batch exports over automatic ones

Delete Categories Externally

Field: deleted_entity_observer Type: Checkbox Default: No Scope: Global

Automatically removes deleted Magento categories from PlentyONE.

How It Works:

  1. Admin deletes a category in Magento
  2. Observer detects the deletion
  3. Corresponding category is deleted in PlentyONE
  4. Deletion happens immediately (not queued)
Destructive Action

Enabling this option will permanently delete categories in PlentyONE when deleted in Magento. This cannot be undone. Use with caution.

When to Enable:

  • ✅ Magento is the master source for categories
  • ✅ You want automatic cleanup of obsolete categories
  • ✅ You understand the deletion is permanent

When to Disable:

  • ❌ PlentyONE is the master source
  • ❌ You want to manually control deletions
  • ❌ Categories might be shared across systems

Configuration Summary

All other configuration sections match the Category Import profile:

  1. Client Configuration - Same as import
  2. Schedule Configuration - Same as import
  3. HTTP API Configuration - Same as import
  4. Store Configuration - Same as import
  5. Category Configuration - Same as import (but export direction)
  6. Event Configuration - Export-specific automatic triggers
  7. Log Configuration - Same as import

For detailed configuration of these sections, see the Category Import Profile documentation.

Configuration Workflow

Initial Setup for Export

  1. Create Export Profile

    • Navigate to SoftCommerce → PlentyONE → Profiles
    • Click Add New Profile
    • Select Category Export as profile type
  2. Configure Client and Store Mapping

    • Select PlentyONE client
    • Configure store mappings for multi-language export
  3. Configure Category Mapping

    • Map Magento root categories to PlentyONE
    • Configure attribute mappings (Magento → PlentyONE direction)
  4. Configure Event Triggers (optional)

    • Enable "Add New Categories to Export Queue" for automatic export
    • Enable "Delete Categories Externally" for automatic deletion (use with caution)
  5. Test Export

    • Save profile
    • Run manual execution: Actions → Execute Now
    • Verify categories in PlentyONE
    • Check execution history

Event-Driven Export Example

Scenario: Automatically export new categories

Configuration:

Event Configuration:
✓ Add New Categories to Export Queue: Yes
✓ Delete Categories Externally: No

Schedule Configuration:
✓ Enable Schedule: Yes
✓ Schedule: Every 15 minutes
✓ Batch Size: 50

Workflow:

  1. Marketing team creates new category "Summer Collection" in Magento
  2. Observer automatically adds category to export queue
  3. Within 15 minutes, scheduled export runs
  4. "Summer Collection" category is created in PlentyONE with all attributes

CLI Commands

Execute Category Export

# Execute category export profile manually
bin/magento softcommerce:plenty:category:export --profile-id=2

# Export specific categories by ID
bin/magento softcommerce:plenty:category:export --profile-id=2 --entity-ids=1,2,3

# Force re-export all categories
bin/magento softcommerce:plenty:category:export --profile-id=2 --force

Manage Export Queue

# View categories in export queue
bin/magento softcommerce:plenty:category:queue --list

# Add category to export queue manually
bin/magento softcommerce:plenty:category:queue --add --entity-id=5

# Clear export queue
bin/magento softcommerce:plenty:category:queue --clear

Troubleshooting

Categories Not Exporting to PlentyONE

Problem: Categories created in Magento don't appear in PlentyONE

Solutions:

  1. Check Event Configuration

    • Verify "Add New Categories to Export Queue" is enabled
    • Check if scheduled export is running
  2. Review Export Queue

    bin/magento softcommerce:plenty:category:queue --list
    • Verify categories are in queue
    • Check for queue processing errors
  3. Check Root Category Mapping

    • Ensure Magento categories are under mapped roots
    • Verify PlentyONE root category exists
  4. Review API Response

    • Enable response logging
    • Check var/log/softcommerce/plenty/category.log for API errors

Categories Deleted Unexpectedly

Problem: Categories disappear from PlentyONE without intention

Solutions:

  1. Check Delete Observer

    • Verify "Delete Categories Externally" setting
    • Disable if unwanted deletions occur
  2. Review Deletion History

    • Check Magento admin logs for category deletions
    • Review PlentyONE logs
  3. Restore from Backup

    • Restore deleted categories from PlentyONE backup
    • Adjust profile configuration to prevent future deletions

Duplicate Categories in PlentyONE

Problem: Same category appears multiple times in PlentyONE

Solutions:

  1. Check API Behaviour

    • Set to "Append" (not "Replace")
    • Review execution history for duplicate runs
  2. Clear and Re-export

    • Delete duplicates in PlentyONE
    • Run fresh export with correct settings

Best Practices

Event-Driven Exports

  1. Enable New Entity Observer: For automatic category synchronization
  2. Careful with Delete Observer: Only enable if Magento is master
  3. Monitor Queue: Regularly check export queue for stuck items
  4. Test First: Test automatic exports in staging before production

Manual vs Automatic

  1. Automatic (Event-Driven):

    • ✅ Real-time synchronization
    • ✅ Less manual work
    • ❌ Less control over what/when
  2. Manual (Scheduled Only):

    • ✅ Full control over execution
    • ✅ Batch processing efficiency
    • ❌ Delayed synchronization
    • ❌ Requires manual queue management

Multi-Language Exports

  1. Store View Mapping: Configure mapping for each language
  2. Attribute Translation: Ensure category names are translated in each store view
  3. Locale Consistency: Match Magento store locales to PlentyONE locales
  4. Test Per Language: Verify exports for each language separately