Get more content like this

Integration of Adobe AEM-5.6.1 and Salesforce

Adobe AEM-5.6.1 and Salesforce Integration

We recently finished integrating Adobe Experience Manager with Salesforce. In this integration, a lead generated from the website will go through a workflow and is finally pushed to Salesforce. Let us go through the main steps in doing the integration and issues encountered on the way.

Integration Steps:

  • In Salesforce Admin panel create connected App.
  • Create Cloud Service configuration for Salesforce in Adobe AEM 5.6.1. Use Salesforce provided Consumer Key and Consumer Secret while creating the configuration.
  • Modify the workflow to suit your business process for validating the lead. As a final step you would post the lead to Salesforce.
  • Create your website form which act as the source of leads. Once a visitor submits the form, create node in AEM with the data and initiate the workflow with the newly created node as the payload. Recommended path for creating the leads would be /etc/forms/<website>/<form name> /<alphabet>


  • While trying to publish data from Adobe AEM to Salesforce we got java Exceptions and after debugging we found issue with the “AEM-mcm-salesforce-1.0.6.jar”. The java code in the “AEM-mcm-salesforce-1.0.6.jar” is looking for two properties “instanceurl”,”accesstoken” under the path  /etc/cloudservices/salesforce/apr8/jcr:content”. Updating as given below fixed the issue.

if(redirectUri != null && redirectUri.length() > 0)


String nodePath = (redirectUri.substring(redirectUri.indexOf("/etc/"), redirectUri.length()-5 ));

if(nodePath != null && nodePath.length() > 0)


ResourceResolver resourceResolver = request.getResourceResolver();

Session session = (Session)resourceResolver.adaptTo(Session.class);

Node configNode = session.getNode(nodePath).getNode("jcr:content");

String accessToken = responseBody.getString("access_token");

String instanceUrl = responseBody.getString("instance_url");

if(accessToken != null)

configNode.setProperty("accesstoken", accessToken);

if(instanceUrl != null)

configNode.setProperty("instanceUrl", instanceUrl);




If you would like more help optimizing or Integration your AEM Reach Us Today.

Learn more about how TechAspect can help you propel your digital transformation

Get In Touch