4

I would like to integrate data from a website that I work on with SalesForce. However, reading the documentation has left me with a feeling that SalesForce works differently to other platforms when it comes to integration.

The website is www.infiniforms.io, an online form creator. We integrate with other third parties, such as Dropbox and MailChimp. When a form is submitted, we can send data to the third party application, using their APIs. The aim is to add details from the submitted form into a custom object within in SalesForce. I have created my developer account and added Infiniforms as a Connected app.

Usually, when registering with the third party provider, I create an account and the add my application to get the Client ID and Secret. This is then used in the initial OAuth session between the users account in Infiniforms and the third-party.

However, SalesForce is a huge beast and the documentation assumes you understand everything in great detail!

I cannot determine if the Connected App I have added can now be used by anyone to add the form data to their own custom objects, or if a new Connected App needs to be added for each organisation that wants to integrate Infiniforms with SalesForce.

A nudge in the right direction would be greatly appreciated.

3

I cannot determine if the Connected App I have added can now be used by anyone to add the form data to their own custom objects, or if a new Connected App needs to be added for each organisation that wants to integrate Infiniforms with Sales[f]orce.

An example might be easiest.

I make an app that developers/admins can use to run SOQL queries etc against their orgs. A bit like Workbench, except it is a native application running on their computer. One of the authentication options it uses is the OAuth User-Agent Flow.

In this case I direct an embedded browser to the authorization server (login.salesforce.com) and include the client_secret (Consumer Secret) and client_id (Consumer Key) in the query string using the values from my connected app, which is only configured in my Organization. It hasn't been otherwise installed in their Organization.

Salesforce will prompt the user for their sign in credentials, and then to approve my connected app to access their org based on the OAuth scopes I configured.

enter image description here

After that they get redirected onto a URL I can detect in the embedded browser and extract the Access Token (synonymous with the session Id), Instance Url, and in my case, the Refresh Token.

I can then use the Access Token to access with the SOAP or REST API's on the Instance URL. This can include populating fields on custom objects they have in their Organization.

Note that after this process if I go to Setup > Administration Setup > Manage Apps > Connected Apps OAuth Usage I can see my connected app and the User Count.

In your case you will most likely want the Web Server OAuth flow. Workbench is probably closer to what you want to do. There might be something useful in their Github project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.