> ## 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.

# Synchronization of Categories from Akeneo to Shopify

## **Fetching Categories from Akeneo**

* In Alumio, go to **"Integrations → Incoming → Akeneo - Fetch - Categories"**.
* To get all categories from the Akeneo system, use an Incoming **"Akeneo - Fetch - Categories"**.

<Frame>
  <img src="https://mintcdn.com/alumio/T6P8LMOsJ4ESrdHv/images/image-15.png?fit=max&auto=format&n=T6P8LMOsJ4ESrdHv&q=85&s=fe2e1553f4c6c7a2320b3ae0fc24c8eb" alt="Image" width="1085" height="603" data-path="images/image-15.png" />
</Frame>

This incoming will create a task inside Alumio with data structured as Alumio base categories. There some transformer inside this Incoming before processing the category.

1. Akeneo - Prepare convert category - Labels - To localizations.
2. Akeneo - Convert - Category - To Alumio Base.
3. Akeneo - Filter - Category.

**Akeneo - Prepare convert category - Labels - To localizations**

This transformer converts label data from Akeneo.

```json theme={null}
{
  "labels": {
    "de_DE": "E-commerce",
    "en_GB": "E-commerce",
    "en_US": "E-commerce",
    "es_ES": "E-commerce",
    "fr_FR": "E-commerce",
    "it_IT": "E-commerce",
    "nl_NL": "E-commerce",
    "pt_PT": "E-commerce"
  }
}
```

Since the current data structure is incompatible with Shopify, the transformer "**Akeneo - Convert - Category - To Alumio Base**" is used to convert it into a compatible format.

```json theme={null}
{
  "localizations": [
    {
      "localeCode": "de_DE",
      "translation": "E-commerce"
    },
    {
      "localeCode": "en_GB",
      "translation": "E-commerce"
    },
    {
      "localeCode": "en_US",
      "translation": "E-commerce"
    },
    ....
  ]
}
```

**Akeneo - Convert - Category - To Alumio Base.** This is the transformer that converts the entire category data into Alumio Base data.

```json theme={null}
{
  "code": "master",
  "parent": null,
  "localizations": [
    {
      "localeCode": "de_DE",
      "translation": "E-commerce"
    },
    {
      "localeCode": "en_GB",
      "translation": "E-commerce"
    },
    {
      "localeCode": "en_US",
      "translation": "E-commerce"
    },
    {
      "localeCode": "es_ES",
      "translation": "E-commerce"
    },
    ...
  ]
}
```

**Akeneo - Filter - Category**

* Use this transformer to filter previously created tasks into task categories to avoid duplication.

<Frame>
  <img src="https://mintcdn.com/alumio/T6P8LMOsJ4ESrdHv/images/image-22.png?fit=max&auto=format&n=T6P8LMOsJ4ESrdHv&q=85&s=c1508cfe174a24bf34fd3acb61d90708" alt="Image" width="2032" height="676" data-path="images/image-22.png" />
</Frame>

* To recreate a task, you should remove the entity from the storage **"Akeneo - Filter - Categories"**.

## **Sending Categories to Shopify**

In Alumio, go to **"Integrations → Route → Synchronize Categories - From Akeneo into Shopify Collections"**. The task in the Incoming **"Akeneo - Fetch - Categories"** will be processed in the Route **"Synchronize Categories - From Akeneo into Shopify Collections"** and sent using the Outgoing **"Shopify - Send - Collection"**.

Sending in the Outgoing will be processed with the following transformers:

1. Shopify - Convert - Collection from Alumio Base Category.
2. Shopify - Check and send - Collection.

**Shopify - Convert - Collection from Alumio Base Category**

This transformer converts Alumio category data inside the task into Shopify category data.

**Shopify - Check and send - Collection**

* This transformer will check current Shopify collections from the previous iteration of this transformer to determine whether we need to create or update the category in the Spryker System.
* We use GraphQL to connect with Shopify.

<Frame>
  <img src="https://mintcdn.com/alumio/9oF9sZ-pTcqFfHQJ/images/image-89.png?fit=max&auto=format&n=9oF9sZ-pTcqFfHQJ&q=85&s=93cc2940f66d86586758cc9450fe9032" alt="Image" width="1014" height="839" data-path="images/image-89.png" />
</Frame>

* The data Shopify returned when created will be saved in storage for future update collection.

<Frame>
  <img src="https://mintcdn.com/alumio/9oF9sZ-pTcqFfHQJ/images/image-90.png?fit=max&auto=format&n=9oF9sZ-pTcqFfHQJ&q=85&s=665ed17e64956feb286d9cb0bea87bdb" alt="Image" width="1029" height="898" data-path="images/image-90.png" />
</Frame>

## **Automatic Categories Synchronization Setup**

* Go to **"Integrations → Schedulers → Akeneo - Fetch Categories"**.

<Frame>
  <img src="https://mintcdn.com/alumio/T6P8LMOsJ4ESrdHv/images/image-27.png?fit=max&auto=format&n=T6P8LMOsJ4ESrdHv&q=85&s=9f47cc5ff678913a42451020badf8a3b" alt="Image" width="1105" height="841" data-path="images/image-27.png" />
</Frame>

* Set a schedule expression and enable the configuration.
* Go to **"Integrations → Schedulers → Shopify - Send - Collection"**.
  <Frame>
    <img src="https://mintcdn.com/alumio/9oF9sZ-pTcqFfHQJ/images/image-91.png?fit=max&auto=format&n=9oF9sZ-pTcqFfHQJ&q=85&s=d50ea535c0e997b76c4c760fadbc3458" alt="Image" width="1088" height="893" data-path="images/image-91.png" />
  </Frame>
* Set a schedule expression and enable the configuration.
