The Salesforce Config page help you to generate some config xml to interact with Salesforce api. (Since 3.6.5)

Prerequisite

To be able to generate salesforce xml templates or copy the xml config to the Config page clipboard you need to have the required interlok-apache-http and interlok-oauth-salesforce optional component installed into ${adapter.home}/lib directory. If you are not using those two optional components you will still be able to use the page but you will get a warning message. Salesforce warning message

You also need to create a Connected App in your Salesforce account. More help on Salesforce developers site here and here and here.

Getting Started

To access the Salesforce config page, you should use the Salesforce button on the header navigation bar. The page is only accessible by admin and user roles.

The header navigation bar:

Navigation bar with salesforce selected

Salesforce Config

Authentication

The first thing you will need to do in the Salesforce Config page is to authenticate your account. There are two ways to do it.

  • The easiest and fastest way is Authorization Code Grant. You need to enter your Connected App Client Id (consumer key) and Salesforce web page will prompt your for your Salesforce account credentials. Once authenticated the Salesforce popup will close and you will be able to use the page.

salesforce oauth authorization code grant

  • The second way is Password Grant. More information is required but the authentication will all be done within the UI page. You can also use this grant type to generated an oauth service xml to use in the UI Config page.
    • Client Id: Salesforce consumer key
    • Client Secret: Salesforce consumer secret
    • Username: Salesforce account username
    • Password: Salesforce account password + the security token. You can read more about security token on Salesforce help site.

salesforce oauth password grant

You can remember the Salesforce credentials for the current session by keeping the checkbox ticked (Since 3.6.6).

The Salesforce Account panel also provide a Build Config XML button to generate an adapter service xml to use in the UI Config page.

Api Version

When successfully authenticated the page will show you the salesforce organization URL you are using and will ask you to select the Api Version to use. You can read more about api version on Salesforce developer site.

Salesforce version selection

Standard Objects

Salesforce SObject selection

Standard objects (SObjects) represent the database tables that contain the information of your organization. You can select which standard object type you want to work within the dropdown and either build a SOQL or get a list of objects.

SOQL

Salesforce SOQL builder

You can use Salesforce Object Query Language (SOQL) to search data into your organisation. SOQL is similar to SQL but specific to Salesforce. Read more about SOQL. The UI Salesforce config page helps building a SOQL for a SObject type. You can select the fields you want to query, add some were clauses, limit and order the list of returned SObjects. The SOQL panel also provide a Build Config XML button to generate an adapter service xml to use in the UI Config page. The service will query SObjects using the SOQL you’ve provided.

Resources

Salesforce SObjects list

The Resource panel lists all the SObjects retrieve using the provided SOQL. From this panel you can add, edit and delete SObjects. For each actions you can generate a service xml to use in the UI Config page with the Build Config XML buttons.

Build Config XML

All the Build Config XML modal (authentication, resource listing, fetching, editing, creating or deleting) have a Copy to Clipboard and a Save as Template button.

Salesforce SObjects list

The Copy to Clipboard button will copy the displayed xml into a service component in the UI Clipboard and be can used by dragging it from the Sidebar Clipboard in the Config page (Since 3.6.6).

The Save as Template button will save the displayed xml into a service template usable in the Config page.

Tags: ui