Magento_AdobeIoEventsClient
Welcome to the Magento Adobe IO Events integration repository!
Overview
Adobe IO Events is a package that enables integration between Magento and Adobe IO Events to create custom Event Provider and custom Events Metadata.
Usage
This is a two-step process:
- We will create an Event Provider, this is required once per Adobe Commerce instance
- We will update the Events Metadata, this should happen during the deployment phase
Configure Adobe Commerce for IO Events
Depending on credential type complete steps for OAuth Server-to-Server
or Service Account (JWT) DEPRECATED
OAuth Server-to-Server
- In the Adobe Developer Console, download your Adobe IO Console workspace configuration.
- In the Commerce admin panel, navigate to Stores > Settings > Configuration > Adobe Services > Adobe I/O Events > General configuration and make the following changes:
- Select
OAuth (recommended)
asAdobe I/O Authorization Type
- Populate the
Adobe I/O Workspace Configuration
fields - Enter a unique ID in the
Adobe Commerce Instance ID
field
- Select
Service Account (JWT) DEPRECATED
- In the Adobe Developer Console, download your Adobe IO Console workspace configuration and its associated Service Account private key.
- In the Commerce admin panel, navigate to Stores > Settings > Configuration > Adobe Services > Adobe I/O Events > General configuration and make the following changes:
- Select
JWT
asAdobe I/O Authorization Type
- Populate the
Service Account Private Key
andAdobe I/O Workspace Configuration
fields - Enter a unique ID in the
Adobe Commerce Instance ID
field
- Select
Create Event Provider
Run the following command to create an event provider
Copied to your clipboardbin/magento events:create-event-provider --label "<unique_provider_label>" --description "<provider description>"Enter the Event Provider ID output by the command in the
Adobe I/O Event Provider ID
field
Update Events Metadata
Events Metadata in the following format can optionally be stored in app/etc/event-types.json
:
Copied to your clipboard{"events": [{"event_code": "com.adobe.commerce.product.created","label": "Product created","description": "A product was created in your catalog"},{"event_code": "my.custom.event.code","label": "Custom event","description": "custom event"}]}
To update the metadata using the app/etc/event-types.json
file, add the following step to your ece-tool
or deployment script:
Copied to your clipboardbin/magento events:sync-events-metadata
Delete Events Metadata
You can alternatively delete the Events Metadata no longer required by adding the --delete
option to the command as such:
Copied to your clipboardbin/magento events:sync-events-metadata --delete