# Salesforce Agent

### What Can You Do?

Once connected, the OneNote Agent lets you:

* **Find & Browse Records**: Search for accounts, contacts, leads, and any other Salesforce object by name or criteria
* **Read & Analyze CRM Data**: Get summaries, extract key details, or ask questions about specific records
* **Create & Update Records**: Add new leads, contacts, or accounts — and update existing records with new field values
* **Manage Sales Operations**: Track opportunities, manage pipelines, and keep your CRM data accurate and up to date
* **Discover Salesforce Objects**: Automatically resolve object names (standard or custom) to ensure every action targets the right data

### Quick Setup

#### Step 1: Select Salesforce Agent

1. In any Blockbrain conversation, click the **AI Model selection** dropdown
2. Click **"Show detailed AI model list"**
3. Find and click **"Salesforce Agent"**
4. Look for **"Configure"** next to the *Salesforce Tools* section

#### Step 2: Connect to Salesforce

1. Click **"Configure"**
2. Click the **"Connect"** button
3. Sign in with your Salesforce account when prompted
4. Click **"Accept"** to allow Blockbrain to access your Salesforce data

#### Step 3: Start Using Salesforce

That's it! You can now ask Blockbrain to search, create, and update records across your entire Salesforce CRM.

### What You Can Ask

#### **Finding & Browsing Records**

```
"Show me all open leads created this month"  
"Find the account for Acme Corporation"  
"List all contacts associated with the TechCorp account"  
```

#### **Reading & Analyzing CRM Data**

```
"Summarize the details for lead John Smith"  
"What is the current status of our deal with GlobalTech?"  
"Give me an overview of all opportunities closing this quarter"  
```

#### **Creating Records**

```
"Create a new lead for Sarah Connor at Cyberdyne Systems"  
"Add a new account for Initech with industry set to Technology"  
"Create a contact called James Brown linked to the Acme account"  
```

#### **Updating Records**

```
"Update the phone number for contact Jane Doe to +1 555 000 1234"  
"Change the lead status for John Smith to 'Working'"  
"Set the close date on the GlobalTech opportunity to June 30"  
```

#### **Managing Sales Operations**

```
"Show all opportunities in the Negotiation stage"  
"Which leads have not been contacted in the last 30 days?"  
"List all accounts in the Financial Services industry"  
```

### How It Works

**Your Access = Blockbrain's Access**

* Blockbrain can only see Salesforce records you have permission to access
* If a record is restricted in Salesforce, Blockbrain cannot retrieve it either
* Your existing Salesforce permissions are always respected

**Safe and Secure**

* Your data stays in Salesforce — Blockbrain never stores copies of your records
* Records are only created or modified when you explicitly instruct it — no unsolicited changes
* All activity follows your organization's Salesforce access controls

### Tips for Better Results

#### **Be Specific About the Object**

**False:** "Find that company"\
**Correct:** "Find the Salesforce account for Acme Corporation"

#### **Include Field Details When Creating or Updating**

**False:** "Create a lead"\
**Correct:** "Create a lead for John Smith, email <john@example.com>, company Initech, status Open"

#### **Mention Status or Stage When Filtering**

**False:** "Show me deals"\
**Correct:** "Show me all opportunities in the Proposal stage closing before December"

### Troubleshooting

**"Record not found"**

* Confirm the record exists and is visible directly in Salesforce
* Try using a different identifier (full name, email, or account name)
* The record may be in a restricted object or sharing rule you don't have access to

**"Connection failed" or "Authorization error"**

* Wait 2–10 minutes after creating the Salesforce app, then try again
* Double-check that the Consumer Key, Consumer Secret, and Scopes were entered correctly in Blockbrain
* Try reconnecting by going to **Admin** > **Agents** > **Tools** > **Salesforce Tools**

**"No objects or fields found"**

* Your Salesforce profile may not have API access enabled
* Contact your Salesforce administrator to verify your API and object permissions
* Ensure the OAuth scopes were saved correctly during setup

**"Field could not be updated"**

* Some Salesforce fields are read-only and cannot be modified via API
* Blockbrain automatically skips read-only fields — check if the field you want to update is editable in Salesforce directly

### Privacy and Security

* **Respecting Permissions**: Blockbrain only accesses records your Salesforce user is permitted to see
* **No Unauthorized Changes**: Records are only created, updated, or modified when you explicitly request it
* **No Storage**: Blockbrain does not store copies of your Salesforce records, fields, or attachments
* **Secure Credentials**: Your Consumer Key and Secret are stored encrypted and used solely for authentication

### Common Use Cases

**Lead & Contact Management**

* Search for leads and contacts by name, email, or company
* Create new leads directly from a conversation
* Update contact details or lead status without opening Salesforce

**Opportunity & Pipeline Tracking**

* Get a snapshot of your current pipeline by stage
* Identify deals at risk or closing soon
* Update opportunity stages, close dates, or amounts on the fly

**Account Research**

* Pull up full account details before a client meeting
* List all contacts and open opportunities tied to an account
* Identify accounts by industry, region, or owner

### Example Conversation

**You:** "Show me all leads created this week that haven't been contacted yet"\
**Blockbrain:** "Here are this week's leads that haven't been contacted yet:

* **Sarah Connor** - Cyberdyne Systems -Created: Apr 15
* **Miles Dyson** - Cyberdyne Research - Created: Apr 16
* **John Connor** -Resistance Inc. - Created: Apr 17

Would you like to update their status, assign them to a rep, or get more details on any of these?"

### Next Steps

Want to connect more services? Try the [Atlassian Agent](/for-users/agents/atlassian-agent.md)  to manage your Jira projects, track issues, and access Confluence content directly through Blockbrain.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockbrain.ai/for-users/agents/salesforce-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
