Expand my Community achievements bar.

SOLVED

AEM Heretto Webhook Integration

Avatar

Level 4

Hi, I have a webhook created in Heretto and want to recieve and process that in AEM, How can I achieve this?
I think I have to create a API in AEM to listen to the Webhook created in Heretto but Do we have any documentation on how to write and where to write a  API in AEM that can listen for the payload from Heretto.
Thanks,
Tarini

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

That would be a custom implementation but you can refer this to understand how the callabacks can be implemented for a webhook in general- [0]. But if you want scalable solution go for Adobe I/O based implementation - [1]. Sample code - [2].

 

[0]- https://help.smartling.com/hc/en-us/articles/1260805504109-Webhooks-and-Callbacks 

[1]- https://experienceleague.adobe.com/docs/adobe-developers-live-events/events/2021/oct2021/event-drive... 

[2]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events 

 

 

View solution in original post

4 Replies

Avatar

Employee Advisor

Depending upon what operations your webhook doing, you need to a design a singleton controller for all incoming Heretto requests (a filter class would be best, but you can opt servlet as well). Now coming to the communication contract- your webhook may need a context identifier say request id which the AEM controller must pass back to Heretto while replying along with other response data (e.g status). For AEM operations try to use OOTB endpoints and other APIs like Assets API as much as possible than creating custom servlets. You also need to decide on the Authentication mechanism between requests e.g. OAuth2, Token etc. 

But if you want scalable solution go for Adobe I/O based implementation - [0]. Sample code - [1].

 

[0]- https://experienceleague.adobe.com/docs/adobe-developers-live-events/events/2021/oct2021/event-drive... 

[1]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events 

Avatar

Level 4

Do we have any documentation or some notes I am new to AEM
Thanks for the help

Avatar

Correct answer by
Employee Advisor

That would be a custom implementation but you can refer this to understand how the callabacks can be implemented for a webhook in general- [0]. But if you want scalable solution go for Adobe I/O based implementation - [1]. Sample code - [2].

 

[0]- https://help.smartling.com/hc/en-us/articles/1260805504109-Webhooks-and-Callbacks 

[1]- https://experienceleague.adobe.com/docs/adobe-developers-live-events/events/2021/oct2021/event-drive... 

[2]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events