Hi,
We have a requirement to integrate AEM forms (v6.3) with salesforce. What I understand is there are 2 ways to do it
1. Create a Form data model using salesforce swagger file/URL (Adobe Experience Manager Help | Configuring DataSource with Salesforce in AEM Forms 6.3 and 6.4). The only problem with this approach is that there is swagger file/url is not available to us.
2. Call the Rest endpoints from the code editor. I am assuming this is an option. If so appreciate if there is any article/documentation available on the implementation?
Is there any other options available?
Thx,
Prabu
Views
Replies
Total Likes
You will have to create swagger file manually
calling the REST endpoint directly from the code editor with out creating form data model will not work as the REST endpoints use authentication
Views
Replies
Total Likes
Or you will have to create OSGI service which communicates with salesforce
but creating the swagger file and creating FDMis the easiest option
Views
Replies
Total Likes
Simply make an AJAX call like any GET/POST request, it would work. check the sample here https://forums.adobe.com/thread/2637181
Views
Replies
Total Likes
how will you authenticate with this mechanism?
SFDC uses oAith 2.0
Views
Replies
Total Likes
The answer is in context to point2 "2. Call the Rest endpoints from the code editor. I am assuming this is an option. If so appreciate if there is any article/documentation available on the implementation?"
Views
Replies
Total Likes
Anyways, Using JSforce you can connect to salesforce even via Javascript. Though handling at server would also be a good idea.
Views
Replies
Total Likes
Hi,
Thanks for the response. The above example works and i have also tried with OSGI component. I believe it is working, just waiting for some creds for salesforce connectivity.
We have also built a separate captcha component using 3rd party library. How do we integrate this into the submit action of the form? Meaning on click of Submit button the captcha should be validated before submission
Views
Replies
Total Likes
Why not use the google captcha- we have out Of the box integration with it
Views
Replies
Total Likes
As a digital preference, out client has moved away from Google Recaptcha into a 3rd party captcha service. We have implementated as a separate captcha component and is working fine for few other usecases. However I am not sure how do we integrate into AEM forms?
Views
Replies
Total Likes
will get back to you
Views
Replies
Total Likes
Currently using your own captcha implementation in AEM forms is not supported
Views
Replies
Total Likes
Thanks for the response. Just a wild thought, haven't thought through this in detail yet. Is there a possibility to fetch the values entered in the form into another component. I am just thinking if I can separate captcha form submission and forms into 2 different components in a page.
Alternatively if we use OOTB AEM forms component is it possible for that integration?
Views
Replies
Total Likes
If another component is in form, yes you can easily use the rule or code editor.
You can have a different panel with Captcha and forms component.
Views
Replies
Total Likes
Though I shared an initial response on the query if you can detail the requirement I would add more to it.
Views
Replies
Total Likes
Thanks Mayank. Let me try to add in the details here. we have a requirement to add the user registration into salesforce. The form to capture user registration has the usuals (firstname, lastname, email etc) which needs to be posted into salesforce. The form also displays a captcha (not google recaptcha but a 3rd party service to render captcha) that should be validated before the actual form submission. So three are 2 parts to this. (1) AEM forms integration with Salesforce (2) AEM forms integration with 3rd party Captcha.
For Reqt(1), I am fairly comfortable to go with OSGI/JS option (currently experimenting on it) but not sure on how to go about reqt(2) though. Based on your above response even if we are able to render the captcha inside the form in a separate panel, how do we tie this to the form submit
Let me know if you need more details, thx
Views
Replies
Total Likes
I was going to suggest to have tabbed navigation in which the next tab gets enabled once you have successfully filled the respective panel. Now the third party captcha which you are trying to validate would have some callback function and based on the success and failure you enable/Disable the submit button.
Views
Replies
Total Likes
thanks for the response mayank. Yes captcha callback function returns true/false based on user input. I am little lost on how to capture this input and tie it to the submit button?
Views
Replies
Total Likes
Do something like this on callback in code-editor:
if (object.value == "true") {
submit.enabled = true;
}
Have the submit button disabled by default.
Views
Replies
Total Likes
ok will try that out and let you know
Views
Replies
Total Likes
I tried to integrate this but looks like the form doesn't pick up or submit the generated inputs that are not originally part of the form. It is picking up the values from lets say a text box field or any other element available in the form builder but when we include a custom component like captcha in our case, the generated input (for eg captcha response) is being ignored during the form submission.
Any ideas on how to pickup the captcha response from the form?
Views
Replies
Total Likes