> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Magento 2 Product Attribute Subscriber

> Configuration-based replacement for the prototype product-attribute-subscriber in the Legacy Magento 2 Connector.

## Overview

The **Product Attribute Subscriber** is a configuration-based subscriber that listens for product attribute data from a Magento 2 source system. It replaces the deprecated prototype-based `magento-2-roduct-attribute-subscriber` previously used in the Legacy Magento 2 Connector.

<Info>
  This component has been migrated from a prototype-based implementation to a configuration-based setup as part of the Legacy Magento 2 Connector replacement project.
</Info>

## Prototype vs Configuration-based

<Warning>
  This is an important behavioral difference to understand before setting up this component.
</Warning>

|                  | Prototype-based                                               | Configuration-based                                                 |
| ---------------- | ------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Reusability**  | Can be reused across different flows by changing a few fields | Not reusable across different purposes or payloads                  |
| **Flexibility**  | One prototype can serve multiple use cases                    | (Not always) Each use case requires its own dedicated configuration |
| **How to reuse** | Modify fields directly                                        | Duplicate the configuration and adjust as needed                    |

If you need to handle a different payload structure or use case, you must **duplicate** this Subscriber and adjust the configuration accordingly. Do not modify an existing configuration as another Route already uses it.

## Type

**Subscriber**

## Purpose

This Subscriber listens to Incoming product attribute data from Magento 2 and triggers the appropriate Route for further processing. It is used in flows where product attribute information needs to be synced or transformed to a target system.

## Configuration

| Parameter       | Description                                                        | Required |
| --------------- | ------------------------------------------------------------------ | -------- |
| `store_code`    | The Magento 2 Store Code                                           | Yes      |
| `http-client`   | The HTTP Client Authentication method used to connect to Magento 2 | Yes      |
| `entity-schema` | The specific schema for the entity                                 | No       |

## Usage

1. Navigate to **Subscribers** in your Alumio environment.
2. Search for  **Magento 2 Product Attribute Subscriber**.
3. Configure the required parameters as described above.
4. Attach this Subscriber to the relevant route as the Incoming configuration.

## Deprecated VS New

An example of the deprecated one:

<Frame>
  <img src="https://mintcdn.com/alumio/i_0oO_KC23VzYTWk/images/image-376-legacy-m2.png?fit=max&auto=format&n=i_0oO_KC23VzYTWk&q=85&s=b58d5ca417bf5f95485374ed8ed7976e" alt="Image" width="943" height="284" data-path="images/image-376-legacy-m2.png" />
</Frame>

An example of the new configuration:

<Frame>
  <img src="https://mintcdn.com/alumio/i_0oO_KC23VzYTWk/images/image-378-legacy-m2.png?fit=max&auto=format&n=i_0oO_KC23VzYTWk&q=85&s=5bb209da2c7e0ecca372b8a9d4612afc" alt="Image" width="987" height="1445" data-path="images/image-378-legacy-m2.png" />
</Frame>

## Related Components

* ***Magento 2 Product Attributes Subscriber (Transformer - Mapping) (Transformer***[)](/transformers/base64-media-retriever) - to restructure the result.

## Notes

* Replaces the prototype: `magento-2-product-attribute-subscriber`
* Unlike the prototype-based implementation, this configuration-based Subscriber is **not reusable across different purposes or payloads**. If you need to handle a different payload structure or use case, you must duplicate this Subscriber and adjust the configuration accordingly.
* This Subscriber is typically used in product attribute sync flows.
