Subject level configuration

  • Subjects are responsible for importing and exporting artifacts; that is why events get added for both steps

  • Listeners are executed only before, after, or on the subject’s failure for the configured event

  • It is strongly recommended that, by default, the value for custom-configuration-dir is <magento-install-directory>/app/etc/configuration

  • As soon as a default configuration is copied, changed, extended, or modified and stored under the path specified in custom-configuration-dir, only this configuration takes effect and always overwrites the original configuration

  • The configuration handling is mainly based on the PHP framework Symfony, and therefore unexpected effects maid occur in different configuration constellations

    • Consequently, it is always recommended to test modified configurations concerning unwanted side effects

The configuration in a related snippet, e.g. <customer-installation-dir>/operations.json, may look like this:
{
  "operations": {
    "general": {
      "catalog_product_tier_price": {
        "add-update": {
          "plugins": {
            "subject": {
              "id": "import.plugin.subject",
              "subjects": [
                {
                  "id": "import_product_tier_price.subject.tier_price",
                  "listeners": [
                    {
                      "subject.import.success": [
                        "import_product.listener.register.sku.to.pk.mapping"
                      ]
                    }
                  ],
                  "observers": [ ... ]
                }
              ]
            }
          }
        }
      }
    }
  }
}