mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 19:50:42 +08:00
87 lines
19 KiB
JSON
87 lines
19 KiB
JSON
{
|
||
"sections": [
|
||
"title",
|
||
"description",
|
||
"file_information",
|
||
"directory_location",
|
||
"fields",
|
||
"sub_types",
|
||
"wsdl_segment",
|
||
"declarative_metadata_sample_definition"
|
||
],
|
||
"title": "GenAiPlugin - Metadata API",
|
||
"description": "Represents an agent topic, which is a category of actions related to a particular job to be done by AI agents.",
|
||
"file_information": ".genAiPlugin",
|
||
"directory_location": "genAiPlugins",
|
||
"fields_columns": [
|
||
"type",
|
||
"description",
|
||
"required"
|
||
],
|
||
"fields": {
|
||
"aiPluginUtterances": {
|
||
"type": "AiPluginUtteranceDef[]",
|
||
"description": "A list of utterances that can be used to pick a topic during runtime."
|
||
},
|
||
"canEscalate": {
|
||
"type": "boolean",
|
||
"description": "Indicates whether this topic is eligible for escalation to a rep."
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "The description of the topic."
|
||
},
|
||
"developerName": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "Represents the API name of the topic. This name must be unique across all custom and customized topics. Can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores."
|
||
},
|
||
"genAiFunctions": {
|
||
"type": "GenAiPluginFunctionDef[]",
|
||
"description": "A list of functions in the topic."
|
||
},
|
||
"genAiPluginInstructions": {
|
||
"type": "GenAiPluginInstructionDef[]",
|
||
"description": "A list of instructions in the topic."
|
||
},
|
||
"language": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The language of the topic."
|
||
},
|
||
"masterLabel": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The master label for the topic."
|
||
},
|
||
"plannerField": {
|
||
"type": "string",
|
||
"description": "Represents the topic’s parent planner."
|
||
},
|
||
"pluginType": {
|
||
"type": "PluginType (enumeration of type string)",
|
||
"required": true,
|
||
"description": "Values are: Topic APICustomTopic"
|
||
},
|
||
"scope": {
|
||
"type": "string",
|
||
"description": "A specific job description for a topic."
|
||
}
|
||
},
|
||
"sub_types": {
|
||
"GenAiPluginFunctionDef": {
|
||
"functionName": {
|
||
"type": "string",
|
||
"required": true,
|
||
"description": "The API name of the function."
|
||
}
|
||
}
|
||
},
|
||
"wsdl_segment": "```xml\n<xsd:complexType name=\"AiPluginUtteranceDef\">\n <xsd:sequence>\n <xsd:element name=\"developerName\" type=\"xsd:string\"/>\n <xsd:element name=\"language\" type=\"xsd:string\"/>\n <xsd:element name=\"masterLabel\" type=\"xsd:string\"/>\n <xsd:element name=\"utterance\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\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=\"GenAiPluginFunctionDef\">\n <xsd:sequence>\n <xsd:element name=\"functionName\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:complexType name=\"GenAiPluginInstructionDef\">\n <xsd:sequence>\n <xsd:element name=\"description\" type=\"xsd:string\"/>\n <xsd:element name=\"developerName\" type=\"xsd:string\"/>\n <xsd:element name=\"language\" type=\"xsd:string\"/>\n <xsd:element name=\"masterLabel\" type=\"xsd:string\"/>\n <xsd:element name=\"sortOrder\" type=\"xsd:int\"/>\n </xsd:sequence>\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<xsd:simpleType name=\"PluginType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Topic\"/>\n <xsd:enumeration value=\"APICustomTopic\"/>\n </xsd:restriction>\n</xsd:simpleType>\n```",
|
||
"declarative_metadata_sample_definition": [
|
||
{
|
||
"description": "The following is an example of a GenAiPlugin component.",
|
||
"code": "<GenAiPlugin xmlns=\"http://soap.sforce.com/2006/04/metadata\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <description>Engages and interacts with the user about any request that could be CRM data related.\n This could be tasks such as identify and summarize records, answer queries, aggregate data,\n find and query objects, update records, or drafting and refining emails.</description>\n <developerName>General_CRM_Customized</developerName>\n <genAiFunctions>\n <functionName>EmployeeCopilot__IdentifyObjectByName</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__IdentifyRecordByName</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__QueryRecords</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__QueryRecordsWithAggregate</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__GetActivitiesTimeline</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__GetActivityDetails</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__GetRecordDetails</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__DraftOrReviseEmail</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__UpdateRecordFields</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__WebSearch</functionName>\n </genAiFunctions>\n <genAiFunctions>\n <functionName>EmployeeCopilot__AnswerQuestionsWithKnowledge</functionName>\n </genAiFunctions>\n <genAiPluginInstructions>\n <description>There are multiple available data retrieval functions at your disposal.\n You can use each one of them multiple times if needed. You should use functions\n as many times as necessary until you have all the data required to fulfill the request of the user.\n You can perform extra calls if you think you can get additional relevant information.</description>\n <developerName>therearemu0</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>therearemu</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>Do not declare your intent i.e. "I will now retrieve the data" - Just fetch the data.</description>\n <developerName>donotdecla1</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>donotdecla</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>Identify the object type (i.e., leads, opportunities, accounts) the user asks about.\n If unclear, confirm with the user and make a suggestion based on the query context and history.</description>\n <developerName>identifyth2</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>identifyth</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When only the name of a record is mentioned in the user request, you MUST call the IdentifyRecordByName action\n to get the necessary IDs.</description>\n <developerName>whenonlyth3</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenonlyth</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>Always call QueryRecords & QueryRecordsWithAggregate passing plain natural language english as input.\n You must Include the record ID in the input if available.</description>\n <developerName>alwayscall4</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>alwayscall</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>For accounts and contacts, combine the WebSearch action with the CRM data retrieval actions.\n MUST maintain citations in the answer.</description>\n <developerName>foraccount5</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>foraccount</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When a user asks for a summary or overview of a record, use GetRecordDetails to get an overview\n of the data of the record, then use other data retrieval actions as needed.</description>\n <developerName>whenausera6</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenausera</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When asked for a summary on multiple records, you must iterate over all record IDs and for each one,\n call GetRecordDetails.</description>\n <developerName>whenaskedf7</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenaskedf</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>If the user asks about activities you must call GetActivitiesTimeline.</description>\n <developerName>iftheusera8</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>iftheusera</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When providing the Activity Types for GetActivitiesTimeline, choose all the types that are relevant\n to the user request. Examples - User Request 1 - "What questions does John Doe have that need addressing?",\n Activity Types - "Call", "Email".\n User Request 2 - "What are the next activities for John Doe?", Activity Types - "Task", "Event".</description>\n <developerName>whenprovid9</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenprovid</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When asked about recent activities, you should provide the answer, starting from the last 30 days\n and ending on the current date, unless a specific date range is specified by the user.</description>\n <developerName>whenaskeda10</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenaskeda</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>When you are asked about a single Call, Meeting, Email or any other single specific activity, call GetActivityDetails.</description>\n <developerName>whenyouare11</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>whenyouare</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>Always use DraftOrReviseEmail when asked to generate a new email or revise a previously generated email.</description>\n <developerName>alwaysused12</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>alwaysused</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>ExtractRecordFieldsAndValuesFromUserInput must be called prior to UpdateRecordFields.</description>\n <developerName>extractrec13</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>extractrec</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>Avoid using structured lists, bullet points, or numbered lists. Instead, present the information in complete sentences\n and paragraphs as if you were writing an article or a report.</description>\n <developerName>avoidusing14</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>avoidusing</masterLabel>\n </genAiPluginInstructions>\n <genAiPluginInstructions>\n <description>User questions which can be answered by knowledge articles or documents. These questions usually want information,\n instructions or guidance, including but not limited to customer questions about company information, policies and frequently asked questions.</description>\n <developerName>userquesti15</developerName>\n <language xsi:nil=\"true\"/>\n <masterLabel>userquesti</masterLabel>\n </genAiPluginInstructions>\n <language>en_US</language>\n <masterLabel>General CRM Customized</masterLabel>\n <pluginType>Topic</pluginType>\n <scope>Your job is to interact and answer questions for the user about anything Salesforce or CRM data related,\n combining all data retrieval functions. i.e: QueryRecords(), GetRecordDetails(), GetActivitiesTimeline(), GetActivityDetails(), WebSearch()</scope>\n</GenAiPlugin>"
|
||
}
|
||
]
|
||
} |