Bots – Advanced

Lesson: Enabling Salesforce Sessions for Noca AI Bots

Learn how to configure user-level authentication for your Noca AI bot, ensuring all data queries and automated actions strictly enforce the Salesforce permissions and record visibility of the logged-in user.

Prerequisites

Before starting this guide, ensure you have:

  • Access to your Noca AI workspace.

  • An active Salesforce integration connected to your workspace.

  • A pre-configured Noca Bot with Salesforce data sources or automations added.

Why Use Salesforce Sessions?

When a Salesforce Session is enabled, the bot does not use a global system account. Instead:

  • All Data Sources and Automations run under the credentials of the user currently logged in.

  • Sales reps only see the accounts and records assigned to them.

  • Community users only access their allowed records.

  • Enterprise data governance and role-based permissions are maintained automatically.

Step 1: Open Bot Security Settings

  1. From your Noca AI dashboard, open your bot (e.g., Sales Helper).

  2. In the right-hand panel, click on the Settings tab.

  3. Select Security from the left side of the settings modal.

Step 2: Select the Salesforce Session Provider

  1. Under Security Settings, click the Select Provider dropdown.

  2. Choose Salesforce Session.

  3. Under Choose your connection, select your target Salesforce connection (e.g., Salesforce - Noca Dev Org).

Step 3: Save and Publish Your Bot

  1. Click the close button on the settings modal.

  2. In the top toolbar, click Save.

  3. Click Publish (or open the publish menu) and confirm by clicking Publish.

  4. Once published, click View Bot to test the live user experience.

Step 4: Authenticate as a Salesforce User

  1. When the bot loads, it will prompt you to authenticate before proceeding.

  2. Click Auth Production (or Sandbox, depending on your environment setup).

  3. In the Salesforce popup window, select or log in with your specific Salesforce user credentials.

  4. Once authenticated, click the Send button in the bot window to complete setup.

Step 5: Test Record Visibility

  1. Send a query to the bot, such as:

    “List all accounts”

  2. Verify the output. The bot will return a table containing only the accounts and records that your logged-in Salesforce user account has explicit permission to view!