Artificial Intelligence

Dive into the best practices for using Artificial Intelligence to manage your Salesforce implementation!

Wooly Reports

Table of Contents

Introduction

Metazoa has made a deep investment in Artificial Intelligence (AI) capabilities for managing complex Salesforce environments with our Snapshot product. While Salesforce has done a great job making AI accessible for end users in sales and marketing, Metazoa has focused on using AI to help Salesforce administrators, developers, and architects. These new AI capabilities complement our core mission of removing technical debt, documenting complexity, and optimizing security perfectly. This whitepaper presents the best practices for using all the new AI powered capabilities in our Snapshot product.

AI Security

Before going any farther, we need to be clear that AI is an optional part of Snapshot. You can change a setting in the Snapshot Preferences panel and prevent all usage of AI. Most of the applications in Snapshot still function as before, but without AI powered enhancements. We have done this because some companies may still be formulating their AI adoption policy. They may still have questions about AI usage and private data security. We share these concerns and welcome any questions that customers might have.

All that having been said, we believe that the benefits of using AI far outweigh the risks. Snapshot communicates directly with the OpenAI API. No other server or cloud is involved. OpenAI has extensive security and data protection policies in place. They have server information security certifications like Salesforce. The OpenAI API does not train on any prompts or grounding data.

Meanwhile, there are substantial security benefits to adopting AI. Customers can use AI to detect security problems, document compliance issues, discover technical debt, and enrich the asset quality. The Metazoa Security Policy document discusses our Zero Trust architecture and OpenAI API utilization in more detail:

https://www.metazoa.com/privacy-and-security/

AI Preferences

The Snapshot Preferences panel has AI specific settings. Navigate in product to the Snapshot menu and select Snapshot Preferences. Click on the third tab to edit the settings for OpenAI usage. At left, you can select three different options for OpenAI access:

  • Don’t Use OpenAI Services
  • Use Metazoa Free OpenAI Key
  • Use Your Corporate OpenAI Key

The best option is to enter your corporate OpenAI API Key. This lets you monitor usage and cost and ensure there are no service interruptions. We expect that the average cost for most Snapshot customers will be less than $100 per month. If you are using AI for massive org transformation, then some projects might be more expensive. Here is a link to get an OpenAI Key for your company:

https: //platform.openai.com/api-keys/
The Metazoa Free OpenAI Key is available to all customers. We limit use of this key for some activities that might result in massive usage. Here are the restrictions for the Metazoa Free OpenAI Key:

  • Calculating SOQL Filters: Unlimited Use
  • Explaining Migration Errors: Unlimited Use
  • Explaining Deployment Errors: Unlimited Use
  • Explaining Metadata Assets: Unlimited Use

  • Metadata Studio Prompt Engineering: 50 Uses / Individual
  • Metadata Studio Prompt Automation: 5 Uses / Individual
  • Intelligent Search Assistant: 100 Uses / Individual
  • Description Enrichment: 100 Uses / Individual

The checkbox to Mask Personal Information will scramble email addresses, phone numbers, and other fields with sensitive information. The information is unscrambled when the answer is returned.

Lastly, you can select the default OpenAI Model that you want to use. Our default is the economical gpt-4o-mini model. Use gpt-4o for better quality but with a smaller response window. The table below shows the different models that are available and the number of characters they support for questions and responses.

SOQL Filters

There are half a dozen places in Snapshot where the user can select data records. For example, when building a new dataset for data migration you might select parent objects. Records can be selected in many ways, but the most powerful option is to create a SOQL filter that finds the records. However, SOQL must conform to syntactical rules that are hard to remember. Now there is an option to type in a textual description of the record filter and have AI create the SOQL string. Simply click the Create Filter button and this brings up the interface below. You can interactively test the SOQL filter and make sure you are retrieving the desired record set.

Explaining Errors

The deployment errors returned by the Metadata API are often difficult to understand. Now, Snapshot can use AI to explain metadata deployment errors. In many situations, the Intelligent Assistant can both explain the error message and suggest the correct solution. In the screenshot below, metadata deployment errors were encountered, they are visible at lower right. Right-click and select Explain Error Messages to bring up the Error Explanation interface.

The data migration tools will also explain errors and suggest solutions. Just right-click the error message returned in the Migrate Datasets application to bring up the Error Explanation interface.

Explaining Assets

There are many places in Snapshot where the user can view metadata assets. There are XML assets like Custom Objects and text-based assets like Apex Classes. Now, when working with an asset, you can right click and select Explain Asset. This brings up the Explain Asset interface when you can select a prompt to run on the asset.

