About the Akeneo category

Put topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

System documentation: REST API reference | Akeneo APIs

Connector package documentation

​​Table of Contents

  • 1. Setting up the Akeneo HTTP Client
    • 1.1 Steps
  • 2. Subscribing to entities from Akeneo
    • 2.1 Steps
    • 2.2 General concept
  • 3. Publishing entities to Akeneo
    • 3.1 Steps
    • 3.2 General concept

1. Setting up the Akeneo HTTP Client

1.1 Steps

  1. In the Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select the Akeneo HTTP Client as the prototype of the HTTP Client.
  2. Fill in the Base URI, Client ID, Client Secret, Username, Password, and Authentication Method
    Note: We recommend using Body as an Authentication Method.
  3. Press “Grant Access to Akeneo”.
  4. The Key will show up and you can save the Client for use.

2. Subscribing to entities from Akeneo

2.1 Steps

  1. Go to Connections → Incoming, create a new incoming configuration and select the Akeneo Subscriber.
  2. Select the entity you want to subscribe to from Akeneo.
  3. (Optional) Add any request parameters needed to subscribe to the entity.
  4. You can also add a transformer to modify the request parameters into something you need.
  5. Select the Akeneo HTTP Client to use.
  6. You can add a pagination feature to allow Alumio to fetch a paginated entity.

2.2 General Concept

We follow Akeneo documentation for building this connector, so you can easily use the connector based on the Akeneo API Reference.

Entity

This is the entity you want to subscribe to from Akeneo. Please refer to the entities in Management APIs from the Akeneo API Reference page.

Request Parameters

These are the parameters you can provide to get the needed Entity based on the Akeneo API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing the “All Parcels” Entity.

  • The property path is the path parameter of the URL. For example, the {id}.
  • The property query is a defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0

This is why you need to define the code property inside the path property in the Request Parameters field. The properties inside query parameters will be parsed as query parameters. The final URL will be like this /api/rest/v1/products/123.

Input Transformer

Any transformers set here will be executed after the Request Parameters are loaded. So, you can basically add any transformer to provide and manipulate the request parameters into anything you need, either as path parameters and/or as query parameters of an Entity.

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Akeneo.

3. Publishing entities to Akeneo

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration, and select the Akeneo Publisher as the Publisher.
  2. Select the action that you want the Publisher to do with the data.
  3. Select the Akeneo entity where you want the data to be published.
  4. Optionally, you can add any query parameters to the request.
  5. You can also add any transformers to modify the data into anything you need before submitting it to Akeneo.
  6. Select the HTTP Client to use.

3.2 General Concept

Like the Subscriber, the Publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.

Action

Currently, we support Create (HTTP POST method), Update (HTTP PUT method), and Delete (HTTP DELETE method).

Entity

We support publishing to most Akeneo endpoints, but not with publishing binary files for now. Please refer to the entities in Management APIs from the Akeneo API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For example, we want to delete a Product. Please select “Delete” as the action and “Delete a Product” as the entity of the publisher.


image

As you can see, we need to add code in the Path, so please make sure we add code inside the path key in the data. For example:

image

Alumio will send an API request to Akeneo with URL /api/rest/v1/products/123

Another example is when we want to update several products at once. Please select “Patch” as the Action and “Update/create Several Products” as the entity of the publisher.

Based on the documentation, we can see that the endpoint requires the product data as the body. In order to achieve this, we should provide the product data in our data in the key payload within Alumio.

Akeneo will process the request and return a response (please enable logging in HTTP Client to make this visible).

You may look that in the documentation, the endpoint requires us to provide NDJSON format to send to Akeneo.

Rest assured, our Akeneo connector has the capability to automatically change the JSON input to NDJSON format, based on the endpoint’s documentation at Akeneo.

  • The property path is the path parameter of the URL. For example, the {id}.
  • The property query is a defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0
  • The property payload is the data contained within a request.

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Akeneo.