Integrate Adaptive Form with Salesforce configure-salesforce-with-ouath-2.0-client-credential
ÃÛ¶¹ÊÓƵ Experience Manager (AEM) Forms integration with Salesforce allows organizations to streamline processes by connecting their form creation and management capabilities with the Salesforce platform. Connecting an Adaptive Form with Salesforce enables seamless data exchange between the two platforms. When users submit forms, the data is synchronized with Salesforce automatically. It ensures that all customer information is up-to-date and centralized within the system.
You can use OAuth 2.0 client credentials to integrate AEM Forms with the Salesforce application. OAuth 2.0 client credentials are a standard and secure method for direct communication without user involvement.
AEM Forms exchanges the client credentials (consumer key and consumer secret), defined in the Salesforce connected application, to obtain an access token.
AEM as a Cloud Service offers various out of the box submit actions for handling form submissions. You can learn more about these options in the Adaptive Form Submit Action article.
There are multiple benefits of using OAuth 2.0 client credentials for authentication over Authorization Code Flow authentication:
- OAuth 2.0 client credentials authentication allows more than five connections per user.
- AEM data source configuration continues working on deactivation, access changes, password update for an AEM user.
Prerequisites prerequisites
Before setting communication between a Salesforce application and an AEM environment:
-
Create a and an API-only user for your organization and obtain the consumer key and consumer secret for the app.
-
Ensure that your Swagger file is appropriately configured to match your organization’s APIs. Alternatively, you can opt to create a Swagger file from the scratch, tailored for utilization in your AEM environment.
Configure Salesforce application using OAuth 2.0 Client Credential flow steps-to-create-aem-datasource-configuration
To connect Adaptive Form to Salesforce application using OAuth 2.0 client credential authentication settings, perform following steps:
-
Log in to your Author instance.
-
Go to Tools > Cloud Services > Data Sources.
-
Select the configuration folder.
-
Click Create and the Create Data Source Configuration appears.
-
Specify the Title and select the Service Type as RESTful Service.
-
Click Next.
-
Select the Swagger Source as File.
note note NOTE When the swagger file is selected, the Scheme, the Host name and the Base path are populated automatically. -
Upload the created swagger file from your local machine by clicking Browse.
-
Select the Authentication Type as OAuth 2.0 and the Authentication Settings panel appears.
-
Select the Grant Type as Client Credential.
-
Specify the Client Id and Client Secret obtained from the Salesforce connected app.
-
Specify the Access Token URL in format
https://[MyDomainName].my.salesforce.com/services/oauth2/token
.note note NOTE Each organization has its own specific domain name. -
Click Test Connection.
-
If the connection succeeds, click the Create button.
After configuring the Salesforce application, you can use the configuration while creating form data model (FDM). For more information, see Create form data model (FDM). Configure the Form Data Model Submit Action for an Adaptive Form to send data to Salesforce applications.
For more information about creating and using Form Data Model (FDM) in business workflows, see Data Integration.
Related Articles
- Send email
- Submit to SharePoint
- Submit using Form Data Model
- Submit to Azure Blob Storage
- Submit to REST endpoint
- Submit to OneDrive
- Invoke an AEM Workflow
- Submit to Power Automate
- Submit to Workfront Fusion
- Connect Adaptive Form to Salesforce application
- Connect an Adaptive Form to Microsoft® Dynamics OData
- Connect an Adaptive Form to ÃÛ¶¹ÊÓƵ Marketo Engage
- Create custom submit action