Maintaining accurate and detailed company information inside a CRM is essential for sales, marketing, and customer success teams. However, manually researching companies and updating account descriptions can be time-consuming and inconsistent. With the Salesforce Managed Models API, organizations can leverage built-in AI capabilities to automatically generate company insights and enrich their CRM data without relying heavily on external AI platforms.
In this blog, we will explore the Managed Models API, its capabilities, and a real-world demonstration of how it can be used with Batch Apex to automatically update account descriptions.
What is Salesforce Managed Models API?
The Managed Models API is Salesforce’s native interface that allows developers to access large language models (LLMs) directly within the Salesforce ecosystem. Instead of setting up integrations with third-party AI providers, Salesforce manages the infrastructure, governance, and security. This enables teams to safely build AI-powered workflows while keeping their data within the trusted Salesforce environment.
Key Characteristics
- Fully Managed Infrastructure: Salesforce hosts and maintains the models, eliminating the need for developers to manage deployments or scaling.
- Enterprise-Grade Security: The platform ensures that business data remains protected while interacting with AI models.
- Native Apex Integration: Developers can invoke AI models directly from Apex, allowing intelligence to be embedded into triggers, batch processes, schedulers, and flows.
- Business Context Awareness: These models are optimized to work with structured CRM data such as Accounts, Leads, Opportunities, and Cases, making them highly effective for enterprise use.
Why Use Managed Models API?
Many organizations struggle with incomplete CRM records. Missing company descriptions can lead to:
- Poor sales preparation
- Limited personalization
- Inefficient lead qualification
- Reduced reporting quality
By using AI-generated company insights, businesses can maintain richer and more actionable data.
Major Benefits
- Eliminates manual research
- Improves data quality automatically
- Saves operational time
- Enhances sales intelligence
- Scales effortlessly across thousands of records
Uses of Managed Models API
The Managed Models API unlocks several possibilities for automation and intelligence within Salesforce.
Data Enrichment: Automatically populate missing fields such as company descriptions, industry insights, or organizational summaries.
Content Generation: Generate emails, account summaries, knowledge articles, and other business content in seconds.
Record Summarization: Condense long activity histories or case records into quick, digestible summaries for faster decision-making.
Intelligent Process Automation: Combine AI with backend processes to create self-updating records and reduce manual intervention.
Demonstration: Auto-Updating Account Descriptions
To demonstrate the power of the Managed Models API, I implemented an automated solution to enrich Account records with AI-generated company details.
Business Scenario
Our Salesforce org stores company details within Account records, but many accounts had empty description fields. This required users to manually search for company information and update records — a repetitive and inefficient process.
The goal was to design a system that could automatically:
- Identify accounts with blank descriptions
- Retrieve the company website when available
- Use the company name when the URL is missing
- Generate company details using the Managed Models API
- Update the description field with the generated content
Solution Overview
The implementation combines Batch Apex with the Managed Models API to process records asynchronously and enrich data at scale.
Step 1 — Fetching Relevant Accounts
A batch class was created to scan Account records and select only those where the Description field is empty.
For each record:
- If the website URL is available, it is used as the primary source for generating details.
- If the URL is missing, the company name is used instead.
This ensures that every record sent to the AI model has sufficient context.
Step 2 — Generating Company Details Using Managed Models API
The batch invokes a helper Apex class responsible for calling the Managed Models API.
A dynamic prompt is constructed using available company identifiers such as:
- Company Name
- Website URL
The AI model processes this input and returns a well-structured company overview that may include:
- Key Business areas
- Number of Employees
- Revenue
- Head Office
- Number of Customers
Step 3 — Updating Account Records
Once the AI-generated response is received:
- The content is returned to the batch process
- The Description field is populated with the generated company details
- Accounts are updated automatically
This creates a seamless enrichment workflow where missing information is filled without manual effort.
Step 4 — Scheduling the Automation
To further streamline the process, the batch job can be scheduled to run at regular intervals such as monthly or weekly. This allows newly created accounts with blank descriptions to be enriched automatically, ensuring the CRM remains consistently updated.
Conclusion
The Salesforce Managed Models API provides a powerful way to bring AI-driven intelligence directly into CRM workflows. By integrating it with backend automation, organizations can transform how they maintain and enrich their data.
This implementation demonstrates how AI can eliminate repetitive manual tasks, improve record completeness, and ensure that teams always have access to meaningful company insights. As businesses continue to adopt AI within Salesforce, solutions like this highlight the practical value of combining automation with intelligent data generation.
To explore more insights, best practices, and industry solutions, visit our Salesforce Sales Cloud page.