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

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

- Key: `salesforce_rest_api-record-deleted-instant`
- Type: Trigger (Polling)
- Version: 0.1.12
- 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-deleted-instant
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/salesforce_rest_api/sources/record-deleted-instant/record-deleted-instant.mjs

## Description

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

## 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. |

## 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-deleted-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-deleted-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 Deleted 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
