Prerequisites for Creating a Connection

You must satisfy the following prerequisites to create a connection with the Salesforce REST Adapter.

Obtain the Salesforce Domain URL

  1. Log in to the Salesforce sandbox instance.
  2. Find the domain name by performing the following steps:
    1. Go to your profile name.
    2. Select Set up.
    3. In the Quick find search field, enter Domain.
    4. Select My Domain from the Domain Management list.
    5. In the My Domain Settings page, copy the value for the Current My Domain Name URL.
    6. Append https:// to the domain name URL to complete the Salesforce domain URL.
      For example , if your Current My Domain Name URL value is yourDomain.my.salesforce.com, this is the complete Salesforce domain URL:
      https://yourDomain.my.salesforce.com/

Obtain the Current Salesforce API Version

  1. Log in to the Salesforce sandbox instance.
  2. Click Setup in the header or click your user name, then select Setup. See Explore the Salesforce Setup Menu.
  3. Search for API in the Quick Find field, then select API under Develop.
  4. Click Generate Enterprise WSDL.
  5. On the Generate Enterprise WSDL page, click Generate. The WSDL opens in a new browser tab and your current API version appears in the Commented-out section. For example:
    Salesforce.com Enterprise Web Services API Version 35.0

Note:

If you're using the Lightning Experience UI on your Salesforce instance, switch to the Salesforce Classic UI. See Toggle or switch between Lightning Experience and Salesforce Classic.

To learn more, visit Find your current API version.

Configure the OAuth-Connected App

Perform the following steps to configure the OAuth-connected app.

  1. Log in to the Salesforce sandbox instance.
  2. Click Setup in the header or click your user name, and then select Setup.
  3. In the Quick Find field, search for Apps.
  4. From the list that opens, select your connected app:
    1. If you do not have a connected app, click New in the Connected App section.
    2. On the New Connected App page that appears, enter the following:
      • Basic Information
      • API (Enable OAuth Settings)
    3. In the API (Enable OAuth Settings) section:
      1. Check the Enable OAuth Settings checkbox.
      2. Configure the following security policies:
        • OAuth 2.0 Authorization Code Credentials security policy
        • OAuth 2.0 Client Credentials security policy
      3. To configure the OAuth 2.0 Authorization Code Credentials security policy:
        1. In the Callback URL field, enter the redirect URI in the following format.
           https://OIC_instance_URL/icsapis./agent/oauth/callback
        2. Add the mandatory scopes:
          1. From the Available OAuth Scopes list, you must add the following scopes to the Selected OAuth Scopes section.
            • Access and manage your data(api)
            • Access your basic information(id)
            • Perform request at any time (refresh_token, offline_access)

              These scopes (api, id, and refresh_token) are the minimum scopes required to configure a connection in Oracle Integration using the OAuth 2.0 Authorization Code Credentials security policy.

          2. Check the Enable Authorization Code and Credentials Flow checkbox.
          3. Click Save.

            The connected app is now created or updated.

      4. To configure the OAuth 2.0 Client Credentials security policy:
        1. Check the Enable Client Credentials Flow checkbox.

          A warning message is displayed.

        2. Click Ok if you accept the warning.
        3. Click Save.

          A new connected app is created.

        4. In the Connected App Details section, click Manage.
        5. Click Edit Policies.
        6. Go to the Client Credentials Flow section.
        7. In the Run As text field, enter the Salesforce user for whom you want to configure the client credentials.
        8. Save your changes.

Obtain the Client ID and Client Secret

  1. Log in to your Salesforce instance.
  2. Browse your connected app list by navigating to username, then Setup.
  3. Enter Apps in the Quick Find field, then select your app in the list that appears.

    Note:

    In case you do not have a connected app, you can create a one. See Configure OAuth Connected App.
  4. Under the API (Enable OAuth Settings) section, click Manage Consumer Details.

    Salesforce now sends a verification code to your registered email.

  5. Enter the verification code. You can now access the client ID (consumer key) and client (consumer) secret.

    Note:

    These details are required to configure the connection properties in Oracle Integration.

Select Entities for Change Data Capture Events

To receive notifications using change data capture (CDC) events, you must select the entity/entities. Once selected, these objects are displayed for use on the Operations page of the Adapter Endpoint Configuration Wizard when configuring the Salesforce REST Adapter as a trigger connection.

  1. Navigate to Setup.
  2. Search for Change Data Capture in the Quick Find field, then select Change Data Capture.
  3. Select the required entities (business objects) for which you want to receive change event notifications.
  4. Click Save.
  5. Assign permissions to these objects to enable any change data capture events See Assign Permissions.

Assign Permissions

You must assign appropriate permissions to users to enable seamless interaction with Salesforce. You can navigate to each user's profile page and define access levels such as for read, write, delete, view all, and modify all for both standard and custom data objects.

Also, ensure that users have permissions to publish or subscribe to platform events. To configure permissions for objects involved in Change Data Capture events, you must first select entities for Change Data Capture Events and then define the required access levels for relevant standard and custom data objects.

  1. Navigate to Setup: 
  2. In the Quick Find field, search for Profiles.
  3. Select the profile of the user you want to modify.
  4. Click Edit.
    You can now edit/assign the permissions to standard and custom objects for basic access and data administration operations.
    • Basic Access (Read, Create, Edit, and Delete)
    • Data Administration (View all Records, modify all Records, and View all Fields)
  5. Enable Basic Access permissions for Platform Events.
    • Read (Allows user to subscribe to the event)
    • Create (Allows user to publish the event)
  6. Save the changes.