Akeneo PIM Events API

Akeneo PIM compatibilty
Versions:
Price: Free
Version:
0.4.0

Description

Functionality

How it works

  • Some event(s) happens in Akeneo PIM. This triggers a mechanism to send those event(s) to a consumer
  • Consumer receives a JSON payload which specifies event (the same data format like Akeneo PIM API uses)
  • Akeneo PIM Events API Bundle uses separate job to deliver events to consumer
  • The sending of events happens in real-time

Supported Event Types

  • Category
    • Create
    • Update
    • Delete
  • Attribute
    • Create
    • Update
    • Delete
  • Family
    • Create
    • Update
    • Delete
  • Product
    • Create
    • Update
    • Delete
  • Product Model
    • Create
    • Update
    • Delete

Example of delivered event

{

    "event": {

        "payload": {

            "code": "cameras",

            "labels": {

               "de_DE": "Cameras new name",

               "en_US": "Cameras",

               "fr_FR": "Caméras"

            },

           "parent": "master"

        },

       "event_type": "category_updated"

     }

 }

Event Structure

  • event_type: type of event which happened (see Supported Event Types)
  • payload: contains information which represents the event

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.

Roadmap

  • Possibility to select event types to subscribe
  • URL Verification Handshake
  • Support for Multiple endpoints
  • Rate limiting
  • Support for Akeneo Enterprise event types
  • Custom events
    • Import
    • Export
    • Mass edit
    • etc

Contact

 

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

Installation

Install via composer:

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

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:

default_events_api_app_uri: 'endpoint_url'

where endpoint_url is an endpoint url of consumer which accepts events from Akeneo PIM.

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

trilix_events_api:

    applications:

       default: uri: "%default_events_api_app_uri%"

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.