Introduction Last updated: 2020-01-01

The Akeneo Events API Bundle is a smooth and easy way to build integrations that respond to activities in Akeneo PIM. All you need is bundle itself and an endpoint where to send Akeneo PIM events.

Some event(s) happens in Akeneo PIM. This triggers a mechanism to send those event(s) as HTTP POST request to your Request URL. Each request contains event, with correspondent event type presented in JSON format. Events API sends one request per one event, and sending of requests happens in real-time.

Installation

Requirements

Akeneo PIM >= 3.0 (CE & EE)

Install via composer

Bundle Registration

To enable the bundle add to the app/AppKernel.php file in the registerProjectBundles() method:

Endpoint Configuration

Add the following line at the end of app/config/parameters.yml:

where your_request_url is a target location where all the events (see event types below) will be delivered.

Add the following lines at the end of app/config/config.yml:

Job

Run the following command to create a job to deliver events to consumer:

Clear cache

Clear cache:

Make sure Akeneo job queue daemon is running. For more information read Setting up the job queue daemon.

Functionality

How it works

Some event(s) happens in Akeneo PIM. This triggers a mechanism to send those event(s) as HTTP POST request to your Request URL. Each request contains event, with correspondent event type presented in JSON format (see example below).

Events API sends one request per one event, and sending of requests happens in real-time.

Event types delivered over Events API

Event Description
category_created New category was created
category_updated Existing category was updated
category_deleted Existing category was deleted
attribute_created New attribute was created
attribute_updated Existing attribute was updated
attribute_deleted Existing attribute was deleted
family_created New family was created
family_updated Existing family was updated
family_deleted Existing family was deleted
product_created New product was created
product_updated Existing product was updated
product_deleted Existing product was deleted
product_model_created New product model was created
product_model_updated Existing product model was updated
product_model_deleted Existing product model was deleted

Example of category_updated event

Event Type Structure

Field Type Description
event_type String Type of event which happened
payload Object Contains information which represents the event
event_time Integer Timestamp in seconds when the event was created

Attention

If Akeneo family contains variants, then during family update (or it's variants as well), Akeneo will re-save related products. It will trigger sending product_updated events.

Intergrations

Since the release of the Akeneo PIM Events API Bundle building integrations that respond to activities in the Akeneo PIM system has become a lot easier. Instead of sending notifications about events to a custom endpoint they can be also sent to services you already use, such as your email or task organization system. This can be done by interconnecting the Akeneo PIM Events API Bundle with the web-based service IFTTT (If This Then That) which is a great and sophisticated instrument that integrates plenty of internet services.

In the following article we will provide you with a step by step manual that guides you through the implementation of IFTTT for Akeneo. To demonstrate its usage together with Akeneo two example implementations are given, which are:

  • Receiving email notifications for Akeneo events
  • Automatically create notifications based on Akeneo events within the Trello task management service.

Roamap

Coming Soon