Akeneo PIM Events API

Akeneo PIM compatibilty
Versions:
Price: Free
Version:
0.5.0

Description

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.

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

Event types delivered over Events API

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_created (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": "category_updated",

  "payload": {

    "code": "cameras",

    "labels": {

      "de_DE": "Cameras",

      "en_US": "Cameras new name",

      "fr_FR": "Caméras"

    },

    "parent": "master"

  },

  "event_time": 1565021907

}

Event Type Structure

  • 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 Products Update events.

Contact

 

This Akeneo extension is open source, you can find the repository on GitHub

Release notes

0.5.0

  • Transport approach, to differentiate consumer which accepts events data in a specific format
  • IFTTT Transport, to provide integration with IFTTT Webhooks applet

0.4.0 Initial version

Installation

Install via composer:

php composer.phar require trilix/akeneo-events-api-bundle:^0.5.0

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

...

    protected function registerProjectBundles()

    {

        return [

             new \Trilix\EventsApiBundle\TrilixEventsApiBundle()

       ];

   }

...

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

events_api_request_url: 'your_request_url'

where your_request_url is a target location where all the events will be delivered.

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

trilix_events_api:

    transport:

        factory: "pim_events_api.transport_factory.http"

        options:

            request_url: "%events_api_request_url%"

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

bin/console akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer

❗️One daemon or several daemon processes have to be started to execute the jobs. Please follow the documentation Setting up the job queue daemon if it’s not the case.

List your extension on Akeneo Marketplace

Learn about the best practices to enrich Akeneo ecosystem.

Share your contributions with Akeneo Community any way you want.

Need help? Please read our
submission requirements and manual.