mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 19:50:42 +08:00
171 lines
13 KiB
JSON
171 lines
13 KiB
JSON
{
|
||
"sections": [
|
||
"title",
|
||
"description",
|
||
"file_information",
|
||
"fields",
|
||
"input_folder",
|
||
"output_folder",
|
||
"sub_types",
|
||
"wsdl_segment",
|
||
"declarative_metadata_sample_definition"
|
||
],
|
||
"title": "GenAiFunction - Metadata API",
|
||
"description": "Represents an agent action that can be added to an AI agent.",
|
||
"file_information": "GenAiFunction components have the suffix .genAiFunction and are stored in the genAiFunctions folder.\n\nGenAiFunction components can contain folders for the input and output schemas. Here’s an example component, showing the schema folders.\n\nSee the Input Folder and Output Folder sections for more information.",
|
||
"fields_columns": [
|
||
"type",
|
||
"description",
|
||
"required"
|
||
],
|
||
"fields": {
|
||
"description": {
|
||
"type": "string",
|
||
"description": "A description explaining the general purpose and domain of the action."
|
||
},
|
||
"invocationTarget": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Target invocation used by invocation operations."
|
||
},
|
||
"invocationTargetType": {
|
||
"type": "PlannerFunctionInvocableTargetType (enumeration of type string)",
|
||
"required": true,
|
||
"description": "Invocable action type used by invocation operations. Values are: api apex auraEnabled createCatalogItemRequest executeIntegrationProcedure externalService flow generatePromptResponse mcpTool namedQuery quickAction retriever runExpressionSet slack standardInvocableAction stub"
|
||
},
|
||
"isConfirmationRequired": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether confirmation is required for this action."
|
||
},
|
||
"isIncludeInProgressIndicator": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether to display the progress indicator for this action."
|
||
},
|
||
"mappingAttributes": {
|
||
"type": "GenAiPlannerAttr[]",
|
||
"description": "List of attributes for the planner."
|
||
},
|
||
"masterLabel": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The master label for the generative AI action."
|
||
},
|
||
"pluginField": {
|
||
"type": "string",
|
||
"description": "Represents the action’s parent topic."
|
||
},
|
||
"progressIndicatorMessage": {
|
||
"type": "string",
|
||
"description": "The progress message."
|
||
}
|
||
},
|
||
"input_folder": {
|
||
"required": {
|
||
"type": "array of strings",
|
||
"description": "A list of all the required properties in the input list."
|
||
},
|
||
"properties": {
|
||
"type": "object",
|
||
"description": "The parent object for all the properties associated with the input."
|
||
},
|
||
"{PROPERTY_NAME}": {
|
||
"type": "object",
|
||
"required": true,
|
||
"description": "Each property in the properties object must contain the API value corresponding to the input parameter."
|
||
},
|
||
"title": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The label for the property."
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "The description for the property."
|
||
},
|
||
"lightning:type": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Describes the type of input. This value should always be lightning__objectType."
|
||
},
|
||
"lightning:isPII": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether the property contains personally identifiable information."
|
||
},
|
||
"copilotAction:isUserInput": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether the property is presented as user input."
|
||
}
|
||
},
|
||
"output_folder": {
|
||
"properties": {
|
||
"type": "object",
|
||
"description": "The parent object for all the properties associated with the output."
|
||
},
|
||
"{PROPERTY_NAME}": {
|
||
"type": "object",
|
||
"required": true,
|
||
"description": "Each property in the properties object must contain the API value corresponding to the output parameter."
|
||
},
|
||
"title": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The label for the property."
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "The description for the property."
|
||
},
|
||
"lightning:type": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Describes the type of output. This value should always be lightning__objectType."
|
||
},
|
||
"lightning:isPII": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether the property contains personally identifiable information."
|
||
},
|
||
"copilotAction:isDisplayable": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether the property is displayable as output."
|
||
},
|
||
"copilotAction:isUsedByPlanner": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether the property is used by the agent planner. At least one output property must have this value as true or else the planner returns random responses."
|
||
}
|
||
},
|
||
"sub_types": {
|
||
"GenAiPlannerAttr": {
|
||
"description": {
|
||
"type": "string",
|
||
"description": "Description of the planner attribute."
|
||
},
|
||
"label": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Label for the planner attribute."
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Name of the planner attribute."
|
||
},
|
||
"parameterName": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The parameter name."
|
||
},
|
||
"parameterType": {
|
||
"type": "PlannerAttrMappingType (enumeration of type string)",
|
||
"required": true,
|
||
"description": "The parameter type. Values are: input output"
|
||
}
|
||
}
|
||
},
|
||
"wsdl_segment": "```xml\n<xsd:complexType name=\"GenAiFunction\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"developerName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"invocationTarget\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"invocationTargetType\" type=\"tns:PlannerFunctionInvocableTargetType\"/>\n <xsd:element name=\"isConfirmationRequired\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"isIncludeInProgressIndicator\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"language\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"localDeveloperName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"mappingAttributes\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerAttr\"/>\n <xsd:element name=\"masterLabel\" type=\"xsd:string\"/>\n <xsd:element name=\"progressIndicatorMessage\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"source\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"GenAiPlannerAttr\">\n <xsd:sequence>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"label\" type=\"xsd:string\"/>\n <xsd:element name=\"name\" type=\"xsd:string\"/>\n <xsd:element name=\"parameterName\" type=\"xsd:string\"/>\n <xsd:element name=\"parameterType\" type=\"tns:PlannerAttrMappingType\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:complexType name=\"GenAiPlannerBundle\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"agentGraph\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"agentGraphRef\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"agentScript\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"attributeMappings\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerAttrMapping\"/>\n <xsd:element name=\"botTemplate\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"capabilities\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"genAiFunctions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerFunctionDef\"/>\n <xsd:element name=\"genAiPlugins\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerFunctionDef\"/>\n <xsd:element name=\"localActionLinks\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerFunctionDef\"/>\n <xsd:element name=\"localTopicLinks\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerFunctionDef\"/>\n <xsd:element name=\"localTopics\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlugin\"/>\n <xsd:element name=\"masterLabel\" type=\"xsd:string\"/>\n <xsd:element name=\"plannerActions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiFunction\"/>\n <xsd:element name=\"plannerSurfaces\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:AiPlannerSurfaceDef\"/>\n <xsd:element name=\"plannerType\" type=\"tns:PlannerType\"/>\n <xsd:element name=\"ruleExpressionAssignments\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerRuleExprAsgn\"/>\n <xsd:element name=\"ruleExpressions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPlannerRuleExprDef\"/>\n <xsd:element name=\"voiceDefinition\" minOccurs=\"0\" type=\"tns:AiPlannerVoiceDef\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"GenAiPlugin\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"aiPluginUtterances\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:AiPluginUtteranceDef\"/>\n <xsd:element name=\"canEscalate\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"developerName\" type=\"xsd:string\"/>\n <xsd:element name=\"genAiFunctions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPluginFunctionDef\"/>\n <xsd:element name=\"genAiPluginInstructions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPluginInstructionDef\"/>\n <xsd:element name=\"language\" type=\"xsd:string\"/>\n <xsd:element name=\"localActionLinks\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiPluginFunctionDef\"/>\n <xsd:element name=\"localActions\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:GenAiFunction\"/>\n <xsd:element name=\"localDeveloperName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"masterLabel\" type=\"xsd:string\"/>\n <xsd:element name=\"pluginType\" type=\"tns:PluginType\"/>\n <xsd:element name=\"scope\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"source\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"Metadata\">\n <xsd:sequence>\n <xsd:element name=\"fullName\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:simpleType name=\"PlannerAttrMappingType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"input\"/>\n <xsd:enumeration value=\"output\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:simpleType name=\"PlannerFunctionInvocableTargetType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"apex\"/>\n <xsd:enumeration value=\"flow\"/>\n <xsd:enumeration value=\"standardInvocableAction\"/>\n <xsd:enumeration value=\"generatePromptResponse\"/>\n <xsd:enumeration value=\"externalService\"/>\n <xsd:enumeration value=\"quickAction\"/>\n <xsd:enumeration value=\"createCatalogItemRequest\"/>\n <xsd:enumeration value=\"api\"/>\n <xsd:enumeration value=\"apexRest\"/>\n <xsd:enumeration value=\"cdpMlPrediction\"/>\n <xsd:enumeration value=\"externalConnector\"/>\n <xsd:enumeration value=\"slack\"/>\n <xsd:enumeration value=\"namedQuery\"/>\n <xsd:enumeration value=\"executeIntegrationProcedure\"/>\n <xsd:enumeration value=\"auraEnabled\"/>\n <xsd:enumeration value=\"mcpTool\"/>\n <xsd:enumeration value=\"runExpressionSet\"/>\n <xsd:enumeration value=\"retriever\"/>\n <xsd:enumeration value=\"stub\"/>\n </xsd:restriction>\n</xsd:simpleType>\n```",
|
||
"declarative_metadata_sample_definition": [
|
||
{
|
||
"description": "The following is an example of a GenAiFunction component.",
|
||
"code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<GenAiFunction xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <description>get tracking information</description>\n <invocationTarget>TrackShipment</invocationTarget>\n <invocationTargetType>apex</invocationTargetType>\n <isConfirmationRequired>false</isConfirmationRequired>\n <masterLabel>get_tracking_info</masterLabel>\n</GenAiFunction>"
|
||
}
|
||
]
|
||
} |