Science of AI Prompts in Salesforce: The Prompt Lifecycle with GPTfy

What?

A Plain English explanation of how to write AI Prompts for Salesforce. A detailed step-by-step guide on the Prompt lifecycle for your CRM + GPT efforts.

Who?

Salesforce admins, business analysts, architects, product owners, and anyone who wants to tap their Salesforce + AI to its full potential.

Why?

Write better AI prompts. Accelerate Revenue. Slash Grunt work.

-> Win Friends, Influence People

What can you do with it?

Common use cases for Salesforce + AI include:

How?

Here are the steps to create your Prompt up and running

A visual roadmap for AI prompt improvement, Create a Prompt, Add Data Context,
Prompt Lifecycle for getting better results
  1. What’s the Purpose: Identify the Use Case and Expected Outcome

  2. Create a Prompt: Tell AI specifically what it should do

  3. Add Data Context: Provide Object/Field data to AI

  4. Salesforce Trust Layer: Enforce Data Privacy & Security

  5. Testing and Refining Prompts

  6. Publishing Prompts for Users

  7. Tracking Value and Usage

  8. Demo: Building a New Prompt

What's the Purpose: Identify Use Case and Expected Outcome

Defining clear expected outcomes is crucial when engineering prompts.
Manual/tedious activities such as analyzing text-generating summaries are good use cases.

A good rule of thumb is to consider use cases that you cannot typically automate with Flows, Reports, Triggers etc.

Evaluate areas like long text fields, case comments, and emails to identify use cases suited for summarization, recommendations, and more.

Whether generating account 360 views, drafting client emails, or extracting key info and actions from large text fields, be specific regarding the purpose and expected results.

Screenshot of the GPTfy application's Prompt Catalog page within Salesforce
GPTfy Salesforce AppExchange App: Prompt Catalog

GPTfy comes pre-packaged with prompts that address common use cases. These prompts can be used as-is or as templates to modify and suit your needs with simple clicks.

Create a Prompt: Tell AI specifically what it should do

Effective prompts provide clear instructions to the AI via plain English commands. They typically have the following:

  • Specificity: Provide clear, concise details on the exact information requested.

  • Formatting: Let AI know if you want outputs as a table, bulleted list, or paragraph summary.

The more specific details you include in the prompt, the better your AI generated results will be.

GPTfy gives users an intuitive prompt creation workflow to craft custom prompts tailored to different users and use cases across their Salesforce environment.

Instructional text for a Salesforce AppExchange app prompt labeled 'Account 360 Plus - GPTfy
GPTfy Salesforce AppExchange App: Prompt Instructions
  • Language: Specify the language your users expect the response in.

  • Length: State the length of the response. This is useful when updating a Salesforce field with the AI response.

  • Tone: Specify the tone of the generated content as friendly, formal, empathetic, etc. Especially. for content such as email drafts and case comments.

  • Examples: Share reference or mock inputs/outputs to help AI model the response style to your specifications.

  • Others: Typically, instructions may be required for compliance, legal or security policies.

AI Prompt Component, configuration panel for an AI Prompt Component,
GPTfy Salesforce AppExchange App: AI Prompt Components

Prompts components set parameters for action, tone, language, format, and others to ensure that the Prompt is modular and can be easily updated for complex requirements.

Bring Gen AI In Your Salesforce

Why spend thousands of dollars when you can get a Free trial of AI in your Salesforce securely and in compliance with regulations?

Get NowWatch Demos

Add Data Context: Provide Object/Field data to AI

AI needs contextual data to generate useful outputs. While basics like Account Name and Type may be included, consider extending prompts to related Opportunities, recent Case details, or pertinent activity from an email thread.

Provide more interconnected data points and unstructured data, with proper context for richer insights.

Bring in subject matter experts who can help identify what data to provide and validate the AI responses. This is crucial for user adoption and trust building of your AI solution.

For example, to generate a good Account 360 that includes an Account level summary, related opportunities, cases, and activities, provide relevant records and fields that help AI understand the full picture.

Here is a sample Data Context mapping for Account 360.

A configuration screen displaying context mapping for Salesforce objects, detailing their relationship fields,
GPTfy Salesforce AppExchange App: AI Data Context Mapping

GPTfy enables you to declaratively configure and bring data from your primary Salesforce object and related parent-child (or look-up relationship) objects.

So, that’s it for writing the prompt,
Stay tuned for Part 2; in that part, you will learn about
Salesforce Trust Layer: Enforce Data Privacy & Security

  • Testing and Refining Prompts
  • Publishing Prompts for Users
  • Tracking Value and Usage
  • Demo: Building a New Prompt

Let us know what you guys think, and what else we should discuss in part 2.

Resources

Saurabh Gupta

Saurabh Gupta

Saurabh is an Enterprise Architect and seasoned entrepreneur spearheading a Salesforce security and AI startup, with inventive contributions recognized by a patent.

Blogs you may find interesting