---
name: "salesforce_update"
area: "salesforce"
title: "Change a Salesforce record"
price: "$0.001"
method: "POST"
url: "https://api.conecto.chat/v1/tools/salesforce_update"
mcp_server: "https://api.conecto.chat/mcp/salesforce"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/salesforce/salesforce_update"
---

# Change a Salesforce record (`salesforce_update`)

Changes a Salesforce record's fields; waits for the owner by default.

Change fields of a record. On accounts with an owner it waits for the owner's approval by default, showing each field's value now and after. $0.001.

Price: $0.001 a call. A call that fails costs nothing.

## Use it when

An opportunity moves on, or a customer's details change.

## Say this to your agent

> Mark the Hotel Seeblick opportunity Closed Won at 18,400 euros.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `object` | string | yes | The object's API name, like Account, Contact, Opportunity or Case. Matches ^[A-Za-z][A-Za-z0-9_]{0,79}$. |  |  |
| `id` | string | yes | The record's id. Matches ^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$. |  |  |
| `fields` | object | yes | Field API names and values, like {"StageName": "Closed Won", "Amount": 18400}. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `salesforce_update` on the MCP server `https://api.conecto.chat/mcp/salesforce` with these arguments:

```json
{
  "object": "Opportunity",
  "id": "0065g00000Xy1AbAAJ",
  "fields": {
    "StageName": "Closed Won",
    "Amount": 18400
  }
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/salesforce_update \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"object": "Opportunity", "id": "0065g00000Xy1AbAAJ", "fields": {"StageName": "Closed Won", "Amount": 18400}}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "salesforce_update",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.001",
  "balance_usd": "$19.75",
  "result": {
    "record": {
      "id": "0065g00000Xy1AbAAJ",
      "object": "Opportunity",
      "changed": [
        "Amount",
        "StageName"
      ]
    }
  }
}
```

`result`: record: id, object and the fields changed. Held calls answer approval_required first.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_connected` | 409 | Salesforce isn't connected yet. | Connect it with salesforce_connect. |
| `vendor_rejected` | 502 | Salesforce refused: the app's keys, or the run-as user may not do that. | Give the run-as user the permission the message names. |
| `not_found` | 404 | Salesforce has no record with that object and id. | Query first and use its id. |
| `invalid_input` | 400 | Salesforce refused the query or the fields, or the object or id is not one. | Fix what the message names; field names are API names, like StageName. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [salesforce_connect](https://conecto.chat/tools/salesforce/salesforce_connect.md): Connects the company's Salesforce org through its own connected app. Free.
- [salesforce_query](https://conecto.chat/tools/salesforce/salesforce_query.md): Runs one SOQL SELECT statement and returns up to 200 records. Free up to 1,000,000 reads a month.
- [salesforce_get](https://conecto.chat/tools/salesforce/salesforce_get.md): One Salesforce record by object and id, with all its fields or the ones named. Free up to 1,000,000 reads a month.
- [salesforce_create](https://conecto.chat/tools/salesforce/salesforce_create.md): Makes a record of any object the run-as user may create. $0.001 a call.
- [salesforce_disconnect](https://conecto.chat/tools/salesforce/salesforce_disconnect.md): Forgets the connected app's secret; nothing in Salesforce changes. Free.
