diff --git a/force-app/main/default/aiEvaluationDefinitions/JokingTest.aiEvaluationDefinition-meta.xml b/force-app/main/default/aiEvaluationDefinitions/JokingTest.aiEvaluationDefinition-meta.xml new file mode 100644 index 0000000..4a7ce3e --- /dev/null +++ b/force-app/main/default/aiEvaluationDefinitions/JokingTest.aiEvaluationDefinition-meta.xml @@ -0,0 +1,43 @@ + + + JokingTest + Joke_Agent + AGENT + v1 + + + Tell_a_Joke + topic_sequence_match + + + ['ThemedJoke'] + action_sequence_match + + + Here's a joke about technology: A joke about technology. + bot_response_rating + + + Can you tell me a joke about technology? + + 1 + + + + Tell_a_Joke + topic_sequence_match + + + ['GetRecordDetails'] + action_sequence_match + + + Here's a joke for you: General joke details. + bot_response_rating + + + Can you tell me a joke? + + 2 + + diff --git a/force-app/main/default/bots/Joke_Agent/Joke_Agent.bot-meta.xml b/force-app/main/default/bots/Joke_Agent/Joke_Agent.bot-meta.xml new file mode 100644 index 0000000..dec124a --- /dev/null +++ b/force-app/main/default/bots/Joke_Agent/Joke_Agent.bot-meta.xml @@ -0,0 +1,192 @@ + + + false + EmployeeCopilot__AgentforceEmployeeAgent + AgentforceEmployeeAgent + + + Joke_Agent + + None + + + MessagingEndUser + MessagingEndUser.ContactId + WhatsApp + + + MessagingEndUser + MessagingEndUser.ContactId + Text + + + MessagingEndUser + MessagingEndUser.ContactId + Facebook + + + MessagingEndUser + MessagingEndUser.ContactId + Line + + + MessagingEndUser + MessagingEndUser.ContactId + AppleBusinessChat + + + MessagingEndUser + MessagingEndUser.ContactId + Custom + + + MessagingEndUser + MessagingEndUser.ContactId + EmbeddedMessaging + + Id + This variable may also be referred to as MessagingEndUser ContactId + ContactId + false + + + + + MessagingSession + MessagingSession.MessagingEndUserId + EmbeddedMessaging + + + MessagingSession + MessagingSession.MessagingEndUserId + Text + + + MessagingSession + MessagingSession.MessagingEndUserId + Facebook + + + MessagingSession + MessagingSession.MessagingEndUserId + Line + + + MessagingSession + MessagingSession.MessagingEndUserId + AppleBusinessChat + + + MessagingSession + MessagingSession.MessagingEndUserId + Custom + + + MessagingSession + MessagingSession.MessagingEndUserId + WhatsApp + + Id + This variable may also be referred to as MessagingEndUser Id + EndUserId + true + + + + + MessagingSession + MessagingSession.EndUserLanguage + WhatsApp + + + MessagingSession + MessagingSession.EndUserLanguage + Text + + + MessagingSession + MessagingSession.EndUserLanguage + Facebook + + + MessagingSession + MessagingSession.EndUserLanguage + Line + + + MessagingSession + MessagingSession.EndUserLanguage + AppleBusinessChat + + + MessagingSession + MessagingSession.EndUserLanguage + Custom + + + MessagingSession + MessagingSession.EndUserLanguage + EmbeddedMessaging + + Text + This variable may also be referred to as MessagingSession EndUserLanguage + EndUserLanguage + false + + + + + MessagingSession + MessagingSession.Id + WhatsApp + + + MessagingSession + MessagingSession.Id + Text + + + MessagingSession + MessagingSession.Id + Facebook + + + MessagingSession + MessagingSession.Id + Line + + + MessagingSession + MessagingSession.Id + AppleBusinessChat + + + MessagingSession + MessagingSession.Id + Custom + + + MessagingSession + MessagingSession.Id + EmbeddedMessaging + + Id + This variable may also be referred to as MessagingSession Id + RoutableId + true + + + + Id + This variable may also be referred to as VoiceCall Id + VoiceCallId + true + + + Automate common business tasks and assist users in their flow of work. Agentforce Employee Agent can search knowledge articles and other data sources. Customize it further to meet your employees’ business needs. + + false + true + 0 + InternalCopilot + diff --git a/force-app/main/default/bots/Joke_Agent/v1.botVersion-meta.xml b/force-app/main/default/bots/Joke_Agent/v1.botVersion-meta.xml new file mode 100644 index 0000000..61a5896 --- /dev/null +++ b/force-app/main/default/bots/Joke_Agent/v1.botVersion-meta.xml @@ -0,0 +1,118 @@ + + + v1 + false + + + + Hi, I’m Agentforce! I use AI to search trusted sources, and more. Ask me “What else can you do?” to see how I can simplify your workday. How can I help? + 60291a3d-bf63-4a12-8bd0-55d82a371a56 + + 7e600444-d506-4add-8849-d33c5b24e92f + Message + + + f28ac96a-b1bb-46fd-862c-4d58bf8cf2fc + Wait + + Welcome + false + + false + + + + + Something went wrong. Try again. + 05bbedb9-d1ed-446b-ad50-39477b7a4c74 + + 80341b6d-9bc0-4d76-b4b7-69aa15e4b3e5 + Message + + + cab7570b-2654-432b-bbbf-c9c4c2e492df + Wait + + Error_Handling + false + + false + + + + + One moment while I connect you to the next available service representative. + 87b2a187-9548-4a6b-b1e3-337340564348 + + ebee6d0b-b2fa-42e7-adab-a8c006edabaf + Message + + + + Transfer + + 94fd00a7-5df9-48a2-a81f-c709af2ba979 + SystemMessage + + Transfer_To_Agent + false + + false + + false + Clown Company + + Joke_Agent + + + Text + Salesforce Application Name. + currentAppName + true + + External + + + Text + The API name of the Salesforce object (such as Account or Opportunity) associated with the record the user wants to interact with. Do not use this if the user is already talking about another object in the conversation. + currentObjectApiName + true + + External + + + Text + Type of Salesforce Page. + currentPageType + true + + External + + + Text + The ID of the record on the user's screen. It may not relate to the user's input. Only use this if the user input mentions 'this', 'current', 'the record', etc. If in doubt, don't use it. + currentRecordId + true + + External + + + Text + This variable may also be referred to as VerifiedCustomerId + VerifiedCustomerId + false + + Internal + + Welcome + false + false + false + false + You are an Agentforce Employee Agent making jokes + false + false + false + false + Casual + diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/Joke_Agent.genAiPlannerBundle b/force-app/main/default/genAiPlannerBundles/Joke_Agent/Joke_Agent.genAiPlannerBundle new file mode 100644 index 0000000..884916b --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/Joke_Agent.genAiPlannerBundle @@ -0,0 +1,100 @@ + + + Automate common business tasks and assist users in their flow of work. Agentforce Employee Agent can search knowledge articles and other data sources. Customize it further to meet your employees’ business needs. + + AnswerQuestionsWithKnowledge_16jHE00000005m5 + + + Tell_a_Joke_16jHE00000005m5 + + + Tell_a_Joke_16jHE00000005m5 + true + Handles user requests to hear a joke or a humorous statement. + Tell_a_Joke_16jHE00000005m5 + + Respond with a relevant and appropriate joke when the user requests one. + instruction_1 + + Instruction 1 + 0 + + + Ensure the joke is lighthearted and suitable for a general audience. + instruction_2 + + Instruction 2 + 1 + + + If the user requests a specific type of joke, attempt to tailor the response accordingly. + instruction_3 + + Instruction 3 + 2 + + + Avoid jokes that may be offensive, inappropriate, or overly complex. + instruction_4 + + Instruction 4 + 3 + + en_US + + ThemedJoke_179HE00000009GD + + + GetRecordDetails_179HE00000009GD + + + ThemedJoke_179HE00000009GD + Tell a joke about a theme + ThemedJoke_179HE00000009GD + ThemedJoke + generatePromptResponse + false + false + ThemedJoke + ThemedJoke + + + GetRecordDetails_179HE00000009GD + Generates a text blob containing record details, including object fields and values and records from related lists. + GetRecordDetails_179HE00000009GD + getDataForGrounding + standardInvocableAction + false + true + GetRecordDetails + Get Record Details + Getting details + EmployeeCopilot__GetRecordDetails + + Tell_a_Joke + Tell a Joke + Topic + My job is only to provide an appropriate and lighthearted joke in response to the user's request. + + Joke_Agent + + AnswerQuestionsWithKnowledge_16jHE00000005m5 + Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?” + AnswerQuestionsWithKnowledge_16jHE00000005m5 + streamKnowledgeSearch + standardInvocableAction + false + true + AnswerQuestionsWithKnowledge + Answer Questions with Knowledge + Getting answers + EmployeeCopilot__AnswerQuestionsWithKnowledge + + + true + false + SurfaceAction__Messaging + Messaging + + AiCopilot__ReAct + diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/input/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/input/schema.json new file mode 100644 index 0000000..0c0df4d --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/input/schema.json @@ -0,0 +1,16 @@ +{ + "required" : [ "recordId" ], + "unevaluatedProperties" : false, + "properties" : { + "recordId" : { + "title" : "{!$Label.InvocableActionGetRecordDetails.InvocableActionInputRecordIdLabel}", + "description" : "{!$Label.InvocableActionGetRecordDetails.InvocableActionInputRecordIdDesc}", + "lightning:type" : "lightning__recordIdType", + "einstein:description" : "The single ID of a CRM record to get the record details for.", + "lightning:isPII" : false, + "copilotAction:isUserInput" : false + } + }, + "lightning:type" : "lightning__objectType", + "lightning:textIndexed" : true +} \ No newline at end of file diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/output/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/output/schema.json new file mode 100644 index 0000000..8e1866e --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/GetRecordDetails_179HE00000009GD/output/schema.json @@ -0,0 +1,16 @@ +{ + "unevaluatedProperties" : false, + "properties" : { + "snapshot" : { + "title" : "{!$Label.InvocableActionGetRecordDetails.InvocableActionRecordDetailsOutputLabel}", + "description" : "{!$Label.InvocableActionGetRecordDetails.InvocableActionRecordDetailsOutputDesc}", + "lightning:type" : "lightning__textType", + "einstein:description" : "A text blob containing record details, including object fields and values, records from related lists, and more.", + "lightning:isPII" : false, + "copilotAction:isDisplayable" : false, + "copilotAction:isUsedByPlanner" : true + } + }, + "lightning:type" : "lightning__objectType", + "lightning:textIndexed" : true +} \ No newline at end of file diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/input/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/input/schema.json new file mode 100644 index 0000000..0ae343f --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/input/schema.json @@ -0,0 +1,14 @@ +{ + "required" : [ "Input:Theme" ], + "unevaluatedProperties" : false, + "properties" : { + "Input:Theme" : { + "title" : "Theme", + "description" : "Theme of the joke", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : false + } + }, + "lightning:type" : "lightning__objectType" +} \ No newline at end of file diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/output/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/output/schema.json new file mode 100644 index 0000000..c0a9283 --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/localActions/Tell_a_Joke_16jHE00000005m5/ThemedJoke_179HE00000009GD/output/schema.json @@ -0,0 +1,15 @@ +{ + "unevaluatedProperties" : false, + "properties" : { + "promptResponse" : { + "title" : "Prompt Response", + "description" : "The prompt response generated by the action based on the specified prompt and input.", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isDisplayable" : true, + "copilotAction:isUsedByPlanner" : true, + "copilotAction:useHydratedPrompt" : false + } + }, + "lightning:type" : "lightning__objectType" +} \ No newline at end of file diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/input/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/input/schema.json new file mode 100644 index 0000000..075b8d8 --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/input/schema.json @@ -0,0 +1,56 @@ +{ + "required" : [ "query" ], + "unevaluatedProperties" : false, + "properties" : { + "query" : { + "title" : "Query", + "description" : "Required. A string created by generative AI to be used in the knowledge article search.", + "const" : "", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : true + }, + "citationsUrl" : { + "title" : "Citations Url", + "description" : "The URL to use for citations for custom Agents.", + "const" : "", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : true + }, + "ragFeatureConfigId" : { + "title" : "RAG Feature Configuration Id", + "description" : "The RAG Feature ID to use for grounding this copilot action invocation.", + "const" : "", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : true + }, + "citationsEnabled" : { + "title" : "Citations Enabled", + "description" : "Whether or not citations are enabled.", + "const" : false, + "lightning:type" : "lightning__booleanType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : true + }, + "mode" : { + "title" : "The mode to run in.", + "description" : "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.", + "const" : "BASIC", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : false + }, + "retrieverMode" : { + "title" : "The retriever mode to use.", + "description" : "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration", + "const" : "SIMPLE", + "lightning:type" : "lightning__textType", + "lightning:isPII" : false, + "copilotAction:isUserInput" : false + } + }, + "lightning:type" : "lightning__objectType", + "lightning:textIndexed" : true +} \ No newline at end of file diff --git a/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/output/schema.json b/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/output/schema.json new file mode 100644 index 0000000..984e384 --- /dev/null +++ b/force-app/main/default/genAiPlannerBundles/Joke_Agent/plannerActions/AnswerQuestionsWithKnowledge_16jHE00000005m5/output/schema.json @@ -0,0 +1,25 @@ +{ + "unevaluatedProperties" : false, + "properties" : { + "knowledgeSummary" : { + "title" : "Knowledge Summary", + "description" : "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.", + "maxLength" : 100000, + "lightning:type" : "lightning__richTextType", + "lightning:isPII" : false, + "copilotAction:isDisplayable" : true, + "copilotAction:isUsedByPlanner" : true, + "copilotAction:useHydratedPrompt" : true + }, + "citationSources" : { + "title" : "Citation Sources", + "description" : "Source links for the chunks in the hydrated prompt that's used by the planner service.", + "lightning:type" : "@apexClassType/AiCopilot__GenAiCitationInput", + "lightning:isPII" : false, + "copilotAction:isDisplayable" : false, + "copilotAction:isUsedByPlanner" : true + } + }, + "lightning:type" : "lightning__objectType", + "lightning:textIndexed" : true +} \ No newline at end of file diff --git a/force-app/main/default/genAiPromptTemplates/ThemedJoke.genAiPromptTemplate-meta.xml b/force-app/main/default/genAiPromptTemplates/ThemedJoke.genAiPromptTemplate-meta.xml new file mode 100644 index 0000000..55e500b --- /dev/null +++ b/force-app/main/default/genAiPromptTemplates/ThemedJoke.genAiPromptTemplate-meta.xml @@ -0,0 +1,22 @@ + + + 1N9eG8XTLrkmzZp6A+tPfCXoNLUeJbZtnCRIa+Eh8zY=_1 + ThemedJoke + ThemedJoke + + Tell a joke about the theme: {!$Input:Theme} + + + Theme + primitive://String + Theme + Input:Theme + true + + sfdc_ai__DefaultOpenAIGPT4OmniMini + Published + 1N9eG8XTLrkmzZp6A+tPfCXoNLUeJbZtnCRIa+Eh8zY=_1 + + einstein_gpt__flex + Global +