Friday, March 24, 2017

Integration of Adobe Experience Manager(AEM) with Salesforce - Part1

Integration of Adobe Experience Manager(AEM) with Salesforce - Part1

Adobe Experience Manager(AEM) Salesforce cloud connector can be used to integrate to Salesforce via connected App configured in the Salesforce

The Adobe Experience Manager(AEM) Salesfore integration supports the following functionalities:
  • Lead Search
  • Contact Search
  • Export AEM user as Salesforce Lead
  • Associate an AEM user with a Salesforce "Contact" or "Lead"
The connector can be extended to support the additional functionalities.


Defining the connected App in Salesforce:

A connected app integrates an application with Salesforce using APIs
Connected apps use standard SAML and OAuth protocols to authenticate and provide tokens for use with Salesforce APIs. The required security policies can be set to control the connected Apps access.

Login to Salesforce - login.salesforce.com
Click on the user name- Setup- Click on Create then Apps
Create New connected App
Enter the name and Email address


Click on Enable OAuth settings
Add the below two OAuth scopes - Add the additional scopes if required
  • Access and manage your data (api)
  • Perform requests on your behalf at any time (refresh_token, offline_access)
Specifiy the call back URL - https://<<AEM Host name>>:<<AEM Port name>>//etc/cloudservices/salesforce/<<AEM Salesforce Connector Name>>

e.g. https://localhost:5403/etc/cloudservices/salesforce/SalesforceConnect.html

The call back URL should be https
Click Save


Copy the Consumer Key and Consumer Secret


Click on Manage - Edit Policies
Select the following options
  • Relax IP restrictions
  • Refresh token is valid until revoked
Click on Save


AEM Configuration:

Open https;//<<AEM Server host>>:<<AEM Server port>>/etc/cloudservices/salesforce.html
e.g - https://localhost:5403/etc/cloudservices/salesforce.html
AEM server should be configured with https to enable the Salesforce integration.

Add new Configuration


Enter the Title - Specify the Tile Sames as what ever provided in the callback URL.
Click on Create

Enter the Customer Key and Customer Secret Values


Click on Connect to Salesforce - Wait for 10 mins after creating the Connected App in Salesforce

If the connection is success the browser will redirect to Salesforce login page
Page will be displayed with permission to required access to connected App - Click on Allow


The popup will be displayed with successful message after success connection. Click ok on the popup and the setting window


The redirect_mismatch error will be displayed if the calback URL configured in the Salesforce and the redirect_uri send by the Connector is not matching


The popup with error "Error Getting Access Token" will be displayed if the server is not able to connect to Salesfore login URL- login.salesforce.com


Testing the integration: Use the "Salesforce.com Export workflow " to export the AEM user to Salesforce as Lead.
Edit the "Salesforce.com Export" workflow and select the Salesforce configuration


Enter all the mandatory field to the user profile

Run the workflow by selecting the required profile


The Lead will be created in Salesforce


This post is written based on AEM 6,1.





No comments:

Post a Comment