---
schema_version: "1"
id: 1551836dccd814c41242a365e05dcb415d46e2dbfb4a646440308aa5a6ad6c58
title: GenAiFunctionDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_genaifunctiondefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_genaifunctiondefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 58e37abcbd1f64cba9ef8d99f36f2e6a81fc878537fe70993bac702ed7456387
description: Represents an agent action. This object is available in API version 60.0 and later.
---
# GenAiFunctionDefinition

Represents an agent action. This object is available in API version 60.0 and later.

## Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

## Special Access Rules

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

## Fields

| Field | Details |
| --- | --- |
| Description | 
Type

textarea

Properties

Create, Update

Description

A description explaining the general purpose and domain of the action.



 |
| DeveloperName | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The unique name for this object.



 |
| InvocationTarget | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

Target invocation used by invocation operations.



 |
| InvocationTargetType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

Invocable action types used by invocation operations.

Possible values are:

- apex
- flow
- generatePromptResponse





 |
| IsConfirmationRequired | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether confirmation is required for this action.

The default value is false.



 |
| IsLocal | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

This field is a calculated field and is set to true if this action is an edited version of a standard action.

The default value is false.



 |
| Language | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The language of the GenAiFunctionDefinition. The value for this field is the language value of the org.



 |
| LocalDeveloperName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The unique name for this action within a topic.



 |
| MasterLabel | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The master label for the generative AI action.



 |
| NamespacePrefix | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The namespace of the GenAiFunctionDefinition.



 |
| ParentId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID of the object that owns the action.

This field is a relationship field.

Relationship Name

Parent

Refers To

GenAiPlannerFunctionDef



 |
| PlannerId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The agent planner service for this action.

This field is a relationship field.

Relationship Name

Planner

Refers To

GenAiPlannerDefinition



 |
| PluginId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The agent topic for this agent action.

This field is a relationship field.

Relationship Name

Plugin

Refers To

GenAiPluginDefinition



 |
| Source | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort

Description

The optional source standard or custom action from which this action's configuration, including description, input, and output, is copied. If there's no value, the action is used only within the parent topic.



 |