What is a Salesforce node?

The Salesforce node allows you to connect directly to your Salesforce CRM account and query structured sales and customer data. It supports SQL queries to retrieve contact, lead, opportunity, and account information, making it easier to automate workflows, analyze performance, or power downstream nodes like LLMs or VectorDBs.

Once connected, Stack AI can use this data to enhance sales processes, generate insights, and improve decision-making.

Step-by-step guide for Salesforce connection credentials:

  1. Obtain your login credentials:
    • Username: your Salesforce login name.
    • Password: your Salesforce account password.
  1. After logging in, click on your profile picture on the upper right.
  1. A dropdown menu will appear, click on Settings.
  1. On the Settings page, on the left navigation, select Reset My Security Token.
  1. Click on Reset Security Token.
  1. On click, the new Security token will be sent to the email associated to your Salesforce account.
  1. Finally, in the email, this will be the Security token that will be used for the connection.

How to connect it?

Steps to connect:

  1. Add the Salesforce node from the Apps section into your Stack AI project.
  1. Select “Query Salesforce” as the Action.
  1. Click on “Select a connection” or create a new connection with your credentials.
  1. Choose the appropriate domain for your Salesforce environment:

    DomainUse When
    ”login” or left blankConnecting to production or developer orgs
    ”test”Connecting to a sandbox instance
    mycustomdomainUsing a custom domain (recommended for SSO or OAuth setups)

Note that the Username for your API is different from the email address you used to sign up for Salesforce.

  1. Add your Salesforce Schema in the configurations of the node to define which table you want to extract.
    • For example: TABLE Contact (Id TEXT, Name TEXT, Industry TEXT);

    • You may use the provided Python Script to list tables from your Salesforce.

  1. Connect the input, it can be in natural language or SOQL query from an Input node or LLM.
  2. Connect the output to a downstream node like an Output node or directly to an LLM.

Visual overview

Below are some examples of valid SQL queries for your Salesforce database, provided that it has been included in the Schema:

SELECT Name, Email FROM Contact
SELECT Id, Email FROM Contact WHERE Income > USD10000
SELECT Id, Email FROM Contact WHERE LastName = 'Aceituno'
SELECT Id, Email, Name, ParentAccount.Name FROM Contact