# List call logs (Salesforce)

Operation ID: `connectors.salesforceListCallLogs`

List call logs via Salesforce. Returns a list of SalesforceCallLog records.

## Public method

`listCallLogs`

Signature: `connectors.salesforce.createClient(config).listCallLogs(body)`

Return type: `Promise<SalesforceListCallLogsResult>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`POST /connectors/salesforce/list-call-logs`

## Path parameters

None.

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`SalesforceListCallLogsRequest`](../models/SalesforceListCallLogsRequest.md) | Yes |  |  |  | No |  |

Request model: [`SalesforceListCallLogsRequest`](../models/SalesforceListCallLogsRequest.md)

## Request example

```json
{
  "api_key": "example-api-key",
  "api_secret": "example-api-key",
  "client_id": "3MVG9XgkMlifdwVB2Y8B0PCdoUWqk5t.ypBYSWW7mIyTQBPPZS30mjIpd_vX0cmYEAQ.NqCE5KSuL7zts8sx7",
  "client_secret": "example-client-secret",
  "environment": "dev",
  "login_url": "https://login.salesforce.com/services/oauth2/token",
  "mode": "sandbox",
  "password": "example-password",
  "username": "patient@example.com"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`SalesforceListCallLogsResponse`](../models/SalesforceListCallLogsResponse.md) | application/json | Successful response |

## Success response examples

### 200

```json
[
  {
    "call_duration": 105,
    "call_type": "Voice",
    "called": "+15555550123",
    "caller": "+15555550123",
    "campaign": "example-campaign",
    "campaign_name": "FIT Campaign Quest",
    "conversation_id": "example-conversation_id",
    "cost": 698,
    "created_date": "2025-11-10T19:50:56.000+0000",
    "environment": "dev",
    "id": "example-id",
    "name": "CL-1471",
    "notes": "Healthcheck agent offered a breast cancer screening. The user initially disliked the agent's voice. The agent offered al",
    "patient_engagement_segment": "example-patient_engagement_segment",
    "patient_engagement_segment_name": "Colorectal Cancer Screening Segment",
    "started": "2025-11-10T19:49:04.000+0000",
    "status": "Complete",
    "termination_reason": "Call ended by remote party",
    "transcription": "[{\"role\":\"agent\",\"message\":\"Hello! I am calling from Healthcheck to offer you a insurance covered Breast Cancer screenin",
    "type": "Outbound",
    "vendor": "ElevenLabs"
  }
]
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Connector validation rejected the payload, or a required field was missing or of the wrong type. |
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The HealthCloud bearer token is missing or invalid, or the vendor rejected the supplied connector credentials. |
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The connector failed unexpectedly. |
| `502` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor returned an application or transport-level failure. |
| `504` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor did not respond within the connector timeout. |

## Error examples

### 400 — Invalid request

```json
{
  "error": "Invalid request"
}
```

### 401 — Authorization required

```json
{
  "error": "Authorization required"
}
```

### 500 — Internal error

```json
{
  "error": "Internal error"
}
```

### 502 — Upstream vendor error

```json
{
  "error": "Upstream vendor error"
}
```

### 504 — Upstream timeout

```json
{
  "error": "Upstream timeout"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
import type { SalesforceListCallLogsRequest } from "@healthcloudai/hc-sdk";
```

```ts
const body = {
  "api_key": "example-api-key",
  "api_secret": "example-api-key",
  "client_id": "3MVG9XgkMlifdwVB2Y8B0PCdoUWqk5t.ypBYSWW7mIyTQBPPZS30mjIpd_vX0cmYEAQ.NqCE5KSuL7zts8sx7",
  "client_secret": "example-client-secret",
  "environment": "dev",
  "login_url": "https://login.salesforce.com/services/oauth2/token",
  "mode": "sandbox",
  "password": "example-password",
  "username": "patient@example.com"
};

const result = await connectors.salesforce.createClient(config).listCallLogs(body);
```

## cURL

```bash
curl -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"api_key":"example-api-key","api_secret":"example-api-key","client_id":"3MVG9XgkMlifdwVB2Y8B0PCdoUWqk5t.ypBYSWW7mIyTQBPPZS30mjIpd_vX0cmYEAQ.NqCE5KSuL7zts8sx7","client_secret":"example-client-secret","environment":"dev","login_url":"https://login.salesforce.com/services/oauth2/token","mode":"sandbox","password":"example-password","username":"patient@example.com"}' \
  'https://dev-api-connectors.health.cloud/connectors/salesforce/list-call-logs'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
