Event Platform for SAP Commerce Cloud

Summary

What is the Akeneo Event Platform?

Traditionally, synchronization between a PIM and an e-commerce platform relies on "Pull" technology: your SAP system regularly asks Akeneo, "Is there anything new?" (Scheduled Batch/Delta).

The Akeneo Event Platform introduces "Push" technology. Instead of waiting for a scheduled task, Akeneo becomes proactive. As soon as a specific change occurs in the PIM, Akeneo sends an instantaneous notification to SAP.

See more information on the Akeneo Event Platform.

 

Why is it essential for SAP Commerce Cloud?

While most product data between Akeneo PIM and SAP Commerce Cloud is synchronized via standard flows (Full or Delta loads), the Event Platform provides a vital layer of real-time responsiveness.

In a standard architecture, "Delta" synchronization only processes updated products. If a product is deleted in Akeneo, it is simply no longer part of the flow sent to SAP. Consequently, SAP receives no instruction to remove that product from its catalog, creating a discrepancy between your PIM and your online store.

The Event Platform solves this issue by sending an instantaneous notification to SAP as soon as a deletion occurs in Akeneo.

Authorization Requirements

Before deploying artifacts, you must authorize your API Connection to interact with the Event Platform within the Akeneo PIM settings.

  1. In Akeneo, navigate to Connect > Connections.
  2. Select the connection used for your SAP integration
  3. Ensure the "Event Platform" capability (checkbox) is enabled

If this box is not checked, the connection will not have the necessary permissions. While the rest of the integration may work, the G.2 Event – Create Subscription To Event Platform Integration Flow will fail with a 403 Forbidden error when attempting to link Akeneo to your SAP environment.

For detailed steps on how to assign these permissions, please refer to the official Akeneo API documentation.

 

 

The Event Artifacts (G.1 – G.4)

To enable these real-time capabilities, four artifacts must be configured within your SAP Cloud Integration (CPI) environment:

1. G.1 Event – Create Subscriber To Akeneo Event Platform

  • Role: Officially registers your SAP instance as an authorized "receiver" with Akeneo.
  • Note: This step generates a unique subscriberId, which is essential for securing the connection.

2. G.2 Event – Create Subscription To Event Platform

  • Role: Defines the communication rules. Here, you instruct Akeneo that you specifically want to be notified of product deletion events.

3. G.3 Event – Akeneo PIM Event Listener

  • Role: The HTTPS entry point. It listens for Akeneo notifications 24/7.
  • How it works: As soon as a product is deleted, it receives the alert and places it in a secure queue (JMS) to ensure guaranteed processing without data loss.

4. G.4 Event – Akeneo PIM Event Consumer

  • Role: The executor. It retrieves the message, verifies its authenticity (via HMAC signature), and instructs SAP Commerce Cloud to perform the permanent removal (Hard Delete) of the relevant product.

 

Key Comparison: Batch vs. Event Platform

Scenario Standard Synchronization (Batch) Event Platform (G.1 to G.4)
Price Update Processed during the next export (Full or Delta) Not currently handled by this flow
Product Deletion Unable to process (the product disappears from the flow) Immediate deletion in SAP Commerce Cloud
Speed Depends on job frequency (e.g., every 30 min) Real-time (within seconds)

 

Scope and Limitations

While the Event Platform is a powerful engine, the SAP Commerce Cloud Accelerator is pre-configured to handle specific high-priority scenarios. Understanding this scope is key to managing your real-time synchronization strategy.

1. Supported Out-of-the-Box Events

Currently, the Accelerator is optimized to handle the Hard Delete action for the following entities:

  • Products: Instant removal from SAP Commerce Cloud when deleted in Akeneo.
  • Product Models: Automated cleanup of parent structures.
  • Categories: Immediate synchronization of your catalog hierarchy when a category is removed.

2. Why focus on Deletions?

The Event Platform is used specifically for deletions because they only require a unique identifier (like the product code) to be executed.

Standard updates (creation/modification) for complex data (such as media, attributes, or reference entities) often require composite keys in SAP Commerce Cloud (a combination of several values). Since the current Event Platform payloads may not contain all the contextual data needed to reconstruct these specific keys, these actions remain best handled by the standard Full or Delta synchronization jobs, which have access to the complete PIM context.

3. Using the Accelerator as a Blueprint

The G.4 Consumer is designed as a modular template. While it can theoretically be extended by developers to handle other events, please note:

  • Technical Complexity: Adding "Update" or "Create" events requires advanced knowledge of how SAP CC keys are structured. You must ensure the Event Platform payload provides enough metadata to identify the correct record in SAP.
  • Consistency Rule: If you extend the G.4 logic to handle new events, you must also update the PIM_SubscribedEvent list in the G.2 Event – Create Subscription To Event Platform artifact.

 

