Create Data Source

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

Now that we have created the Salesforce connected app, and this other file to describe the Salesforce REST API, the next step is to create a Cloud Services Configuration in AEM Forms. So, what I have here, is a cloud ready instance of AEM Forms, running on my local instance. So, 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. So, here 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. And in that, create our configuration here. So, give a name, SalesForceRESTAPI and the Service Type is going to be RESTful Service, click Next.
And the Swagger Source is a FILE, and Browse and select the file which we had created earlier.
And that file is sfdc-rest-swagger.
So, it populates the Scheme and the Host name here, and the authentication is going to be OAuth 2.0. So here we need to specify the Client id, the Secret, the Client Secret and the OAuth URL and other parameters. Client id, and Secret, Client Secret, we got, when we created our connected app. So, let’s enter the Client id, and then the Client Secret, and the OAuth URL is going to be this Salesforce. And then the Refresh Token is this.
And the Authorization Scope, I’ve put this, and the Authorization Bearer is Authorization Bearer and leave the Resource field blank. So, once you’re done this, click on Connect To Oauth.
If everything goes well, you should have a SUCCESS message. Authentication is successful. And then, don’t forget to click on this Create button, to complete the process of creating the Cloud Services Configuration.
So now, your Cloud Service Configuration is created. The next step is to start using this within your adaptive form. -