# New Updated Record (Instant, of Selectable Type) — Salesforce

> Emit new event when a record of the selected type is updated. See the documentation

- Key: `salesforce_rest_api-record-updated-instant`
- Type: Trigger (Polling)
- Version: 0.2.13
- App: Salesforce (`salesforce_rest_api`) — https://pipedream.com/apps/salesforce-rest-api.md
- This page (HTML): https://pipedream.com/apps/salesforce-rest-api/triggers/record-updated-instant
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/salesforce_rest_api/sources/record-updated-instant/record-updated-instant.mjs

## Description

Emit new event when a record of the selected type is updated. [See the documentation](https://sforce.co/3yPSJZy)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timer` | `$.interface.timer` | Yes | The timer is only used as a fallback if instant event delivery (webhook) is not available. |
| `objectType` | `string` | Yes | The type of object for which to monitor events Options are loaded from the connected account. |
| `fields` | `string[]` | No | If specified, events will only be emitted if at least one of the selected fields is updated. This filter is only available when a webhook is created successfully. Options are loaded from the connected account. |
| `skipFirstRun` | `boolean` | No | When enabled, this trigger will ignore all existing records and only watch for updates that happen after activation. When disabled, it will process existing records on first run. |

## Returns

Events emitted by Salesforce.

## Run it

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const deployed = await pd.triggers.deploy({
  id: "salesforce_rest_api-record-updated-instant",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    salesforce_rest_api: { authProvisionId: "apn_xxxxxxx" },
    timer: { "intervalSeconds": 900 },
    objectType: "Object Type",
  },
  webhookUrl: "https://example.com/webhooks/salesforce-rest-api",
})

console.log(deployed.id)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/triggers/deploy \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "salesforce_rest_api-record-updated-instant",
    "webhook_url": "https://example.com/webhooks/salesforce-rest-api",
    "configured_props": {
      "salesforce_rest_api": { "authProvisionId": "apn_xxxxxxx" },
      "timer": { "intervalSeconds": 900 },
      "objectType": "Object Type"
    }
  }'
```

**MCP**

MCP servers expose Salesforce actions as on-demand tools.

New Updated Record (Instant, of Selectable Type) is an event source, so your application deploys it with the Connect SDK or API and then either receives each event at a webhook URL or retrieves events on demand with the trigger events API.

## Event delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source. Or: no webhook required — your app or agent can fetch recent events from the [trigger events API](https://pipedream.com/docs/connect/api-reference/list-trigger-events.md) instead.

---

- App: https://pipedream.com/apps/salesforce-rest-api.md · All apps: https://pipedream.com/apps
