Create Data Source

Create a REST backed data source using the swagger file created in the earlier step.

Transcript
Now that we have created the Salesforce connected app and the Swagger file to describe the Salesforce REST API, the next step is to create a Cloud services configuration in AEM Forms. What I have here is a Cloud ready instance of AEM Forms running on my local instance. The first thing we need to do is to go into the Tools menu and the configuration browser, and create a container which will hold our Cloud services configuration. Let’s call it SFDC, and select the Cloud configurations options, and click on Create. So the next thing we need to do is to create our Cloud services configuration in that particular folder. So go to Cloud services, and go to your data sources here, and select the folder which we had created. In that, create our configuration here. So give a name, Salesforce-REST-API. The service type is going to be RESTfulService. Click Next. So here, we provide the details for creating our data source configuration. I’ve selected the Swagger source as a file, and I’ve uploaded my Swagger.json file. The select schema comes from the Swagger file, it’s HTTPS, and that’s the host name. Authentication type is OAuth2.0, and make sure you select authorization code as the grant type. Here, we need to specify the client ID and the client secret, which we got when we created the connected app in Salesforce. We need to provide the OAuth URL, refresh token URL, access token URL, the authorization scope, and the authentication header as authorization bearer. Leave the resource field blank, and then click on Test Connection. So if everything goes well, you should get a success message here, that the authentication was successful. Make sure you click on the Create button to finish the process of creating the data source here. That’s the data source that we had created. So in the next step, we will now create a form data model based on this particular data source.
Setting
Value
OAuth URL
https://login.salesforce.com/services/oauth2/authorize
Authorization Scope
api chatter_api full id openid refresh_token visualforce web
Refresh Token URL
https://newfocus-dev-ed.my.salesforce.com/services/oauth2/token
Access Token URL
https://newfocus-dev-ed.my.salesforce.com/services/oauth2/token

The Refresh and Access Token URL’s domain names will have to change to match your Salesforce account settings

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69