Giter Site home page Giter Site logo

akeneo-events-api-bundle's Introduction

Akeneo PIM Events API

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

Table of contents

Getting Started

Requirements

  • Akeneo PIM >= 3.0 (CE & EE)

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:

$bundles = [
    // ...
    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

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

Field Description
event_type Type of event which happened (see 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

License

This project is licensed under the MIT License - see the LICENSE file for details

akeneo-events-api-bundle's People

Contributors

psw1986 avatar gotgelf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.