> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.deepmask.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview - Salesforce

> A reference for every Salesforce action available in DeepMask — what each one does, when to use it, and what it cannot do.

## Overview

DeepMask exposes **8 Salesforce actions**: 7 composites that assemble schema, search, summaries, and writes on the server, plus a last-resort SOQL query. Every action runs as the signed-in Salesforce user.

| Category | Actions | Purpose |
| - | - | - |
| **Schema** | 1 | Inspect objects, fields, picklists, and relationships |
| **Records** | 2 | Find lists of records, or everything about one record |
| **Insights** | 2 | Counts / totals and a daily briefing |
| **Writes** | 2 | Create / update records and log activity (**no delete**) |
| **Fallback** | 1 | Raw read-only SOQL when the composites cannot express the question |

<Info>
  One connection is one org. Record links returned by DeepMask (`web_url`) are Lightning URLs — open them as-is; do not rebuild Salesforce URLs yourself.
</Info>

<Warning>
  Write actions can create or change records. DeepMask previews changes first (`dry_run`) and requires `confirm` for updates, upserts, and multi-record creates. There is **no delete**.
</Warning>

### Schema

| Action | Description |
| - | - |
| [`salesforce_explore_schema`](/connectors/Salesforce/explore-schema) | List objects, or inspect one object's fields, picklist choices, and relationships. Use this before writes. |

### Records

| Action | Description |
| - | - |
| [`salesforce_find_records_smart`](/connectors/Salesforce/find-records-smart) | Primary find / list — search, filters, owner, list views, recently viewed. |
| [`salesforce_get_record_overview`](/connectors/Salesforce/get-record-overview) | Everything about **one** record: key fields, parents, related lists, activities. |

### Insights

| Action | Description |
| - | - |
| [`salesforce_summarize_records`](/connectors/Salesforce/summarize-records) | Counts and sums grouped by a field and/or a time bucket. |
| [`salesforce_my_day`](/connectors/Salesforce/my-day) | The signed-in user's open tasks, today's events, opportunities closing soon, recently viewed. |

### Writes

| Action | Description |
| - | - |
| [`salesforce_save_records`](/connectors/Salesforce/save-records) | Create, update, or upsert 1–25 records of one object, with a before→after preview. |
| [`salesforce_log_activity`](/connectors/Salesforce/log-activity) | Log a call, email, task, or meeting against a record and/or a person. |

### Fallback

| Action | Description |
| - | - |
| [`salesforce_query`](/connectors/Salesforce/query) | Last resort. Runs one read-only `SELECT` exactly as written. Prefer the composites first. |

***

## Prerequisites

* A connected Salesforce org — see [Salesforce Integration Setup](/salesforce).
* The signed-in Salesforce user must have **API Enabled** and access to the objects you ask about.

<Info>
  DeepMask does not implement its own sharing model. If a record is hidden in Salesforce, it is hidden here.
</Info>

***

## Common parameters

These appear on most actions.

| Parameter | Type | Description |
| - | - | - |
| `object` | string | Object **label** (`Opportunity`, `Invoices`) or **API name** (`Invoice__c`). Resolved in the org. |
| `response_format` | `"markdown"` \| `"json"` | `"markdown"` (default) is what you see in chat; `"json"` is structured data. |
| `limit` | number | Page size. Find / schema default **20** (max 100). Query default **50** (max 200). |
| `owner` | string | `"me"`, a user's name, or a User id (`005…`). |
| `dry_run` | boolean | Write tools only. Validate and preview; write nothing. |
| `confirm` | `true` | Required for update, upsert, and multi-record create after you have reviewed the preview. |

***

## Typical workflows

### Find a record, then read it

<Steps>
  <Step title="Search">
    Ask DeepMask to find the account, opportunity, or case. That uses `salesforce_find_records_smart`.
  </Step>

  <Step title="Open the overview">
    Ask for everything about one of the results. That uses `salesforce_get_record_overview`.
  </Step>

  <Step title="Open in Salesforce">
    Use the returned Lightning link (`web_url`) — do not construct the URL yourself.
  </Step>
</Steps>

### Change a field safely

<Steps>
  <Step title="Inspect the schema">
    Confirm the field exists and which picklist values are valid (`salesforce_explore_schema`).
  </Step>

  <Step title="Preview">
    Ask DeepMask to show the change first. The write runs with `dry_run: true` and returns a before→after diff.
  </Step>

  <Step title="Confirm">
    Approve the change. Updates and multi-creates require `confirm: true`.
  </Step>
</Steps>

### Daily standup

Ask "What's on my Salesforce plate today?" — that is `salesforce_my_day`. Follow up with "How many open opportunities by stage?" for `salesforce_summarize_records`.

***

## Pagination

`salesforce_find_records_smart` pages with an opaque `cursor` (`next_cursor` in the result). Schema listing uses `start` + `limit`. `salesforce_query` returns **one page** only — add a `LIMIT` or tighter filters in the SOQL; DeepMask does not follow Salesforce `nextRecordsUrl`.

***

## Security & Privacy

* Delegated OAuth — each user is themselves in Salesforce.
* No delete capability.
* Write tools are never silently retried by the AI wrapper (a retry could duplicate creates).
* Disconnect in DeepMask → **Connectors** → **Salesforce**, or revoke the External Client App in Salesforce Setup.

See [Salesforce Integration Setup](/salesforce) for the External Client App, scopes, and revoke steps.

<Info>
  Questions about data residency, compliance, or security? Contact DeepMask support at [support@deepmask.io](mailto:support@deepmask.io).
</Info>
