> For the complete documentation index, see [llms.txt](https://docs.probe.splx.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.probe.splx.ai/ai-red-teaming/probe/target/index/agentforce.md).

# Agentforce

## Selecting the Connection Type

Once you have [selected the Agentforce as your connection type](/ai-red-teaming/probe/target/add-target/integration-setup.md#selecting-a-connection-type), a configuration tab will appear on the next step, prompting you to input the required connection details.

## Integration Setup

<figure><img src="/files/ofUdFFtdZ0fOsEiMLV3o" alt=""><figcaption><p>Figure 1: Agentforce Integration Example</p></figcaption></figure>

* **Organization Domain** - The domain of your Salesforce org instance that the application/client authenticates against and to which it sends API requests.
* **Client ID** - The public value that indicates which application is requesting access.
* **Client Secret** - The secret key associated with the Client ID, used to prove the application’s identity during OAuth authentication (must be kept confidential).
* **Agent ID** - The unique identifier of the specific Agentforce agent (resource) you want to call, used to route requests to that exact agent/configuration.
* **Variables** (optional) - A JSON object of context and custom variables to pass to the agent when starting a session. These variables provide additional context to the agent during conversations. You can define variables in Agentforce Builder and enable them for API access.

## How to Obtain Required Fields

1. Follow [these](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-get-started.html#create-a-salesforce-app) instructions from official Salesforce docs to register a Salesforce App.
2. Follow the [Obtain Credentials step](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-get-started.html#obtain-credentials) to mint Consumer Key (**Client ID**) and Consumer Secret (**Client Secret**).
3. You can get the **Organization Domain** from the Setup menu in the top right corner of the Agentforce app. Search for My Domain. Copy the value shown in the Current My Domain URL field.
4. Obtain **Agent Id** by following [these](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-agent-id.html) instructions.
5. See the [Salesforce Variables documentation](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-variables.html) for **Variables**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.probe.splx.ai/ai-red-teaming/probe/target/index/agentforce.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
