This repository contains Agentforce templates and components for Life Sciences Cloud, providing comprehensive conversational AI capabilities for field sales representatives.
- Purpose: Generates on-demand daily briefings for field sales representatives
- Features: Visit schedules, priority accounts, conversation starters
- Location:
agentforce-components/daily-briefing/ - Topic Configuration: See Daily Briefing Topic Configuration
- Purpose: Analyzes provider affiliations to identify key relationships
- Features: Introduction paths, network analysis, relationship mapping
- Location:
agentforce-components/influencer-map/ - Topic Configuration: See Influencer Map Topic Configuration
- Purpose: Identifies next best customers for sales focus
- Features: Customer scoring, territory analysis, prediction models
- Location:
agentforce-components/get-nbc/ - Topic Configuration: See Next Best Customer Topic Configuration
- Purpose: Analyzes dictated or written free text notes following customer visits and updates structured CRM records
- Features: Voice note processing, structured data logging, medical inquiry creation, follow-up visit scheduling
- Components: Visit_Note_Processor_Simple action integration
- Location:
agentforce-components/visit-note-processor/ - Topic Configuration: See Post Call Visit Notes Topic Configuration
- Salesforce org with Life Sciences Cloud for Customer Engagement enabled
- Agentforce for Life Sciences Cloud enabled and configured
- Provider Visit Management objects and Life Sciences Marketable Product objects
- Territory2 and UserTerritory2Association setup
- Admin permissions for Agentforce and Life Sciences Cloud configuration
# 1. Clone the repository
git clone https://github.com/salesforce-misc/lifesciencescloud-agent-templates.git
cd lifesciencescloud-agent-templates
# 2. Create Flex-based Prompt Templates FIRST
# IMPORTANT: Create prompt templates from agentforce-components/ with exact Label and API Names
# This is required before deployment as Flows have dependencies on these templates
# 3. Deploy to your org
./deployment/deploy.sh your-org-alias
# 4. Configure Agentforce components (see documentation/)Before running the deployment script:
-
Create Flex-based Prompt Templates:
- Navigate to
agentforce-components/and create prompt templates with exact Label and API Names as specified in the files - This step is mandatory as Flows have dependencies on these prompt templates
- Deployment will fail without these templates created first
- Navigate to
-
User Access Configuration:
- End users must be provided access to the Agent that contains the actions
- End users must be assigned the Permission Set License β Prompt Template User
- Without these permissions, users cannot access the Agentforce functionality
-
Manual Agentforce Action Creation:
- Admins must manually create Agentforce Actions from the deployed Apex classes and Flows
- daily-briefing: Create
Generate_Complete_Daily_Briefingaction from Apex classDailyBriefingOrchestrator- Input: Target Date (Require Input)
- Output: output (Show in conversation)
- get-nbc: Create
GetNBCaction from FlowGetNBC- Input: RAC (Require Input)
- Output: NextBestCustomerFormattedOutput (Show in conversation), ErrorMessage (Show in conversation)
- influencer-map: Create
Influencer_Map_Flowaction from FlowInfluencer_Map_Flow- Input: TargetAccountName (Require Input), targetAccountId (Require Input)
- Output: FormattedAffiliationOutput (Show in conversation), errorMessage (Show in conversation)
- visit-note-processor: Create
Visit_Note_Processor_Simpleaction from FlowVisit_Note_Processor_Simple- Input: VoiceNote (Require Input, Collect Data from User)
- Output: FullUpdateSummary (Show in conversation)
-
Create Agent Topics: Create the Agent Topics through Agentforce Studio β Agentforce Assets β Topics:
Use the Topic details provided in the documentation links above.
-
Create Life Sciences Field Sales Agent: Create the Life Sciences Field Sales Agent through Agentforce Studio β Agentforce Agents β New Agent using the Life Sciences Field Sales Template.
-
Configure Agent: Add the Topics and Actions to the New Agent.
-
Test Agent: Test the Agent in Agentforce Studio to ensure all components are working correctly.
-
Assign Permissions: Assign Agent permission to users who need access to the agent functionality.
lifesciencescloud-agent-templates/
βββ agentforce-components/ # Agentforce configurations
β βββ daily-briefing/ # Daily briefing agent
β βββ get-nbc/ # Next best customer
β βββ influencer-map/ # Influencer mapping
β βββ visit-note-processor/ # Post-call visit notes
βββ force-app/ # Salesforce metadata
βββ scripts/ # Deployment scripts
βββ documentation/ # Setup guides and docs
βββ tests/ # Test classes
- Setup Guide - Complete installation instructions
- API Reference - Technical documentation
- Troubleshooting - Common issues and solutions
- User Guide - End-user instructions
sf apex run test --target-org your-org --class-names DailyBriefingAgentTestsf project deploy start --target-org your-orgFor issues or questions:
- Check the troubleshooting guide
- Review the setup documentation
- Contact the LSC4CE team