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

# Salesforce: Get Record

> Fetch selected scalar Salesforce fields, including custom fields, from one record by ID. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Fetch selected scalar Salesforce fields, including custom fields, from one record by ID.

> [!NOTE]
>
> Tool ID: `salesforce_get_record`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'salesforce_get_record',
  {
    "object": "example",
    "id": "id_123",
    "fields": [
      "email"
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute salesforce_get_record --input '{
  "object": "example",
  "id": "id_123",
  "fields": [
    "email"
  ]
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "example",
    "id": "id_123",
    "fields": {}
  }
}
```

Use `deepline describe salesforce_get_record --json` for the latest machine-readable contract.

## Input reference

Fetch selected fields from one Salesforce record by ID.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.object` | `string` | Yes | — | Salesforce object API name, for example Account, Contact, Lead, Opportunity, or CustomObject\_\_c. |
| `payload.id` | `string` | Yes | — | Salesforce record ID. |
| `payload.fields` | `array` | Yes | — | Salesforce field API names to read, including custom fields like Deepline\_Score\_\_c. Minimum items: 1. Maximum items: 200. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Fetch selected fields from one Salesforce record by ID.",
    "properties": {
      "object": {
        "type": "string",
        "description": "Salesforce object API name, for example Account, Contact, Lead, Opportunity, or CustomObject__c."
      },
      "id": {
        "type": "string",
        "description": "Salesforce record ID."
      },
      "fields": {
        "type": "array",
        "description": "Salesforce field API names to read, including custom fields like Deepline_Score__c.",
        "minItems": 1,
        "maxItems": 200,
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "object",
      "id",
      "fields"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload for one Salesforce record. |
| `result.data.object` | `string` | Yes | — | — |
| `result.data.id` | `string` | Yes | — | — |
| `result.data.fields` | `record` | Yes | — | — |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload for one Salesforce record.",
        "properties": {
          "object": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "required": [
          "object",
          "id",
          "fields"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Salesforce provider guide](https://deepline.com/docs/providers/salesforce/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.