Hey there! I'm Dylan, a Solution Engineer at Salesforce. I built this Lightning Web Component (LWC) app to help my fellow SEs (or anyone really) quickly create effective prompt templates for demos, POCs, and customer implementations.
As SEs, we're constantly asked to show off Prompt Builder capabilities, but creating good prompt templates from scratch takes time we don't always have. This app uses Agentforce AI to generate professional prompt templates that you can copy directly into Prompt Builder - no complex setup required.
- Demo Pressure: Customers want to see Prompt Builder in action, but building templates takes forever
- Template Quality: Generic templates don't showcase the real power of Agentforce
- Time Constraints: We need to focus on the business value, not template syntax
- Consistency: Every SE should have access to high-quality, tested templates
- AI-Powered Generation: Describe what you need in plain English, get a professional template
- SE-Tested Templates: Built with real customer scenarios in mind
- Copy & Paste Ready: No complex deployment - just copy to Prompt Builder and go
- Demo-Ready: Templates that actually impress customers and show real business value
- Modern Chat UI: Clean, responsive interface with distinct user/assistant messaging
- Smart Suggestions: Clickable prompt templates that populate the input box
- Real-time Generation: Instant AI-powered prompt creation
- Copy & Paste Workflow: One-click copy to clipboard with Prompt Builder integration
- SLDS2 Compliance: SLDS2 compliant!
force-app/main/default/lwc/ โโโ promptAssistantApp/ # Main app container โ โโโ promptAssistantApp.html # App layout and footer โ โโโ promptAssistantApp.js # App logic and state โ โโโ promptAssistantApp.css # App styling โโโ promptChatInterface/ # Chat interface โ โโโ promptChatInterface.html # Chat layout and input โ โโโ promptChatInterface.js # Chat logic and AI integration โ โโโ promptChatInterface.css # Chat styling โโโ messageItem/ # Individual message component โ โโโ messageItem.html # Message layout and avatars โ โโโ messageItem.js # Message logic and events โ โโโ messageItem.css # Message styling and avatars โโโ promptTemplateForm/ # Template management โโโ promptTemplateForm.html # Form layout โโโ promptTemplateForm.js # Form logic โโโ promptTemplateForm.css # Form styling graph TB subgraph "Salesforce Org" subgraph "Lightning Web Components" A[promptAssistantApp] --> B[promptChatInterface] A --> C[promptTemplateForm] B --> D[messageItem] end subgraph "Apex Controllers" E[PromptAssistantController] F[PromptTemplateController] end subgraph "Salesforce AI Services" G[Agentforce AI] H[Models API] end subgraph "Setup & Configuration" I[Einstein Prompt Studio] J[Prompt Builder] end end subgraph "User Workflow" K[User Input] --> B B --> E E --> G G --> H H --> B B --> C C --> L[Copy to Clipboard] C --> M[Open Prompt Builder] L --> N[Paste in Prompt Builder] M --> I I --> J end style A fill:#e1f5fe style B fill:#f3e5f5 style C fill:#e8f5e8 style G fill:#fff3e0 style I fill:#fce4ec - Salesforce org with API version 64.0+
- Access to Lightning Web Components
- Basic Salesforce development environment
-
Clone Repository
git clone <repository-url> cd promptAssistant
-
Deploy to Org
sf project deploy start
-
Enable Tab
- Navigate to Setup > Tabs
- Find "Prompt Assistant" tab
- Set "Default On" for desired profiles
- Add to App Launcher if desired
-
Access the App
- Use the Prompt Assistant tab
- Or navigate via App Launcher
- Start chatting with the AI assistant
- Open the App: Navigate to the Prompt Assistant tab
- Welcome Message: See the four suggestion buttons
- Click a Suggestion: Or type your own prompt request
- Generate Prompt: Click "Generate Prompt" button
- Review & Copy: Use the "Copy Template" button to copy to clipboard
- Open Prompt Builder: Click "Open Prompt Builder" to go to Setup
- Create Template: Paste the content and create your prompt template
- "Create a sales email prompt" - Sales outreach templates
- "Generate a case wrap-up prompt" - Customer service summaries
- "Build a campaign promo prompt" - Marketing campaign content
- "Design a call transcript analysis prompt" - Call center insights
-
Describe your need in natural language
-
Specify the context (sales, service, marketing, etc.)
-
Include details about your target audience
-
Mention any specific Salesforce objects or processes
-
System explanations
- โ Copy & Paste Integration: Direct integration with Prompt Builder via clipboard
- โ Template Categories: Organized by business function (Sales, Service, Marketing, etc.)
- โ Formatted Export: Structured template output with variables and instructions
- โ One-Click Setup Access: Direct link to Einstein Prompt Studio
- Template Library: Save and share custom prompts
- Analytics: Usage tracking and prompt effectiveness
- Multi-language Support: International prompt generation
- Batch Processing: Generate multiple templates at once
- Flow Builder: Direct prompt integration
- External Systems: API access for other platforms
Built with โค๏ธ for the Salesforce community
This app demonstrates modern LWC development practices, professional UI/UX design, and seamless integration with Salesforce's native AI capabilities through Agentforce.