G.1 Event – Create Subscriber To Akeneo Event Platform

The first step in enabling real-time synchronization is to introduce your SAP system to Akeneo.

The G.1 Event – Create Subscriber To Akeneo Event Platform artifact automates this introduction. By running this Integration Flow, you create a "Subscriber" identity in Akeneo that serves as the official destination for all future event notifications.

 


Understanding the Subscriber Role

Think of the Subscriber as your SAP system’s "ID Card" within Akeneo’s Event Platform.

Once created, this object holds:

  • A Unique subscriberId: The most important piece of information, required to set up any future subscriptions.
  • Connection Details: It tells Akeneo which security credentials to use when sending data to your SAP environment.

Important: You only need to run this Integration Flow once during your initial setup to generate your ID

 

Configurable Parameters

Before deploying the Integration Flow, ensure the following parameters are correctly filled in your SAP CPI configuration

Parameters Description
EVENT_Subscriber_Email Email address representing the subscriber
EVENT_Subscriber_Name Name identifying the subscriber
PIM_Address Base URL of the Akeneo PIM instance
PIM_Credential_Name_Basic Secure store alias for Basic OAuth token credentials
PIM_Credential_Name_OAuth2 Secure store alias for the OAuth2 Client ID, used in header x-pim-client-id

How to Retrieve the subscriberId

After deploying and running the Integration Flow, you must manually retrieve the generated ID to use it in the next step (G.2).

  1. Navigate to the CPI Monitor
  2. Go to Message Processing Log and locate your execution
  3. Open the Logs and look for the Attachments tab
  4. Open the attachment named Subscriber
  5. Locate and copy the value for "subscriberId": “xxxx”

Success! You now have your Subscriber ID.
Keep it handy; you will need to paste it into the configuration of the next artifact: G.2 – Create Subscription To Event Platform.


Technical Workflow 

The G.1 Integration Flow handles the initial registration of your SAP system within the Akeneo ecosystem through these steps:

  1. Authentication: The Integration Flow connects to Akeneo using OAuth2 Client Credentials to establish a secure session
  2. Payload Building: It automatically formats your configuration (Subscriber Name and Email) into a valid JSON request
  3. Identity Creation: It sends a POST request to the Akeneo /api/v1/subscribers endpoint to register your SAP instance
  4. ID Generation & Logging: Akeneo generates a unique subscriberId. The Integration Flow captures this ID and stores it in the execution logs (attachments) so you can use it for the next step (G.2)
 
 

G.2 Event – Create Subscription To Event Platform

Now that your SAP system has an identity (the Subscriber ID from G.1), you need to tell Akeneo what data you want to receive and where to send it.

The G.2 Event – Create Subscription To Event Platform artifact allows you to manage this relationship. It acts as the bridge that activates the real-time flow for specific events, such as product deletions.


Understanding the Subscription Role

If the Subscriber is your "ID Card," the Subscription is your "Delivery Order." 

It defines three critical elements:

  1. The Topics: Which specific events should trigger a notification (e.g., product_deleted)
  2. The Destination (Callback URL): The specific digital address where Akeneo will "push" the information
  3. The Rules (Filters): Specific criteria to ensure you only receive the data you actually need

Configurable Parameters

This Integration Flow is versatile: it can Create, Update, or Delete a subscription.

Parameters Description
PIM_Address Base URL of the Event Platform (PIM) API
PIM_callbackUrl The callback endpoint (your receiver) that the Event Platform will call when events occur
PIM_Credential_Name_Basic Name of the Basic Authentication credential stored in Security Material (CPI)
PIM_Credential_Name_OAuth2 Name of the OAuth2 credential stored in Security Material (CPI)
PIM_create Create new subscription via POST (yes/no)
PIM_delete Delete an existing subscription via DELETE (yes/no)
PIM_update Update subscription via PATCH (yes/no)
PIM_Filter Event filtering expression to limit which events get delivered
PIM_SubscribedEvent One or more event topic names from the Event Platform that the system should subscribe to
PIM_SubscriberId Unique identifier of the subscriber (your system/app id)
PIM_SubscriptionId Unique identifier of the previously created subscription (used to update/delete existing subscription)

Important: You must set only one action (PIM_create, PIM_update, or PIM_delete) to "yes" per execution.

 

The Callback URL: Your System’s "Front Door"

The Callback URL is one of the most important settings in your integration. It is the public HTTP endpoint on your SAP environment that "listens" for Akeneo.

Why is it critical?

  • Real-time Delivery: When a change happens in Akeneo, it immediately sends a "POST" request to this URL
  • Verification: When you create a subscription, Akeneo pings this URL to ensure the connection is live and secure
  • Enterprise Security: For production environments, we recommend exposing this URL through SAP API Management (APIM) to add an extra layer of protection between the public internet and your CPI

Technical Workflow 

