Skip to main content

Fetching Brands from Akeneo

  • In Alumio, go to “Integrations → Incoming → Akeneo - Fetch - Brands”. Use an Incoming “Akeneo - Fetch - Brands” to get data from the Akeneo Server.
Image
This incoming creates a task inside Alumio with data structured as Alumio base brands. There are transformers inside this Incoming before processing the brand:
  1. Akeneo - Prepare convert - Brand labels - To localizations.
  2. Akeneo - Convert - Brand - To Alumio Base.
  3. Akeneo - Filter previous - Brand.
Akeneo - Prepare convert - Brand labels - To localizations This transformer converts label data from Akeneo.
{
  "label": [
    {
      "locale": "ja_JP",
      "channel": null,
      "data": "3M"
    },
    {
      "locale": "fr_FR",
      "channel": null,
      "data": "3M"
    },
    {
      "locale": "en_US",
      "channel": null,
      "data": "3M"
    },
    {
      "locale": "en_GB",
      "channel": null,
      "data": "3M"
    },
    {
      "locale": "de_DE",
      "channel": null,
      "data": "3M"
    }
  ]
}
Since the current data structure is incompatible with Centra, you need to convert it to a more workable one.
{
  "localizations": [
    {
      "localeCode": "de_DE",
      "customAttributes": {
	   		"label": "Xiaomi"
	   }
    },
    ....
  ]
}
You can determine the entity records you want to send to the Centra brand by filling in the Environment Variable AKENEO_REFERENCE_ENTITY_BRANDS_CODE. Akeneo - Convert - Brand - To Alumio Base. This transformer converts the entire category data into Alumio Base data.
{
  "code": "xiaomi",
  "localizations": [
    {
      "localeCode": "en_US",
      "customAttributes": {
        "label": "Xiaomi"
      }
    },
    {
      "showinstore": {
        "channel": "b2b"
      }
    }
  ],
  "customAttributes": {
    "showinstore": "no"
  }
}
Akeneo - Filter previous - Brand
  • Use this transformer to filter previously created tasks into task Brands to avoid duplication.
    Image
    • To recreate a task, remove the entity from the “Akeneo - Filter previous - Brands” storage.

Sending Brands to Centra

Tasks generated by the “Akeneo - Fetch - Brands” Incoming configuration are processed via the “Synchronize Brands - From Akeneo to Centra” Route and delivered through the “Centra - Send - Brand” Outgoing configuration. This Outgoing will transform the Alumio Base Brands into Centra one and check to create or to update the brand with the data from this outgoing’s previous iteration. Sending in the Outgoing will be processed by these transformers:
  1. Centra - Add global variables
  2. Centra - Check and send - Brand.
Centra - Add global variables
Adding all the data that you want to add to Centra.
Centra - Check and send - Brand This transformer checks the current Centra ID from the previous iteration of this transformer to determine whether you need to create or update the brand in the Centra System. An example of a creation payload:
{
  "query": "mutation updateExistingBrand($id: Int, $input: BrandUpdateInput!)",
  "variables": {
    "id": 255,
    "input": {
      "name": "Xiaomi"
    }
  }
}

Automatic Brands Synchronization Setup

  • Go to “Integrations → Schedulers → Akeneo - Fetch Brands”.
    Image
  • Set a schedule expression and enable the configuration.
  • Go to “Integrations → Schedulers → Centra - Send - Brands”.
    Image
  • Set a schedule expression and enable the configuration.