Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.major.build/llms.txt

Use this file to discover all available pages before exploring further.

The SalesforceResourceClient provides access to Salesforce CRM data, allowing you to run SOQL queries and perform CRUD operations on sObjects.

Usage

import { mySalesforceClient } from "./clients";

const result = await mySalesforceClient.invoke(
  "GET",
  "/services/data/v59.0/query",
  "list-accounts",
  {
    query: { q: "SELECT Id, Name FROM Account LIMIT 10" },
  }
);

if (result.ok && result.result.body.kind === "json") {
  console.log("Accounts:", result.result.body.value);
}

Inputs

The invoke method accepts the following arguments:
method
string
required
The HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE".
path
string
required
The Salesforce REST API path (e.g., /services/data/v59.0/query).
invocationKey
string
required
A unique identifier for this operation.
options
object
Optional configuration object.

Outputs

The output format is the same as the Custom API client.
kind
"api"
Discriminator for the response type.
status
number
The HTTP status code.
body
ResponseBody
The response body (typically JSON).