The G.2 iFlow automates your subscription management with the Akeneo API through these key steps:

  1. Authentication & Handshake: The iFlow connects to Akeneo using your secure OAuth2 credentials to obtain a valid access token
  2. Callback Validation: Akeneo performs a real-time check to ensure your destination URL (the G.3 Listener) is active and reachable
  3. Subscription Activation: Once validated, Akeneo activates the subscription for the specific event types you selected (e.g., product deletions)
  4. Logging & Confirmation: The iFlow logs the resulting subscriptionId in the SAP CPI message logs. You will need this ID if you wish to update or delete the subscription later.
 
 

G.3 Event – Akeneo PIM Event Listener

The G.3 Event – Akeneo PIM Event Listener is the specialized HTTPS endpoint (webhook) that sits on your SAP environment.

Its sole purpose is to "listen" for incoming notifications from Akeneo. Think of it as a high-speed reception desk: it receives the package, signs for it immediately so the delivery driver (Akeneo) can leave, and places the package in a secure locker (JMS Queue) for processing.


Understanding the Listener’s Role

This artifact is designed for speed and reliability.

It does not process the data itself; instead, it performs three vital functions:

  1. Instant Reception: It exposes the endpoint /akeneo/updateDelete. Every time a change occurs in Akeneo, this endpoint is triggered.
  2. Reliable Handover: It immediately moves the data into a JMS Queue (akeneoPIMtoCCEvent). This "decouples" the two systems, ensuring that even if SAP Commerce Cloud is busy, the notification from Akeneo is safely stored and never lost.
  3. Fast Response: It sends a "200 OK" signal back to Akeneo instantly. This tells Akeneo the delivery was successful, preventing unnecessary retries.

Securing your Connection: The API Proxy

Because this endpoint is exposed to the internet, we strongly recommend wrapping it in an API Proxy via SAP API Management. This adds an enterprise-grade security layer between Akeneo and your internal CPI.

1. Create API Provider: Point your target backend to the CPI runtime

2. Create API Proxy: Import the listener endpoint /akeneo/updateDelete

3. Expose the URL: Use this new Proxy URL as the Callback URL when you configure artifact G.2

4. Configure Security Policies: We recommend adding the following "PreFlow" policies to protect your system:

  • Spike Arrest: Prevents your system from being overwhelmed by too many requests at once
  • IP Whitelisting: Only allow requests coming from official Akeneo IP addresses (available on the Akeneo website)
  • Quota & XML Protection: Ensures the volume of data remains within expected limits and protects against malicious payloads

Technical Workflow 

The G.3 iFlow follows a streamlined "Receive and Delegate" logic to ensure your PIM remains fast while guaranteeing data delivery:

  1. HTTP Receiver: The iFlow acts as a dedicated webhook endpoint, waiting for Akeneo to "push" event notifications.
  2. JMS Dispatch: The received payload is instantly forwarded to a secure JMS queue (akeneoPIMtoCCEvent). This ensures the message is saved even if the rest of the system is busy.
  3. Fast Acknowledgment: The iFlow immediately returns an HTTP 200 (OK) to Akeneo. This confirms successful reception and stops Akeneo from retrying the delivery, keeping the communication loop short and efficient.
 
 

G.4 Event – Akeneo PIM Event Consumer

The G.4 Event – Akeneo PIM Event Consumer is the specialized "worker" of the Event Platform. While the Listener (G.3) is responsible for receiving the data, the Consumer is responsible for acting on it. It retrieves messages from the secure JMS queue, verifies they are authentic, and executes the permanent removal (Hard Delete) of entities within SAP Commerce Cloud.


Understanding the Consumer’s Role

This artifact is strictly dedicated to real-time deletions. It ensures that when a product or category is removed from Akeneo, it doesn't linger on your storefront.

Key responsibilities:

  • Guaranteed Processing: It polls the JMS queue to ensure every message is handled, even if there was a temporary connection blip
  • Security Validation: It checks the digital signature (HMAC) of every message to ensure it genuinely comes from your Akeneo PIM
  • Precise Action: It identifies exactly what was deleted (a product, a model, or a category) and sends the corresponding DELETE command to SAP Commerce Cloud via OData

Technical Workflow 

The G.4 Integration Flow acts as the final "executioner" of the deletion events by following these precise steps:

  1. JMS Consumption: The Integration Flow retrieves the stored event message from the secure JMS queue, ensuring no notification is missed.
  2. Signature Verification: A built-in script validates the HMAC signature against your secret key to guarantee the message truly originated from your Akeneo PIM.
  3. Event Parsing & Routing: The iFlow interprets the payload to identify the Entity Type and Action. It only routes the message forward if the action is a "deleted" status.
  4. OData Execution: Once validated, the iFlow sends the final DELETE command via OData to SAP Commerce Cloud, removing the specific product or category from your storefront in real time.