Exporting AEM users as Salesforce Leads
If you want to export an AEM user as a Salesforce lead, configure the workflow to post leads to Salesforce.
To export AEM users as Salesforce leads:
-
Navigate to the Salesforce workflow at
http://localhost:4502/workflow
by right-clicking the workflow Salesforce.com Export and clicking Start. -
Select the AEM user that you want to create as a lead as the Payload for this workflow (home > users). Be sure to select the profile node of the user as it contains information like givenName, and familyName, which are mapped to Salesforce lead’s FirstName and LastName fields.
NOTE
Before starting this workflow, there are certain mandatory fields that a lead node in AEM must have before getting published to Salesforce. These are givenName, familyName, company, and email. To see a complete list of mappings between AEM user and Salesforce lead, see Mapping Configuration between AEM user and Salesforce lead. -
Click OK. The user information is exported to salesforce.com. You can verify it at salesforce.com.
NOTE
The error logs show you whether a lead is imported. Check the error log for more information.
Configuring the Salesforce.com Export workflow
If necessary, configure the Salesforce.com Export workflow to match it to the correct Salesforce.com configuration, or to make other changes.
To configure the Salesforce.com export workflow:
-
Navigate to
http://localhost:4502/cf#/etc/workflow/models/salesforce-com-export.html.
-
Open the Salesforce.com Export step, select the Arguments tab, and select the correct configuration is selected and click OK. In addition if you want the workflow to re-create a lead that was deleted in Salesforce, select the check box.
-
Click Save to save your changes.
Mapping configuration between AEM user and Salesforce Lead
To view or edit the current mapping configuration between an AEM user and a Salesforce lead, open the Configuration Manager: https://<hostname>:<port>/system/console/configMgr
and search for Salesforce Lead Mapping Configuration.
-
Open the Configuration Manager by clicking Web Console or going directly to
https://<hostname>:<port>/system/console/configMgr.
-
Search for Salesforce Lead Mapping Configuration.
-
Change mappings, as required. The default mapping follows the pattern aemUserAttribute=sfLeadAttribute. Click Save to save your changes.
Configuring Salesforce Client Context Store
The Salesforce client context store shows additional information about the currently logged in user than what is already available within AEM. It pulls this additional information from Salesforce depending upon the user’s connection with Salesforce.
To do this, configure the following:
- Link an AEM user with a Salesforce ID via the Salesforce Connect component.
- Add the Salesforce Profile Data into the client context page so you can configure what properties you want to see.
- (Optional) Build a segment that uses the data from the Salesforce Client Context Store.
Linking an AEM user with a Salesforce ID
Map an AEM user with a Salesforce ID so you can load it in the client context. In a real-world scenario, you would be linking based on known user data with validation. For demonstration purposes, in this procedure, you use the Salesforce Connect component.
-
Navigate to a web site in AEM, sign in, and drag and drop the Salesforce Connect component from the sidekick.
NOTE
If the Salesforce Connect component is not available, go to the Design view and select it to make it available in the Edit view.When you drag the component to the page, it displays Link to Salesforce=Off.
NOTE
This component is for demonstration purposes only. For real-world scenarios, there would be another process to link/match users with leads. -
After you drag the component on the page, open it to configure it. Select the configuration, type of contact, and the Salesforce lead or contact, and click OK.
AEM links the user with the Salesforce contact or lead.
Adding Salesforce Data to Client Context
You can load user data from Salesforce in the Client Context to use for personalization:
-
Open the client context that you want to extend by navigating there, for example,
http://localhost:4502/etc/clientcontext/default/content.html.
-
Drag the Salesforce Profile Data component to the client context.
-
Open the component by double-clicking it. Select Add Item and select a property from the drop-down list. Add as many properties as you want and select OK.
-
Now, you see Salesforce-specific properties from Salesforce displayed in the client context.
Building a segment using data from Salesforce Client Context Store
You can build a segment that uses data from the Salesforce Client Context Store. To do this:
- Navigate to segmentation in AEM either by going to Tools > Segmentation or going to http://localhost:4502/miscadmin#/etc/segmentation.
- Create or update a segment to include data from Salesforce. For more information, see Segmentation.
Searching Leads
AEM ships with a sample Search component that searches leads in Salesforce according to the given criteria. This component shows you how to use the Salesforce REST API to search for Salesforce objects. To trigger a call to salesforce.com, link a page with a Salesforce configuration.
To use this component:
-
Navigate to the page where you want to use this configuration. Open the page properties and select Cloud Services. Click Add Services and select Salesforce and the appropriate configuration and click OK.
-
Drag the Salesforce search component to the page (provided it has been enabled. To enable it, go to Design mode and add it to the appropriate area).
-
Open the Search component and specify the search parameters and click OK.
-
AEM displays the leads specified in your search component that match the criteria specified.
Experience Manager
Adobe Experience Manager Sites at Summit
Register for these admin sessions:
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
- Revolutionizing Pharma Content Velocity & MLR with Automation & AI
- How Adobe Uses GenStudio to Supercharge Its Global Marketing Organization
- Unlocking Content at Scale with Havas POP and Adobe GenStudio
- 3 Pillars of Purpose-driven Experiences: Trust, Data, and GenAI
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more