├── resources
└── logo.png
├── force-app
├── main
│ └── default
│ │ ├── pages
│ │ ├── sessionId.page
│ │ └── sessionId.page-meta.xml
│ │ ├── contentassets
│ │ ├── myorgbutlertransparent_720.asset
│ │ └── myorgbutlertransparent_720.asset-meta.xml
│ │ ├── classes
│ │ ├── SessionId.cls-meta.xml
│ │ ├── CallGitHubApi.cls-meta.xml
│ │ ├── CallRestApi.cls-meta.xml
│ │ ├── CallToolingApi.cls-meta.xml
│ │ ├── SearchWeb.cls-meta.xml
│ │ ├── AgentMemory.cls-meta.xml
│ │ ├── CallMetadataApi.cls-meta.xml
│ │ ├── CustomSettings.cls-meta.xml
│ │ ├── SearchWeb_Test.cls-meta.xml
│ │ ├── AgentMemory_Test.cls-meta.xml
│ │ ├── CallGitHubApi_Test.cls-meta.xml
│ │ ├── CallMetadataApi_Test.cls-meta.xml
│ │ ├── CallRestApi_Test.cls-meta.xml
│ │ ├── CallToolingApi_Test.cls-meta.xml
│ │ ├── CreatePlantUmlUrl.cls-meta.xml
│ │ ├── ExploreOrgSchema.cls-meta.xml
│ │ ├── QueryRecordsWithSoql.cls-meta.xml
│ │ ├── SessionId.cls
│ │ ├── CreatePlantUmlUrl_Test.cls-meta.xml
│ │ ├── ExploreOrgSchema_Test.cls-meta.xml
│ │ ├── LoadCustomInstructions.cls-meta.xml
│ │ ├── QueryRecordsWithSoql_Test.cls-meta.xml
│ │ ├── RetrieveVectorizeChunks.cls-meta.xml
│ │ ├── StoreCustomInstruction.cls-meta.xml
│ │ ├── LoadCustomInstructions_Test.cls-meta.xml
│ │ ├── NightlyMemoryConsolidation.cls-meta.xml
│ │ ├── RetrieveVectorizeChunks_Test.cls-meta.xml
│ │ ├── StoreCustomInstruction_Test.cls-meta.xml
│ │ ├── CallRestApi_Test.cls
│ │ ├── CallGitHubApi_Test.cls
│ │ ├── CreatePlantUmlUrl_Test.cls
│ │ ├── CustomSettings.cls
│ │ ├── SearchWeb_Test.cls
│ │ ├── CallMetadataApi_Test.cls
│ │ ├── CreatePlantUmlUrl.cls
│ │ ├── LoadCustomInstructions_Test.cls
│ │ ├── NightlyMemoryConsolidation.cls
│ │ ├── SearchWeb.cls
│ │ ├── StoreCustomInstruction.cls
│ │ ├── QueryRecordsWithSoql.cls
│ │ ├── StoreCustomInstruction_Test.cls
│ │ ├── CallGitHubApi.cls
│ │ ├── RetrieveVectorizeChunks_Test.cls
│ │ ├── CallRestApi.cls
│ │ ├── LoadCustomInstructions.cls
│ │ ├── AgentMemory_Test.cls
│ │ ├── QueryRecordsWithSoql_Test.cls
│ │ ├── ExploreOrgSchema_Test.cls
│ │ ├── AgentMemory.cls
│ │ ├── CallMetadataApi.cls
│ │ ├── CallToolingApi_Test.cls
│ │ ├── CallToolingApi.cls
│ │ └── RetrieveVectorizeChunks.cls
│ │ ├── tabs
│ │ └── Memory__c.tab-meta.xml
│ │ ├── genAiFunctions
│ │ ├── LoadCustomInstructions
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ └── LoadCustomInstructions.genAiFunction-meta.xml
│ │ ├── QueryRecordsWithSoql
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ └── QueryRecordsWithSoql.genAiFunction-meta.xml
│ │ ├── SearchVectorDatabase
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ └── SearchVectorDatabase.genAiFunction-meta.xml
│ │ ├── SearchWeb
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ └── SearchWeb.genAiFunction-meta.xml
│ │ ├── CallRestApi
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ └── CallRestApi.genAiFunction-meta.xml
│ │ ├── CallMetadataApi
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── CallMetadataApi.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ ├── CallToolingApi
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── CallToolingApi.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ ├── CallGitHubApi
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── CallGitHubApi.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ ├── CreatePlantUmlUrl
│ │ │ ├── input
│ │ │ │ └── schema.json
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ └── CreatePlantUmlUrl.genAiFunction-meta.xml
│ │ ├── ExploreOrgSchema
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── ExploreOrgSchema.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ ├── AnswerWithCurrentFile
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── AnswerWithCurrentFile.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ ├── AnswerWithRelatedFiles
│ │ │ ├── output
│ │ │ │ └── schema.json
│ │ │ ├── AnswerWithRelatedFiles.genAiFunction-meta.xml
│ │ │ └── input
│ │ │ │ └── schema.json
│ │ └── StoreCustomInstruction
│ │ │ ├── output
│ │ │ └── schema.json
│ │ │ ├── input
│ │ │ └── schema.json
│ │ │ └── StoreCustomInstruction.genAiFunction-meta.xml
│ │ ├── objects
│ │ ├── CustomSetting__c
│ │ │ ├── CustomSetting__c.object-meta.xml
│ │ │ └── fields
│ │ │ │ └── Value__c.field-meta.xml
│ │ └── Memory__c
│ │ │ ├── listViews
│ │ │ └── All.listView-meta.xml
│ │ │ ├── fields
│ │ │ ├── IsShared__c.field-meta.xml
│ │ │ └── Content__c.field-meta.xml
│ │ │ └── Memory__c.object-meta.xml
│ │ ├── externalCredentials
│ │ ├── TavilyApi.externalCredential-meta.xml
│ │ ├── VectorizeApi.externalCredential-meta.xml
│ │ └── GitHubApi.externalCredential-meta.xml
│ │ ├── cspTrustedSites
│ │ ├── Google.cspTrustedSite-meta.xml
│ │ ├── Atlassian.cspTrustedSite-meta.xml
│ │ ├── Github.cspTrustedSite-meta.xml
│ │ └── PlantUml.cspTrustedSite-meta.xml
│ │ ├── namedCredentials
│ │ ├── GitHubApi.namedCredential-meta.xml
│ │ ├── TavilyApi.namedCredential-meta.xml
│ │ └── VectorizeApi.namedCredential-meta.xml
│ │ ├── genAiPromptTemplates
│ │ ├── ConsolidateMemory.genAiPromptTemplate-meta.xml
│ │ ├── AnswerFromFile.genAiPromptTemplate-meta.xml
│ │ ├── AnswerFromVectorizeChunks.genAiPromptTemplate-meta.xml
│ │ └── AnswerFromRelatedFiles.genAiPromptTemplate-meta.xml
│ │ ├── layouts
│ │ └── Memory__c-Memory Layout.layout-meta.xml
│ │ ├── permissionsets
│ │ └── MyOrgButlerUser.permissionset-meta.xml
│ │ └── genAiPlugins
│ │ ├── AnswerWithInternet.genAiPlugin-meta.xml
│ │ ├── EditData.genAiPlugin-meta.xml
│ │ ├── AnswerWithFiles.genAiPlugin-meta.xml
│ │ └── AnswerWithData.genAiPlugin-meta.xml
└── jfwberg
│ └── lightweight-soap-util
│ └── package
│ ├── core
│ ├── classes
│ │ ├── Wsdl.cls-meta.xml
│ │ └── XmlWriter.cls-meta.xml
│ └── pages
│ │ ├── getSoapApiSessionId.page-meta.xml
│ │ └── getSoapApiSessionId.page
│ ├── wsdl
│ └── classes
│ │ ├── ApxWsdl.cls-meta.xml
│ │ └── MdtWsdl.cls-meta.xml
│ └── test
│ └── classes
│ ├── ApxWsdlTest.cls-meta.xml
│ ├── MdtWsdlTest.cls-meta.xml
│ ├── WsdlTest.cls-meta.xml
│ ├── XmlWriterTest.cls-meta.xml
│ ├── ApxWsdlTest.cls
│ └── XmlWriterTest.cls
├── scripts
├── config.sh
├── create-package-version.sh
└── create-scratch-org.sh
├── code-analyzer.yaml
├── unpackaged
└── main
│ └── default
│ ├── permissionsets
│ └── AgentAccess.permissionset-meta.xml
│ └── bots
│ └── MyOrgButler
│ └── v1.botVersion-meta.xml
├── .forceignore
├── config
└── project-scratch-def.json
├── LICENSE
├── .gitignore
├── code-analyzer-cleancode.csv
├── sfdx-project.json
└── README.md
/resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aquivalabs/my-org-butler/HEAD/resources/logo.png
--------------------------------------------------------------------------------
/force-app/main/default/pages/sessionId.page:
--------------------------------------------------------------------------------
1 | {!$Api.Session_ID}
--------------------------------------------------------------------------------
/scripts/config.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | DEV_HUB_ALIAS="DevHubAquiva"
3 | PACKAGE_NAME="my-org-butler"
4 | SCRATCH_ORG_ALIAS="my-org-butler_DEV"
--------------------------------------------------------------------------------
/force-app/main/default/contentassets/myorgbutlertransparent_720.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aquivalabs/my-org-butler/HEAD/force-app/main/default/contentassets/myorgbutlertransparent_720.asset
--------------------------------------------------------------------------------
/force-app/main/default/classes/SessionId.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 59.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallGitHubApi.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallRestApi.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 58.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallToolingApi.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/SearchWeb.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/AgentMemory.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallMetadataApi.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CustomSettings.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/SearchWeb_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/pages/sessionId.page-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 59.0
4 |
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/AgentMemory_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallGitHubApi_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallMetadataApi_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallRestApi_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallToolingApi_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CreatePlantUmlUrl.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/ExploreOrgSchema.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/QueryRecordsWithSoql.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/SessionId.cls:
--------------------------------------------------------------------------------
1 | public with sharing class SessionId {
2 | public String asString() {
3 | return (Test.isRunningTest()) ? UserInfo.getSessionId() : Page.sessionId.getContent().toString().substring(15);
4 | }
5 | }
--------------------------------------------------------------------------------
/force-app/main/default/tabs/Memory__c.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | Custom55: Books
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CreatePlantUmlUrl_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/ExploreOrgSchema_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 63.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/LoadCustomInstructions.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 61.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/QueryRecordsWithSoql_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/RetrieveVectorizeChunks.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/StoreCustomInstruction.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 61.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/core/classes/Wsdl.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/LoadCustomInstructions_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 61.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/NightlyMemoryConsolidation.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/RetrieveVectorizeChunks_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 64.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/StoreCustomInstruction_Test.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 61.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/core/classes/XmlWriter.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/wsdl/classes/ApxWsdl.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/wsdl/classes/MdtWsdl.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/test/classes/ApxWsdlTest.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/test/classes/MdtWsdlTest.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/test/classes/WsdlTest.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/test/classes/XmlWriterTest.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/core/pages/getSoapApiSessionId.page-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 62.0
4 |
5 |
--------------------------------------------------------------------------------
/force-app/jfwberg/lightweight-soap-util/package/core/pages/getSoapApiSessionId.page:
--------------------------------------------------------------------------------
1 | {!$Api.Session_ID}
--------------------------------------------------------------------------------
/code-analyzer.yaml:
--------------------------------------------------------------------------------
1 | engines:
2 | pmd:
3 | custom_rulesets: ['pmd-ruleset.xml']
4 | file_extensions: {
5 | "apex":[
6 | ".cls",
7 | ".trigger"
8 | ],
9 | "visualforce":[
10 | ".page",
11 | ".component"
12 | ],
13 | "xml":[
14 | ".xml"
15 | ]
16 | }
--------------------------------------------------------------------------------
/unpackaged/main/default/permissionsets/AgentAccess.permissionset-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MyOrgButler
5 | true
6 |
7 | false
8 |
9 |
10 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/LoadCustomInstructions/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "ignored" : {
5 | "title" : "ignored",
6 | "description" : "no input",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isUserInput" : false
10 | }
11 | },
12 | "lightning:type" : "lightning__objectType"
13 | }
--------------------------------------------------------------------------------
/force-app/main/default/objects/CustomSetting__c/CustomSetting__c.object-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | List
4 | Generic key-value configuration store for application settings
5 | false
6 |
7 | Public
8 |
9 |
--------------------------------------------------------------------------------
/force-app/main/default/objects/Memory__c/listViews/All.listView-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | All
4 | NAME
5 | Content__c
6 | IsShared__c
7 | CREATEDBY_USER
8 | CREATED_DATE
9 | Everything
10 |
11 |
12 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/QueryRecordsWithSoql/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "dynamicSoqlQuery" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "dynamicSoqlQuery" : {
6 | "title" : "SOQL Query",
7 | "description" : "Query to be executed as Dynamic SOQL",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/SearchVectorDatabase/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "content" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "content" : {
6 | "title" : "Question",
7 | "description" : "The question to search for in the company knowledge base.",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/SearchWeb/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "content" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "content" : {
6 | "title" : "Query",
7 | "description" : "A natural language search query to search the web for and get an answer for.",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/objects/CustomSetting__c/fields/Value__c.field-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Value__c
4 | The configuration value
5 | false
6 |
7 | 255
8 | true
9 | false
10 | Text
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallRestApi/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "responseBody" : {
5 | "title" : "Response Body",
6 | "description" : "Raw HTTP Response to be interpreted for Errors or Success",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallMetadataApi/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "responseBody" : {
5 | "title" : "Response Body",
6 | "description" : "Raw HTTP Response to be interpreted for Errors or Success",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallToolingApi/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "responseBody" : {
5 | "title" : "Response Body",
6 | "description" : "Raw HTTP Response to be interpreted for Errors or Success",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/SearchWeb/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "answer" : {
5 | "title" : "Answer",
6 | "description" : "A Natural Language Answer for the Query generated after doing a Web Search.",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallGitHubApi/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "responseBody" : {
5 | "title" : "Response Body",
6 | "description" : "Raw HTTP Response from GitHub API to be interpreted for success or errors",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CreatePlantUmlUrl/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "plantUmlText" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "plantUmlText" : {
6 | "title" : "PlantUML Text",
7 | "description" : "The PlantUML diagram definition in text format (e.g., @startuml\\nAlice->Bob : hello\\n@enduml)",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/ExploreOrgSchema/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "response" : {
5 | "title" : "Response as JSON",
6 | "description" : "Serialized JSON output of schema exploration",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true,
11 | "copilotAction:useHydratedPrompt" : false
12 | }
13 | },
14 | "lightning:type" : "lightning__objectType"
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/objects/Memory__c/fields/IsShared__c.field-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | IsShared__c
4 | false
5 | When checked, this memory is shared with all users in the organization. Otherwise, it is private to the creating user.
6 |
7 | false
8 | false
9 | Checkbox
10 |
11 |
--------------------------------------------------------------------------------
/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 |
4 | package.xml
5 | **appMenu
6 | **appSwitcher
7 | **setting
8 | **/profiles/*
9 | **/emailservices/*
10 | **/applications/standard__*
11 |
12 | # LWC configuration files
13 | **/jsconfig.json
14 | **/.eslintrc.json
15 |
16 | # LWC Jest
17 | **/__tests__/**
18 | **/tsconfig.json
19 |
20 | **/*.ts
21 |
22 | unsupported/
23 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CreatePlantUmlUrl/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "encodedImageUrl" : {
5 | "title" : "Diagram Image URL",
6 | "description" : "URL to the rendered PlantUML diagram image",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true,
11 | "copilotAction:useHydratedPrompt" : false
12 | }
13 | },
14 | "lightning:type" : "lightning__objectType"
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/externalCredentials/TavilyApi.externalCredential-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Custom
4 |
5 | ApiKey
6 | ApiKey
7 | NamedPrincipal
8 | 1
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/force-app/main/default/externalCredentials/VectorizeApi.externalCredential-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Custom
4 |
5 | Token
6 | Token
7 | NamedPrincipal
8 | 1
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/force-app/main/default/objects/Memory__c/fields/Content__c.field-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Content__c
4 | The detailed instruction or preference content that the AI agent should remember and apply in future interactions.
5 |
6 | 32768
7 | false
8 | false
9 | LongTextArea
10 | 5
11 |
12 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/AnswerWithCurrentFile/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "promptResponse" : {
5 | "title" : "Prompt Response",
6 | "description" : "Answer based on attachments from Opportunity and its Account.",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true,
11 | "copilotAction:useHydratedPrompt" : false
12 | }
13 | },
14 | "lightning:type" : "lightning__objectType"
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/AnswerWithRelatedFiles/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "promptResponse" : {
5 | "title" : "Prompt Response",
6 | "description" : "Answers based on attachments from Opportunity and its Account.",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true,
11 | "copilotAction:useHydratedPrompt" : false
12 | }
13 | },
14 | "lightning:type" : "lightning__objectType"
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/SearchVectorDatabase/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "content" : {
5 | "title" : "Answer",
6 | "description" : "AI-generated answer based on company knowledge sources. Use this as SOLE response. Dont reformulate and also dont format as quote. JUST RETURN THIS!",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/QueryRecordsWithSoql/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "resultOrException" : {
5 | "title" : "Result or Exception JSON",
6 | "description" : "JSON array of result records or aggregate results on success, or exception object on error",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : false,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true,
11 | "copilotAction:useHydratedPrompt" : false
12 | }
13 | },
14 | "lightning:type" : "lightning__objectType"
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/LoadCustomInstructions/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "customInstructions" : {
5 | "title" : "Custom Instructions",
6 | "description" : "Formatted string containing user context information including user details, timezone, organization info, current date/time, and user-specific communication preferences",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : true,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/StoreCustomInstruction/output/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "unevaluatedProperties" : false,
3 | "properties" : {
4 | "customInstructions" : {
5 | "title" : "Custom Instructions",
6 | "description" : "Updated formatted string containing user context information including user details, timezone, organization info, current date/time, and user-specific instructions from memory records",
7 | "lightning:type" : "lightning__textType",
8 | "lightning:isPII" : true,
9 | "copilotAction:isDisplayable" : false,
10 | "copilotAction:isUsedByPlanner" : true
11 | }
12 | },
13 | "lightning:type" : "lightning__objectType"
14 | }
--------------------------------------------------------------------------------
/force-app/main/default/contentassets/myorgbutlertransparent_720.asset-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | en_US
5 | myorgbutlertransparent_720
6 |
7 |
8 | VIEWER
9 |
10 |
11 |
12 |
13 | 1
14 | myorgbutler-transparent_720.png
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallRestApi_Test.cls:
--------------------------------------------------------------------------------
1 | @IsTest
2 | private class CallRestApi_Test {
3 |
4 | @IsTest
5 | private static void execute() {
6 | // Setup
7 | new HttpMock()
8 | .get('/services/rest').body('{ value : 3}').statusCodeOk()
9 | .mock();
10 |
11 | CallRestApi.Input input = new CallRestApi.Input();
12 | input.httpMethod = 'GET';
13 | input.urlIncludingParams = '/services/rest';
14 | input.requestBody = null;
15 |
16 | // Exercise
17 | List response = CallRestApi.execute(new List{ input });
18 |
19 | // Verify
20 | Assert.areEqual('{ value : 3}', response[0].responseBody);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/force-app/main/default/cspTrustedSites/Google.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | All
6 | *.google.com
7 | true
8 | false
9 | false
10 | false
11 | true
12 | false
13 | false
14 |
15 |
--------------------------------------------------------------------------------
/force-app/main/default/cspTrustedSites/Atlassian.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | All
6 | *.atlassian.net
7 | true
8 | false
9 | false
10 | false
11 | true
12 | false
13 | false
14 |
15 |
--------------------------------------------------------------------------------
/force-app/main/default/cspTrustedSites/Github.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | All
6 | https://github.com
7 | true
8 | false
9 | false
10 | false
11 | true
12 | false
13 | false
14 |
15 |
--------------------------------------------------------------------------------
/force-app/main/default/cspTrustedSites/PlantUml.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | All
6 | *.plantuml.com
7 | true
8 | false
9 | false
10 | false
11 | true
12 | false
13 | false
14 |
15 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallGitHubApi/CallGitHubApi.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Use this action to interact with GitHub repositories through the GitHub API. Supports operations like listing, creating, and managing issues, pull requests, and repositories.
4 | CallGitHubApi
5 | CallGitHubApi
6 | apex
7 | false
8 | true
9 | CallGitHubApi
10 | MyOrgButler: Call GitHub API
11 |
12 |
--------------------------------------------------------------------------------
/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "my-org-butler_DEV",
3 | "edition": "Partner Developer",
4 | "hasSampleData": true,
5 | "features": ["EnableSetPasswordInApi","Einstein1AIPlatform", "Chatbot"],
6 | "settings": {
7 | "lightningExperienceSettings": {
8 | "enableS1DesktopEnabled": true
9 | },
10 | "mobileSettings": {
11 | "enableS1EncryptedStoragePref2": false
12 | },
13 | "EinsteinGptSettings" : {
14 | "enableEinsteinGptPlatform": true
15 | },
16 | "botSettings": {
17 | "enableBots": true
18 | },
19 | "deploymentSettings": {
20 | "doesSkipAsyncApexValidation": true
21 | },
22 | "einsteinGptSettings": {
23 | "enableEinsteinGptPlatform": true
24 | },
25 | "agentPlatformSettings": {
26 | "enableAgentPlatform": true
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallGitHubApi_Test.cls:
--------------------------------------------------------------------------------
1 | @IsTest
2 | private class CallGitHubApi_Test {
3 |
4 | @IsTest
5 | private static void execute() {
6 | // Setup
7 | new HttpMock()
8 | .get('/repos/owner/repo').body('{ "name": "repo", "full_name": "owner/repo" }').statusCodeOk()
9 | .mock();
10 |
11 | CallGitHubApi.Input input = new CallGitHubApi.Input();
12 | input.urlIncludingParams = '/repos/owner/repo';
13 | input.httpMethod = 'GET';
14 | input.requestBody = null;
15 |
16 | // Exercise
17 | List response = CallGitHubApi.execute(new List{ input });
18 |
19 | // Verify
20 | Assert.areEqual('{ "name": "repo", "full_name": "owner/repo" }', response[0].responseBody);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CreatePlantUmlUrl_Test.cls:
--------------------------------------------------------------------------------
1 | @IsTest
2 | private class CreatePlantUmlUrl_Test {
3 |
4 | @IsTest
5 | private static void execute() {
6 | // Setup
7 | CreatePlantUmlUrl.Input input = new CreatePlantUmlUrl.Input();
8 | input.plantUmlText = '@startuml\nAlice->Bob : I am using hex\n@enduml';
9 |
10 | // Exercise
11 | List results =
12 | CreatePlantUmlUrl.execute(new List{ input });
13 |
14 | // Verify
15 | Assert.areEqual(1, results.size());
16 |
17 | String expectedUrl = 'http://www.plantuml.com/plantuml/png/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c';
18 | Assert.areEqual(expectedUrl, results[0].encodedImageUrl);
19 | }
20 | }
--------------------------------------------------------------------------------
/force-app/main/default/classes/CustomSettings.cls:
--------------------------------------------------------------------------------
1 | // Note: Small stateless helper - no constructor or state needed, static access is cleaner
2 | @SuppressWarnings('PMD.PreferRealObjectsOverStaticHelpers')
3 | public with sharing class CustomSettings {
4 |
5 | public static String valueFor(String settingName) {
6 | CustomSetting__c setting = CustomSetting__c.getValues(settingName);
7 |
8 | if (setting == null) {
9 | throw new ApplicationException('Custom Setting not found: ' + settingName);
10 | }
11 |
12 | return setting.Value__c;
13 | }
14 |
15 | @TestVisible
16 | private static void mock(String settingName, String value) {
17 | CustomSetting__c setting = new CustomSetting__c(
18 | Name = settingName,
19 | Value__c = value
20 | );
21 | upsert as user setting;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallMetadataApi/CallMetadataApi.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Use this action to read and create Metadata that cannot be handled by the Salesforce tooling API.
4 | When in doubt or the action returns an error use the SearchWeb action to find out which API support that type or activity.
5 | CallMetadataApi
6 | CallMetadataApi
7 | apex
8 | false
9 | true
10 | CallMetadataApi
11 | MyOrgButler: Call Metadata API
12 |
13 |
--------------------------------------------------------------------------------
/force-app/main/default/externalCredentials/GitHubApi.externalCredential-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Custom
4 |
5 | ApiKey
6 | ApiKey
7 | NamedPrincipal
8 | 1
9 |
10 |
11 | DefaultGroup
12 | Authorization
13 | AuthHeader
14 | Bearer {!$Credential.GitHubApi.ApiKey}
15 | 1
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/force-app/main/default/namedCredentials/GitHubApi.namedCredential-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | true
5 | Enabled
6 | false
7 |
8 |
9 | Url
10 | Url
11 | https://api.github.com
12 |
13 |
14 | GitHubApi
15 | ExternalCredential
16 | Authentication
17 |
18 | SecuredEndpoint
19 |
--------------------------------------------------------------------------------
/force-app/main/default/namedCredentials/TavilyApi.namedCredential-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | false
5 | Enabled
6 | false
7 |
8 |
9 | Url
10 | Url
11 | https://api.tavily.com
12 |
13 |
14 | TavilyApi
15 | ExternalCredential
16 | Authentication
17 |
18 | SecuredEndpoint
19 |
20 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/SearchWeb/SearchWeb.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Use this helper action whenever you need information that you dont have.
4 | - It leverage the Tavily API which does a natural language query to the web and return with a single natural language answer.
5 | SearchWeb
6 | SearchWeb
7 | apex
8 | false
9 | true
10 | SearchWeb
11 |
12 |
13 | output_answer
14 | answer
15 | output
16 |
17 | MyOrgButler: Search the Web
18 |
19 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/AnswerWithCurrentFile/AnswerWithCurrentFile.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Use the content and metadata of the current file to answer.
4 | - Respond concisely—prefer TL;DR followed by detail when summarizing.
5 | - If the file doesn’t contain the answer, say so clearly.
6 | - Allow follow-up questions by reusing earlier context in rewritten user input.
7 | AnswerWithCurrentFile
8 | AnswerFromFile
9 | generatePromptResponse
10 | false
11 | true
12 | AnswerWithCurrentFile
13 | Answer questions with current file
14 | Digesting file content
15 |
16 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/ExploreOrgSchema/ExploreOrgSchema.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | This action helps you explore Custom Objects, Fields, and Relationships in your org. Use the "summary" scope to discover available objects, "relationships" to see how an object connects to others, and "details" for a full list of fields and picklist values on a specific object. Only use "details" or "relationships" when you are sure the object exists.
4 | ExploreOrgSchema
5 | ExploreOrgSchema
6 | apex
7 | false
8 | true
9 | ExploreOrgSchema
10 | My Org Butler: Explore Org Schema
11 |
12 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/AnswerWithRelatedFiles/AnswerWithRelatedFiles.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Use attachments from the Opportunity and its Account to answer.
4 | - Prioritize relevance and avoid overexplaining.
5 | - If no file contains the answer, respond transparently.
6 | - Allow follow-up questions by reusing earlier context in rewritten Input:userQuestion
7 | AnswerWithRelatedFiles
8 | AnswerFromRelatedFiles
9 | generatePromptResponse
10 | false
11 | true
12 | AnswerWithRelatedFiles
13 | Answer questions with related files
14 | Digesting content of files…
15 |
16 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/ExploreOrgSchema/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "scope" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "objectFilter" : {
6 | "title" : "Object API Names",
7 | "description" : "Comma-separated list of object API names to investigate (used with 'details' and 'relationships' scopes).",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | },
12 | "namespaceFilter" : {
13 | "title" : "Namespace Filter",
14 | "description" : "Optional namespace prefix to limit objects by package",
15 | "lightning:type" : "lightning__textType",
16 | "lightning:isPII" : false,
17 | "copilotAction:isUserInput" : false
18 | },
19 | "scope" : {
20 | "title" : "Scope",
21 | "description" : "summary, details, relationships",
22 | "lightning:type" : "lightning__textType",
23 | "lightning:isPII" : false,
24 | "copilotAction:isUserInput" : false
25 | }
26 | },
27 | "lightning:type" : "lightning__objectType"
28 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Aquiva Labs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # This file is used for Git repositories to specify intentionally untracked files that Git should ignore.
2 | # If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore
3 | # For useful gitignore templates see: https://github.com/github/gitignore
4 |
5 | # Salesforce cache
6 | .sfdx/
7 | .sf/
8 | .localdevserver/
9 |
10 | #Snyk cache
11 | .dccache
12 |
13 | # IDEs
14 | .idea/
15 | .vscode/
16 | .vim-force.com/
17 | IlluminatedCloud/
18 | projectFilesBackup/
19 | # LWC VSCode autocomplete
20 | **/lwc/jsconfig.json
21 |
22 | # Logs
23 | logs
24 | *.log
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
29 | # Dependency directories
30 | node_modules/
31 |
32 | # Eslint cache
33 | .eslintcache
34 |
35 | # MacOS system files
36 | .DS_Store
37 |
38 | # Windows system files
39 | Thumbs.db
40 | ehthumbs.db
41 | [Dd]esktop.ini
42 | $RECYCLE.BIN/
43 | .prettierignore
44 | .prettierrc
45 | package-lock.json
46 | *.iml
47 |
48 | mdapi/
49 | /.idea/
50 | .pmdCache
51 |
52 | # Exclude the metadata retrieval staging area
53 | retrieval-staging/
54 |
55 | # Environment variables
56 | .env
--------------------------------------------------------------------------------
/force-app/main/default/classes/SearchWeb_Test.cls:
--------------------------------------------------------------------------------
1 | @IsTest
2 | private class SearchWeb_Test {
3 |
4 | @IsTest
5 | private static void happyPath() {
6 |
7 | // Setup
8 | SearchWeb.Answer expected = answerWith('Donald Trump was elected in November 2024.');
9 | new HttpMock()
10 | .post('/search').body(expected).statusCodeOk()
11 | .mock();
12 |
13 | SearchWeb.Query query = new SearchWeb.Query();
14 | query.content = 'Who is the 47th US president?';
15 |
16 | // Exercise
17 | Test.startTest();
18 | List response = SearchWeb.execute(new List{ query });
19 | Test.stopTest();
20 |
21 | // Verify
22 | Assert.areEqual(1, response.size());
23 | SearchWeb.Answer actual = response[0];
24 | Assert.areEqual(expected.answer, actual.answer);
25 | }
26 |
27 | // HELPER
28 |
29 | private static SearchWeb.Answer answerWith(String content) {
30 | SearchWeb.Answer result = new SearchWeb.Answer();
31 | result.answer = content;
32 | return result;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallGitHubApi/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "httpMethod", "urlIncludingParams" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "httpMethod" : {
6 | "title" : "HTTP Method",
7 | "description" : "The HTTP method to use: GET, POST, PUT, PATCH, DELETE",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | },
12 | "requestBody" : {
13 | "title" : "Request Body",
14 | "description" : "JSON payload for POST/PUT/PATCH requests. Required for creating/updating resources.",
15 | "lightning:type" : "lightning__textType",
16 | "lightning:isPII" : false,
17 | "copilotAction:isUserInput" : false
18 | },
19 | "urlIncludingParams" : {
20 | "title" : "GitHub API Endpoint",
21 | "description" : "The GitHub API endpoint path (e.g., /repos/{owner}/{repo}/issues)",
22 | "lightning:type" : "lightning__textType",
23 | "lightning:isPII" : false,
24 | "copilotAction:isUserInput" : false
25 | }
26 | },
27 | "lightning:type" : "lightning__objectType"
28 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CallRestApi/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "httpMethod", "urlIncludingParams" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "httpMethod" : {
6 | "title" : "HTTP Method",
7 | "description" : "The HTTP method to use: GET, POST, PUT, PATCH, DELETE",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | },
12 | "requestBody" : {
13 | "title" : "Request Body",
14 | "description" : "Payload data to be sent in the request body. Can be empty if there is no body.",
15 | "lightning:type" : "lightning__textType",
16 | "lightning:isPII" : false,
17 | "copilotAction:isUserInput" : false
18 | },
19 | "urlIncludingParams" : {
20 | "title" : "Endpoint URL",
21 | "description" : "The URL fragment of the REST endpoint starting with /. The Orgs base URL will be added",
22 | "lightning:type" : "lightning__textType",
23 | "lightning:isPII" : false,
24 | "copilotAction:isUserInput" : false
25 | }
26 | },
27 | "lightning:type" : "lightning__objectType"
28 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/AnswerWithRelatedFiles/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "Input:userQuestion", "Input:opportunity" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "Input:userQuestion" : {
6 | "title" : "userQuestion",
7 | "description" : "This is the original question from the user.\\nYou may rewrite it slightly to include implicit context from a previous question and answer, especially if the user asks a follow-up or refers back to previous content (e.g., \\\"and what about pricing?\\\").\\nOnly do this when it helps clarify intent and improves the response.",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : false
11 | },
12 | "Input:opportunity" : {
13 | "title" : "opportunity",
14 | "description" : "The currentRecord opportunity",
15 | "lightning:type" : "lightning__recordInfoType",
16 | "lightning:sObjectInfo" : {
17 | "apiName" : "Opportunity"
18 | },
19 | "lightning:isPII" : false,
20 | "copilotAction:isUserInput" : false
21 | }
22 | },
23 | "lightning:type" : "lightning__objectType"
24 | }
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/StoreCustomInstruction/input/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "required" : [ "summary", "instruction", "isShared" ],
3 | "unevaluatedProperties" : false,
4 | "properties" : {
5 | "summary" : {
6 | "title" : "Summary",
7 | "description" : "Brief summary of the learned preference or behavior pattern (max 80 characters)",
8 | "lightning:type" : "lightning__textType",
9 | "lightning:isPII" : false,
10 | "copilotAction:isUserInput" : true
11 | },
12 | "instruction" : {
13 | "title" : "Instruction",
14 | "description" : "Contextual instruction with situation trigger and specific guidance. Include context like 'When user asks about projects, query Salesforce data using...' (max 255 characters)",
15 | "lightning:type" : "lightning__textType",
16 | "lightning:isPII" : false,
17 | "copilotAction:isUserInput" : true
18 | },
19 | "isShared" : {
20 | "title" : "Is Shared",
21 | "description" : "Set to true to share this instruction with other users. Optional.",
22 | "lightning:type" : "lightning__booleanType",
23 | "copilotAction:isUserInput" : true
24 | }
25 | },
26 | "lightning:type" : "lightning__objectType"
27 | }
--------------------------------------------------------------------------------
/force-app/main/default/classes/CallMetadataApi_Test.cls:
--------------------------------------------------------------------------------
1 | @IsTest
2 | private class CallMetadataApi_Test {
3 |
4 | @IsTest
5 | private static void happyPath() {
6 |
7 | // Setup
8 | Exception unexpectedException = null;
9 | mockResponse();
10 |
11 | CallMetadataApi.MetadataDescription metadata = new CallMetadataApi.MetadataDescription();
12 | metadata.soapAction = 'createMetadata';
13 | metadata.typeName = 'RemoteSiteSetting';
14 | metadata.attributesJson = '{ "fullName" : "Spiegel", "url" : "https://www.spiegel.de", "isActive" : true }';
15 |
16 | // Exercise
17 | try {
18 | CallMetadataApi.execute(new List{ metadata });
19 | }
20 | catch(Exception ex) {
21 | unexpectedException = ex;
22 | }
23 |
24 |
25 | // Verify
26 | Assert.isNull(unexpectedException);
27 | }
28 |
29 | // HELPER
30 |
31 | private static void mockResponse() {
32 | HttpResponse response = new HttpResponse();
33 | response.setStatusCode(200);
34 | response.setBody('asdf');
35 |
36 | CallMetadataApi.mockedResponse = response;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/force-app/main/default/genAiFunctions/CreatePlantUmlUrl/CreatePlantUmlUrl.genAiFunction-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Use this action to convert PlantUML diagram text into an image URL
4 | - This action does not invent the diagram text but only encoded it into an URL
5 | - Render as an HTML A link with target="_blank" to the image.
6 | - The URL encoding this action uses only works with smaller diagrams. If you get passed a large diagram feel free to reduce its size by removing irrelevant detail like redundant or overly detailed field lists.
7 | - Maximum URL length: 2048 characters
8 | - Syntax must start with @startuml and end with @enduml
9 | - Use UTF-8 encoding for special characters
10 | CreatePlantUmlUrl
11 | CreatePlantUmlUrl
12 | apex
13 | false
14 | true
15 | CreatePlantUmlUrl
16 | MyOrgButler: Create PlantUML URL
17 |
18 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CreatePlantUmlUrl.cls:
--------------------------------------------------------------------------------
1 | // PMD False Positives: Agentforce requires Global
2 | @SuppressWarnings('PMD.AvoidGlobalModifier')
3 | global with sharing class CreatePlantUmlUrl {
4 | private static final String PLANTUML_URL_PREFIX = 'http://www.plantuml.com/plantuml/png/~h';
5 |
6 | @InvocableMethod(label='MyOrgButler: Render PlantUML Diagram' description='Converts PlantUML text notation into a rendered diagram image URL')
7 | global static List