---
schema_version: "1"
id: fa151dd2eb28c78f17e2a82119d305d8b19105007339b27d63cf69cecde28147
title: BotDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_botdefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_botdefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 08343effe142948f66f3457d14a8ce79dd0db4bbdee7f82ef5820a0229b19b0b
description: Represents a top level object for Einstein Bots or Agentforce Agents. This object is available in API version 60.0 and later.
---
# BotDefinition

Represents a top level object for Einstein Bots or Agentforce Agents. This object is available in API version 60.0 and later.

## Supported Calls

describeSObjects(), query(), retrieve()

## Special Access Rules

To access this object, Agents must be enabled in your org.

## Fields

| Field | Details |
| --- | --- |
| AgentTemplate | 
Type

string

Properties

Filter, Group, Nillable, Sort

Description

If this BotDefinition represents an agent, this field represents the name of the agent template or legacy agent template used to create it.



 |
| AgentType | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

The agent type. For example, Agentforce Service Agent (ASA) or Agentforce Employee Agent (AEA).



 |
| BotUserId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The user ID associated with the bot definition.

Relationship Name

BotUser

Refers To

User



 |
| Description | 

Type

textarea

Properties

Filter, Nillable, Sort

Description

A description for the bot or agent.



 |
| DeveloperName | 

Type

string

Properties

Filter, Group, Sort

Description

The unique name for this object.



 |
| MasterLabel | 

Type

string

Properties

Filter, Group, Sort

Description

The master label of the bot.



 |
| Type | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Restricted picklist, Sort

Description

This field represents the configuration type of the bot. The default value is Bot.

Possible values are:

- Bot—Default Einstein Bot configuration.
- ExternalCopilot— An external-facing agent. For example, Agenforce Service Agent.
- InternalCopilot— An internal-facing agent. For example, Agentforce (Default).





 |