Overview
This node integrates with Shopware 6, a popular e-commerce platform, to perform various data operations. Specifically, the "Upsert Category" operation allows users to create or update category entities within their Shopware store. This is useful for synchronizing product categories from external systems or automating category management workflows.
Common scenarios include:
- Automatically updating category information based on changes in an external database.
- Creating new categories during product import processes.
- Keeping category structures consistent across multiple sales channels.
Properties
| Name | Meaning |
|---|---|
| Entity | The type of entity to operate on. Options: category, customer, order, product. |
Note: Although the provided properties JSON only lists the "Entity" property, the node dynamically loads additional properties and operations based on the selected entity and operation. For the "Upsert Category" operation, relevant input fields would be loaded dynamically but are not explicitly listed here.
Output
The node outputs JSON data representing the result of the upsert operation on the category entity. This typically includes details of the created or updated category such as its ID, name, and other metadata returned by the Shopware API.
If binary data were involved (e.g., images), it would be included in the output's binary field, but this is not indicated in the provided code or properties.
Dependencies
- Requires an active connection to a Shopware 6 instance via an API key credential.
- The node dynamically imports operation handlers from local files under the
operationsdirectory. - Uses the
globandpathNode.js modules internally to discover available operations and properties.
Troubleshooting
- Missing Operation Parameter: If no operation is selected, the node returns an empty array without performing any action. Ensure the "operation" parameter is set.
- Dynamic Import Failures: Since operation handlers are loaded dynamically based on the operation name, missing or misnamed files in the
operationsfolder can cause runtime errors. - API Authentication Errors: Invalid or missing API credentials will prevent successful communication with Shopware.
- Unsupported Entity or Operation: Selecting an unsupported combination may lead to no matching operation handler found.
To resolve these issues:
- Verify that the correct operation and entity are selected.
- Confirm that the required operation files exist in the expected directory structure.
- Check API credentials and permissions.
- Review error messages for hints about missing files or invalid parameters.