Comment

Add additional attribute in the Adobe IO Event Payload for an AEM Page Publish event with the "Destination" information (Publish vs Preview environments)

Avatar

Level 1

02-06-2022

Request for Feature Enhancement (RFE) Summary: In AEM we have an out-of-box capability to have AEM OSGI Events sent to Adobe IO: https://developer.adobe.com/events/docs/guides/using/aem/ https://github.com/adobe/aio-lib-java/tree/main/aem/aio_aem_events/src/cs/content/jcr_root/apps/aio-...

One of these OSGI events is for the Page Publish event in which we can have an external webhook notified when this event in AEM occurs.

Additionally we have the Managed Publication feature which allows for content authors to publish a page to a "Destination" such as the Publisher environment or a Preview environment.

In my use case I have an external webhook configured to receive Page Publish event. In my test I used the Managed Publication feature to publish the same page first with the "Publish" destination and then again with the "Preview" destination. In both cases my external webhook is receiving the event properly, however the Adobe IO event payload between these two are identical and there is no way to distinguish which environment the page was being published to.

I'm proposing that an additional attribute be added to the Adobe IO event body for the Page Publish event which would identify which "Destination" was selected if a content author uses the Managed Publication feature in AEM. The value could perhaps be the value "publish" or "preview" depending on what the author selected, or maybe even the fully qualified URL of the publisher or preview environment in the event body.

Based on this attribute in the Adobe IO event payload my external webhook URL I would be able to add additional business logic to treat these two publish events differently based on the "Destination" that was used.
Use-case: By having an additional attribute in the Adobe IO event payload we could have an external webhook have additional business logic to handle the "Publish" and "Preview" destination differently.  In my case I have content that I am hosting on AWS and would like to know if an author as published a page to the publish environment or the preview environment to separate them.
Current/Experienced Behavior: Currently the Adobe IO AEM page publish event payload sent to the webhook is identical between publishing to publish and preview environments and no way to distinguish the two.
Improved/Expected Behavior: By having an additional attribute in the Adobe IO event payload that an author had selected using the Managed Publication feature in AEM my webhook would be able to treat the two page publish events differently by knowing the page to the publisher or preview environment.
Environment Details (AEM version/service pack, any other specifics if applicable): AEM Cloud Service / Adobe IO 
Customer-name/Organization name: Coca-Cola
Screenshot (if applicable): Screen Shot 2022-05-31 at 12.57.17 PM.pngScreen Shot 2022-05-31 at 12.58.12 PM.png
Code package (if applicable):