Skip to main content

Swantide Prompting Guide - Analysis

Written by Engineering Swantide
Updated over 4 months ago

Disclaimer: Swantide is a generative AI platform, therefore it may be inaccurate, incomplete, or not applicable. The output from Swantide is based on the inputs provided by the user, and any content generated by Swantide must be thoroughly reviewed and verified by you prior to use. Do not implement, rely on, or act on AI-generated output without first confirming its accuracy and suitability for your specific needs.

Analysis

Analyze, Solution Design, Swagger, Best Practices

Analyzing Current State of the Org

Swantide’s data dictionary and AI Assistant are a really powerful way to understand the current state of your org. Knowing how the org is configured today is an important first step when building new solutions.

The Swantide data dictionary is a great resource for impact analysis. For every metadata component in your org, you can view business and technical descriptions, a list of metadata components that reference a given component, and a change log.

The list of references in particular is one of our most used features. You can look in the documentation and see all metadata components of a certain type, or find a given metadata component, and see all of the other metadata components that reference it by type.

By looking at the references, you can answer questions like:

  • What flows touch the Account object, as well as their documentation

  • What validation rules reference Opportunity Stage, as well as their documentation

Compiling these sorts of lists is often the first step of impact analysis, as well as understanding the current state of the org.

Note: We often see our users wanting to filter the references beyond Salesforce metadata types that references it. Examples include:

  • Show only the active flows that reference the Account object

  • Show only the flows that trigger on Account creation

  • Show only the flows that update Opportunity StageName, not simply reference it.

A common pitfall we see is users asking the AI Assistant directly to compile this list for them. This is a tricky request - Swantide has created documents for every metadata component in the org, as well as version history for the last 90 days. This means that at any time there are tens of thousands to hundreds of thousands of documents Swantide maintains as the context of your org.

When you ask a question, Swantide first identifies the documents needed as context to answer the question. For performance reasons, the Swantide AI Assistant quickly identifies 10 metadata components relevant to answer your question, and uses that as context. Expect the AI Assistant to give you a representative sample rather than an exhaustive list. This is common across LLMs - consider asking ChatGPT to compile a list of every Salesforce Administrator job. It’s not going to be able to analyze and pull every job posting with 1 prompt - rather, it will provide a representative sample.

Therefore, the best way to compile these types of lists currently is to use the data dictionary, which supports filtering by metadata component types, and continue investigation from there. We are about to release a ‘deep research’ function for the AI Assistant that would analyze all of the metadata in your org to answer questions like the ones shown above - when the feature is released, please allow some time for Swantide to complete this analysis.

Sample Prompts & Examples

I need to determine all of the flows that trigger when a Case is created (Note: If you ask this question directly to the AI Assistant, expect to get a representative sample and not an exhaustive list). If you need to get an exhaustive list, follow these steps:

  1. Go to the Documentation tab, which shows all of the metadata components in your org. Find the Case object (note that there will likely be hundreds of components if you just search for Case - make sure you filter to the CustomObject metadata type, then search for Case)

  2. Go to ‘References’, and ‘Components that Reference Case’. Filter this list to the flows, and you will have a list of every flow that references the Case object.

  3. Click into each flow (the fastest way to do this is often clicking into a new tab). Review the documentation of each, including the active/inactive status.

  4. If you have follow up questions after reading the documentation, ask them to the AI Assistant.

See this video for guidance through this example.

Solution Design & Time Estimates

You can also use the Swantide AI Admin to write solution design documents. Imagine we want to take the BRD that was generated previously and view a solution design. You can click ‘Start new AI Admin task’, which copies and pastes the output. Make some minor modifications to the task goal to specify we want Swantide to write a solution design document, and it will write the TDD.

Note that the AI Admin will also propose the specific metadata components to build as part of this. This feature is still in Beta, but we have seen really good results from the technical design document generation

Swantide will also provide time estimates for the tasks created to the AI Admin. The time estimates are reflective of how long it takes to both write the solution and component design documents, as well as doing the actual build in Salesforce.

See this video for guidance.

Best Practices

Swantide can also help you evaluate whether certain components were designed with best practices, and suggest potential enhancements. Consider the following sample prompt: “Assess the Swantide_Create_Swantide_Referral_Contact_Contact_Role_on_Opportunity_Creation flow. Provide recommendations to enhance the flow if there are opportunities to better adhere to best practices or improve the overall performance of the flow”

Swantide is able to provide suggestions for enhancing the performance of the flow. If you have specific best practices you want it to follow or things to optimize, specify that as part of the prompt.

Note: Swantide is not an org diagnostics tool. It is not currently designed to assess the entire org (e.g. review every apex classes and flag the ones that have security vulnerabilities). Swantide’s ‘deep research’ function, currently in beta, is designed to handle queries like this. For now, Swantide is best equipped to answer questions about a more narrow subset of metadata components, like reviewing specific flows or classes and suggesting enhancements

Did this answer your question?