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

# Callout Monitoring

> Track every outbound HTTP callout from your Salesforce org with ZentienHttpCallout.

## Overview

Every time your Salesforce org makes an outbound HTTP request — to an ERP, payment gateway, external API, or any integration — `ZentienHttpCallout` records the endpoint, method, status code, duration, and whether it succeeded. This data flows to the **Pulse** dashboard in real time.

## Installation

`ZentienHttpCallout` is included in the Zentien package (v0.2.0+). No additional setup is needed — just update your Apex code.

## One-line migration

Replace:

```apex theme={null}
HttpResponse res = new Http().send(req);
```

With:

```apex theme={null}
HttpResponse res = ZentienHttpCallout.send(req);
```

That's it. `ZentienHttpCallout.send()` is a drop-in replacement — it accepts the same `HttpRequest`, returns the same `HttpResponse`, and re-throws any callout exceptions exactly as before. Your existing error handling is unaffected.

## What it tracks

For every callout, Zentien records:

| Field         | Description                                  |
| ------------- | -------------------------------------------- |
| Endpoint      | The URL called (truncated to 255 characters) |
| Method        | GET, POST, PUT, PATCH, DELETE, etc.          |
| Status Code   | HTTP response code (e.g. 200, 404, 500)      |
| Duration      | Round-trip time in milliseconds              |
| Success       | Whether the response code indicates success  |
| Error Message | Exception message if the callout threw       |

## Example

```apex theme={null}
public class SapIntegration {
    public static void syncOrder(String orderId) {
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://sap.internal.com/api/orders');
        req.setMethod('POST');
        req.setBody(JSON.serialize(new Map<String, String>{ 'orderId' => orderId }));

        // Replace new Http().send(req) with ZentienHttpCallout.send(req)
        HttpResponse res = ZentienHttpCallout.send(req);

        if (res.getStatusCode() != 200) {
            throw new CalloutException('SAP returned ' + res.getStatusCode());
        }
    }
}
```

## Viewing callout data

Go to **Pulse** in the Zentien dashboard. If callout data is flowing, a **Callout Monitor** table appears showing recent callouts with status, duration, and endpoint.

<Note>
  The Pulse page will show a banner if `ZentienHttpCallout` has not been detected in your org yet. Update your package to v0.2.0 and add at least one `ZentienHttpCallout.send()` call to activate the feature.
</Note>

## Next step

<Card title="Salesforce Pulse" icon="heart-pulse" href="/using/pulse">
  See your org's health — jobs, limits, callouts, and anomalies in one place.
</Card>