Each prompt can reveal different information about the asset. Click the Edit Prompts button to edit the default prompts or to create new ones based on your corporate policies. Here are the default prompts that are currently available:

  • Automated Documentation
  • Best Practices
  • Compliance Review
  • Functional Specification
  • Technical Debt

Metadata Studio

Metadata Studio is a powerhouse prompt engineering platform designed for org management and prompt automation. We supply 60 default prompts that Salesforce administrators and developers can run and customize. You can also create entirely new prompts and share them with your team. The first tab in metadata studio is easy to use. Just select any prompt at left and click the submit button at lower right.

The second tab is Prompt Engineering where you can create and modify these prompts. Prompts are composed of Messages, and Messages are composed of Content. A message can be created for the System, a User, or the Assistant. Prompts must start with the system message which is followed by any number of user and assistant messages in that order. Here is the content editing interface, below:

Content can be composed of metadata assets, data records, XML data, or text characters. Check the Required Content option to have the end user manually select the content information before continuing. Use the Assets Limits button to control what metadata assets and data records can be selected. For example, you might want the user to only select apex test classes, or certain types of data records.

The Dynamic Compression option will compress metadata assets and data records to fit within the token limits. This is accomplished by removing the least important parts of the asset. The Dynamic Documentation option will document all the elements in the metadata assets and data records for superior AI responses.

The last tab is Prompt Automation which allows a prompt to be applied to the entire org. For example, let’s say you have a prompt that creates node descriptions for a Flow. You can open that prompt on the Prompt Automation tab and run it on any number of selected Flows. Then all those changes can be opened in the deployment tooling. Here is another example. Let’s say you have a prompt that documents an Apex Class. In prompt automation you can document all of your Apex Classes and assemble this information into a single report table.

Here are the options on the right-hand side of the dialog for using automated prompts. All the output from the prompt can be combined into a Single Report, or you can save Multiple Reports, one for each prompt. The CSV output of each prompt can also be assembled into a Table Report. When the prompts contain metadata assets, this information can be saved as a local Developer Project. You can also deploy this information immediately with the Metadata Deployment option. Lastly, when the prompts contain data records, this information can be saved for Dataset Migration. In this manner, the powerful Snapshot tools for Metadata Deployment and Data Migration are directly integrated into the Prompt Engineering platform.

Intelligent Search

Our Intelligent Search application expands your team with an intelligent assistant that knows everything about your org. There are four main areas with selected grounding data that Intelligent Search can focus on:

Data Records

You can select any set of data records and connected children and ask Intelligent Search questions about them. For example, you could select an Account with connected Opportunities and Contacts and then ask about the next best steps to close one of the opportunities.

Object Schema

This option uses schema information for a selected object. For example, if you select an object, you could create Validation Rules, Custom Fields, Record Types, Picklists, SOQL Filters, or Formula Fields for that object.

Metadata Types

You can select any number of metadata assets and ask Intelligent Search questions about them. For example, you could select multiple Validation Rules and ask if there are conflicts between them. Or you could select a Flow and ask what it does or see if there are any security problems.

Org Management

This option lets you ask any kind of question about org management. Our extensive library of whitepapers and documentation is used for grounding data. The intelligent assistant can answer your questions and suggest strategies to solve org management problems.

Description Enrichment

Our latest application of AI technology can be found in the Description Enrichment report. This application gathers information from the 160 metadata types that have a description field. You can identify assets that need descriptions, and better yet, you can edit the descriptions right from the report, review the changes, and deploy the new descriptions immediately.

Description Enrichment also includes a sophisticated capability to generate new descriptions using AI. The end user can select from a variety of prompts or create their own. This allows different prompts to be used for each metadata type. Lastly, Description Enrichment allows the selection of multiple metadata assets and the automatic creation of descriptions for all of them. Again, these changes can be carefully reviewed and deployed with our deployment tooling inside the report.

Conclusion

There you have it. Metazoa wants to revolutionize org management with AI and prompt engineering. This white paper has discussed how we use AI with our administrative thinking partner Intelligent Search and our prompt engineering platform Metadata Studio to document the org, remove technical debt, and optimize security for administrators and developers. This technology is delivered in a Zero Trust security environment that companies can deploy with confidence.

🎉 Congratulations! 🎉

You’ve successfully completed the Metazoa Metadata Studio Certification Class. With the skills you’ve acquired, you’re now adept at harnessing the power of Metazoa’s Metadata Studio, seamlessly integrating artificial intelligence into Salesforce org management. You have earned you a certificate! Well done, and we wish you continued success in your future endeavors!