Capture Sparkroom API response in AEM | Community
Skip to main content
Level 4
January 16, 2024

Capture Sparkroom API response in AEM

  • January 16, 2024
  • 2 replies
  • 958 views

Hi,
For my project so what we do is we have a form(NOT AEM FORMS) that the visitor fills up and upon submitting that the data gets propagated into sparkroom. It is a synchronous call, once we get the response from the sparkroom we redirect the user to a Inquiry submitted page and we don't store the data anywhere in AEM.

My requirement is : I want to store all these data in AEM that is getting into sparkroom when the user clicks on submit along with sparkroom response codes for future references. It should have all the data (whatever fields are there in the form) stored in someplace in AEM where we can based on requirement go and look up what all data were sent on X date and what was the response from Sparkroom upon submitting the same.


As for my setup, I've 2 dispatchers : 2 publishers.

Can someone please advise me or help me with the detailed steps/ideas/relevant code so that I can implement the same in AEM?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Sudheer_Sundalam
Community Advisor
Community Advisor
January 16, 2024

@arindam6600 ,

 

It is not recommended to store user submitted data in AEM (JCR). A similar question was asked before on the community. You may want to go through this forum.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/storing-user-data-in-aem-is-it-recommended/m-p/409695

Level 4
January 16, 2024

While I understand that this is not recommended but since this is a request from the site owner, we will have to somehow implement the same. So looking forward to have some insights as to how to do this.

Shiv_Prakash_Patel
Community Advisor
Community Advisor
January 16, 2024

Hi, @arindam6600 ,

You are looking to store form data specific to the user at different times. So you can follow up on the below approach.

1. Each user has a different node under /home/user/*.

2. For each form submission by a user, create a node parallel to the profile name as a combination of data and time.(e.g. 160120241038 - 16, 2024, 10:38 PM)

3. Store all data as a property on that node.

So using the above process, you can store the form data for a user at different times. Also, based on the requirements, you can retrieve and use the data.

Hope this would help you!!!

Regards,

Shiv

Shiv Prakash
Level 4
January 17, 2024

Hi, so the use-case that I'm working on is not pertaining to users. The site is public and one can just go and submit the inquiry form (NO LOGIN NEEDED). So, creating a node parallel to the profile name as a combination of data and time won't be feasible over here.