Integrating with Salesforce for Deletion Requests

You can integrate and access Salesforce to serve data subject deletion requests with Salesforce contact information.

To create a connected application

You will need to create a connected application for OneTrust in Salesforce. For more information about creating connected apps in Salesforce, see Create a Connected App.

  1. In the main navigation menu, click the Gear icon to select Setup.

    The Setup Home screen appears.

  2. In the sidebar under Platform Tools, click Apps > App Manager.

    The Setup App Manager screen appears.

  3. Click the New Connected App button.

    The New Connected App block appears.

  4. Complete the required fields.


    Field
    Description
    Connected App Name

    Enter a name for the new connected application.

    API Name

    This field will auto-populate with the entry from the Connected App Name only without spaces. Only letters, numbers, and underscores are permitted.

    Contact Email

    Enter an email contact for the new connected application.

  5. Keep this page open to enable the OAuth settings. For more information, see To enable the connected application for API integration.

To enable the connected application for API integration

Connected apps must be integrated with the Salesforce API and OneTrust using the OAuth 2.0 protocol. For more information, see Enable OAuth Settings for API Integration.

  1. In the API (Enable OAuth Settings) section, click Enable OAuth Settings. This will reveal a new list of options.
  2. Complete the fields.
    Note:

    Ensure you disable the Require Secret for Web Server Flow checkbox.



    Field
    Description
    Callback URL

    Enter the Callback URL from OneTrust. For more information, see To set up credentials in OneTrust.

    Selected OAuth Scopes

    Move the following OAuth scopes into the Selected OAuth Scopes column:

    • Access and manage your data (api)

    • Full access (full)

    • Perform requests on your behalf at any time (refresh_token, offline_access)

  3. Click the Save button.
    Note:

    Guidance text will appear stating: "Allow from 2-10 minutes for your changes to take effect on the server before using the connected application."

  4. Click the Continue button.

To obtain refresh token information

Once you have enabled and saved your OAuth settings, you can obtain token information which will be used to set up your credentials in OneTrust.

  1. In the API (Enable OAuth Settings) section, locate and copy the following values:
    • Consumer Key

    • Consumer Secret

    • Callback URL

    • Initial Access Token Value

  2. Launch your preferred API development platform to make API calls (e.g. Postman).
  3. Create a new GET request and navigate to the Authorization tab. For the Type, select OAuth 2.0. This will reveal the Access Token pane.


  4. Click on the Get New Access Token button. A new modal appears.
  5. Fill in a token name, select Grant Type as Authorization Code, and map the rest of the fields to the following values from the connected app you created in the previous step:
    • Callback URL = Callback URL

    • Auth URL = Access token URL

    • Client ID = Consumer Key

    • Client Secret = Consumer Secret



  6. Clicking request token will open a pop up. Log in to your Salesforce instance (if not logged in already) and confirm access to the connected app.


  7. Go back to Postman and click on Manage Tokens. Select the token you created and note that the refresh token has been created.


  8. You can test whether the connection works by testing an API call with the newly created access token.


To set up credentials in OneTrust

For more information on creating integration credentials, see Configuring Integration Credentials.

  1. On the Integrations menu, click Credentials.

    The Credentials screen appears.

  2. Click the Add New button.

    The Add Credential screen appears.

  3. Select Salesforce as your system of choice. Then click the Next button.

    The Enter Credential Details screen appears.

  4. Complete the fields using your Salesforce connected app and token details.
    • Auth Type: OAuth 2

    • Grant Type: Refresh

    • Access Token URL: https://login.salesforce.com/services/oauth2/token

    • Client ID: Consumer Key from Salesforce connected app

    • Client Secret: Consumer Secret from Salesforce

    • Authentication Parameters: Send in Request Parameters

    • Refresh Token: Refresh Token created from developer tool (e.g. Postman)

  5. Click the Generate Token button and then click Save.

To create an integration workflow

You can create an integration workflow for Salesforce by using the seeded workflow template in the Gallery screen.

  1. On the Integrations menu, click Gallery.

    The Gallery screen appears.

  2. Navigate to the Salesforce system, then click on the tile.

    The Gallery Details screen appears.

  3. In the DSAR : Contact Deletion block, click the Add button.


    The Add Workflow Name modal appears.

  4. Enter a name for the workflow in the Workflow Name field, then select your Salesforce credential you just created.


  5. Click the Create button.

    The Workflow Builder screen appears.

  6. Each Salesforce-based action will have the new credential applied.
  7. Click the Save button.
  8. Click the Activate button to enable the workflow.

To update the request workflow

  1. On the Privacy Rights Automation menu, click Setup > Workflows.

    The Workflows screen appears.

  2. Click the workflow you want to update with the Salesforce Delete Contacts integration.

    The Workflow Details screen appears.

  3. Go to the desired Workflow stage and click the Add Connection button.

    The Add Connection side pane appears.

  4. Under the Add Existing Connection section, locate and select your newly created Salesforce Contact Deletion integration.


  5. Click the Next button.

    The Configure Subtask section appears.

  6. You can edit the default name of the new subtask in the Subtask Name field. Newly added subtasks will be automatically created with _subtask appended to the existing connection name.
    Note:

    This configuration ability can be used to edit the subtask name to align with an existing integration that references a unique subtask name for its trigger. If you do not edit the default name to match, downstream connections may be broken or not be able to run as intended.

  7. Choose if you want to run manually and configure the expected processing time.
    Note:

    The expected time is defined by the organization for the system subtask to be moved to the Complete Status.

  8. Mark the connection as required if desired.
  9. Provide a description for the new subtask's purpose.
  10. When finished, click the Add button. The new subtask connection will be listed in the screen.


  11. Click the Activate button to reactivate the workflow.