<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nidhi Sharma</title>
    <description>The latest articles on DEV Community by Nidhi Sharma (@nidhi_sharma_d5c7d974d2df).</description>
    <link>https://dev.to/nidhi_sharma_d5c7d974d2df</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3631990%2F3d7b1ca3-eff7-47fb-9957-2461456416ea.png</url>
      <title>DEV Community: Nidhi Sharma</title>
      <link>https://dev.to/nidhi_sharma_d5c7d974d2df</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nidhi_sharma_d5c7d974d2df"/>
    <language>en</language>
    <item>
      <title>Part 2: Securing Salesforce Agentforce Agents: A Comprehensive Security Framework</title>
      <dc:creator>Nidhi Sharma</dc:creator>
      <pubDate>Mon, 08 Dec 2025 06:38:09 +0000</pubDate>
      <link>https://dev.to/nidhi_sharma_d5c7d974d2df/part-2-securing-salesforce-ai-agents-a-comprehensive-security-framework-3a9i</link>
      <guid>https://dev.to/nidhi_sharma_d5c7d974d2df/part-2-securing-salesforce-ai-agents-a-comprehensive-security-framework-3a9i</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Dual Nature of Autonomous AI in Enterprise Systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automation in Salesforce has moved from rigid workflows and process builders to AI-powered agents that can understand natural language, make adaptive decisions, and execute complex business logic. These agents act like privileged actors within the system, accessing sensitive data, executing transactions, and interfacing with external systems. Unlike deterministic workflows, their behavior can change unpredictably as the Salesforce AI platform rapidly evolves. This newfound autonomy definitely unlocks efficiency, but also introduces new risks that require organizations to embed security into the very architecture of agent deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Critical Vulnerabilities in AI Agent Deployments&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Excessive Permission Assignment&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One such pressing risk is the privileges of agents that keep accumulating beyond the scope intended. The agent responsible for customer service might gain gradual access to accounts, opportunities, and even financial records.&lt;/p&gt;

&lt;p&gt;Here, &lt;strong&gt;Role‑Based Access Control (RBAC)&lt;/strong&gt;is fundamental. RBAC forms the foundation of the Salesforce security model and captures the principle of least privilege, ensuring that users and AI agents have access only to the data and functionality required for their job functions. Organizations rigorously apply RBAC to ensure that agents receive only the permissions required to carry out their defined role. When it comes to permission sets, they should be agent‑specific rather than shared, while regular audits confirm that privileges remain aligned with the documented scope.&lt;br&gt;
RBAC, when combined with clear scope boundaries, offers a robust perimeter to prevent privilege escalation and misaligned actions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scope Proliferation and Topic Overload&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents tasked with too many topics risk misclassifying user intent or misaligning actions. Therefore, the best practice is to limit each agent to a small number of clearly defined topics and to deploy multiple specialized agents rather than a single general monolithic system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;External Integration Vulnerabilities&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If compromised, third‑party APIs can become attack vectors, and so can Connected Apps. Regular audits, removal of dormant connections, strict OAuth 2.0 scopes, and IP allowlisting are critical to ensuring safety.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Guarding Against Rapid Platform Evolution&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Salesforce's AI is rapidly evolving, introducing new features and updates, of course, good by all means, but it can change agent behavior without configuration changes. That means something significant: this rapid iteration or capability shift can cause agents that once behaved reliably to produce unexpected outputs or make inappropriate decisions.&lt;/p&gt;

&lt;p&gt;To this end, the organization should establish a baseline by regularly running standardized test suites. If any deviations arise, they need to update topics, instructions, and guardrails to realign the agent with business needs.&lt;/p&gt;

&lt;p&gt;Salesforce recommended a Five‑Layer Security Architecture when it comes to security around implementing Agentforce :&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Role Definition and Scope Boundaries&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Clearly document the function, audience, and deployment context of each agent. Ambiguity at this stage leads directly to scope creep. RBAC and least‑privilege enforcement anchor this layer, ensuring agents operate only within their defined perimeter.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Data Access Governance&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Limit agents to only the minimum dataset required, and use object‑ and field‑level security consistent with organizational data governance policies. Avoid "just‑in‑case" connectivity that increases attack surface area.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Action Authorization and Execution Controls&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Differentiate between public read-only actions and private sensitive operations. Ensure identity verification with defense-in-depth validation at both the agent and automation levels to keep sensitive actions secure. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Runtime Guardrails and Behavioral Constraints&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Set up supervisory monitoring and Salesforce's Einstein Trust Layer to detect violations, compel secure data retrieval, and add custom guardrails to block PII in responses, for example, require human approval for high-value transactions. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Channel Security and Interface Protection&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Controls must be tailored to the channel of deployment: whereas public‑facing agents must implement mitigations against adversarial prompts, rate limiting, and CAPTCHA, internal agents should include session management, audit logging, and penetration testing. &lt;/p&gt;

&lt;p&gt;Operational Security Practices: Security does not stop with design. For example, ongoing monitoring of the agent interactions, anomaly notification, and deep logging are required. The practice of preloading data into Salesforce Data Cloud instead of relying on real-time API calls is another example of minimizing exposure to external vulnerabilities. Regular test suites should validate baseline behavior, resistance to adversarial attacks, and permission boundaries. &lt;/p&gt;

&lt;p&gt;Finally, integration lifecycle management ensures that &lt;strong&gt;unused or redundant&lt;/strong&gt; connections are decommissioned before they can become liabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Salesforce AI agents represent a powerful evolution in enterprise automation. Because of this autonomy, however, distinct security challenges arise. A layered framework of RBAC and least‑privilege principles, strict data governance, controlled action authorization, runtime guardrails, and channel protection ensures that agents remain secure even as the platform rapidly evolves. By embedding security into the design, continuously validating behavior, and proactively managing integrations, organizations can deploy AI agents that drive innovation while protecting trust, compliance, and long-term resilience.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Part 1: Built an Agentforce Agent — Here’s What I Learned So You Don’t Repeat these Mistakes</title>
      <dc:creator>Nidhi Sharma</dc:creator>
      <pubDate>Sat, 29 Nov 2025 06:57:20 +0000</pubDate>
      <link>https://dev.to/nidhi_sharma_d5c7d974d2df/part-1-built-an-agentforce-agent-heres-what-i-learned-so-you-dont-repeat-these-mistakes-38lf</link>
      <guid>https://dev.to/nidhi_sharma_d5c7d974d2df/part-1-built-an-agentforce-agent-heres-what-i-learned-so-you-dont-repeat-these-mistakes-38lf</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
My first Agentforce agent could update customer addresses, check order status, and answer common questions about sales orders. On paper, it was exactly what our support team needed—a way to handle the endless stream of "Where's my order?" requests so our reps could focus on complex customer issues.&lt;/p&gt;

&lt;p&gt;It took me a couple of tries to get it right. &lt;br&gt;
The difference between my failed attempts and the final working version? &lt;/p&gt;

&lt;p&gt;Learning that the word "may, can" is dangerously vague for AI instructions &lt;/p&gt;

&lt;p&gt;You can't bolt security on as an afterthought &lt;/p&gt;

&lt;p&gt;The best automation knows when to step aside for human judgment.&lt;/p&gt;

&lt;p&gt;Today, I'm sharing the three critical mistakes that were made—and how I fixed them. If you're building your first Agentforce agent, these lessons will save you weeks of frustration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem that Was Solving&lt;/strong&gt;&lt;br&gt;
Support reps were drowning in repetitive requests:&lt;/p&gt;

&lt;p&gt;"Where's my order?"&lt;/p&gt;

&lt;p&gt;"Can you change my delivery address?"&lt;/p&gt;

&lt;p&gt;"What's the status of my case?"&lt;/p&gt;

&lt;p&gt;"How do I return something?"&lt;/p&gt;

&lt;p&gt;These weren't complex questions. They were just... constant. Meanwhile, critical situations desperately needed human attention: angry customers with legitimate complaints, complex technical issues requiring investigation, and high-value accounts needing personalized consultation. But our skilled reps were stuck answering the same basic questions repeatedly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The goal: Automate the repetitive work so humans can focus on what actually requires human judgment, empathy, and creativity.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What the agent needed to handle:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Provide case updates and order status&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change delivery addresses (with verification)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Answer general product questions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handle routine FAQs&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What it should never do:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Replace humans for critical customer escalations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make complex judgment calls alone&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compromise customer satisfaction for efficiency&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The philosophy guiding everything: AI transformation can't stop business operations. We augment support, we don't replace the human touch when it matters most.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mistake #1: Treating Security as an Afterthought&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
First Attempt (Disaster)&lt;br&gt;
Instruction (Version 1):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a helpful customer support agent. Help customers 
with their orders and cases. Be friendly and provide 
accurate information.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sounds reasonable, right? It's friendly, it's clear about being helpful. What could go wrong? &lt;/p&gt;

&lt;p&gt;Everything.&lt;/p&gt;

&lt;p&gt;The agent was too helpful. A customer would say "What's the status of order #12345?" and the agent would immediately look it up and provide full details. No questions asked. No verification required.&lt;/p&gt;

&lt;p&gt;🚨 Complete security nightmare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Fix: Authentication First, Always&lt;br&gt;
Security can't be bolted on. It has to be the foundation.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instruction (Version 2):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a Customer Support Agent.

CRITICAL - AUTHENTICATION FIRST:
Before providing ANY order or case information, you MUST 
verify customer identity using their unique Customer ID.

AUTHENTICATION PROCESS:
1. Ask the customer for their Customer ID
2. Verify it matches the account in the system
3. Only after successful verification, proceed with assistance

DO NOT:
- Provide order details without a verified Customer ID
- Accept email addresses or names as verification methods
- Bypass authentication for "urgent" requests
- Share any account information before verification


Authentication Flow:

Agent asks customer for their Customer ID

System checks if the ID exists and matches an account

If match found → ✅ Verified → Agent proceeds

If no match → ❌ Rejected → Agent asks to try again or transfers to human
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why this matters:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Customer trust&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Legal compliance (GDPR, CCPA, HIPAA)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Business survival&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reputation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mistake #2: Using Vague Language That Invited Chaos&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
The Problem with "May"&lt;br&gt;
Instruction (Wrong):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You may help customers update their delivery address 
if they request it. You can verify their information 
and make changes as needed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Result:&lt;/em&gt;&lt;/strong&gt; unpredictable behavior, hallucinations, skipped verification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Fix:&lt;/em&gt;&lt;/strong&gt; Directive Language&lt;br&gt;
Instruction (Correct):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You MUST verify customer identity before any address updates.

You SHOULD NOT update delivery addresses if:
- The order has already shipped
- The new address is international (escalate to human)
- Customer verification fails

You MUST follow this exact process:
1. Confirm current delivery address with customer
2. Ask for the complete new address
3. Repeat the new address back for customer confirmation
4. Update the record only after customer confirms
5. Send confirmation email
6. Log the change with timestamp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Words that work:&lt;/em&gt;&lt;/strong&gt; MUST, SHOULD NOT, ALWAYS, NEVER, ONLY Words to avoid: May, Could, Might, Perhaps, Try to&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mistake #3: Thinking Automation Means "Handle Everything"&lt;br&gt;
Automation ≠ better results.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Temptation&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
“Our AI can handle almost anything! Let’s maximize efficiency by automating everything we can!”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Reality&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Angry customers don’t need order status—they need empathy and accountability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Fix:&lt;/em&gt;&lt;/strong&gt; Human-in-the-Loop by Design&lt;/p&gt;

&lt;p&gt;Escalate immediately if customer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Uses emotional language (angry, furious, lawsuit, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Asks for a manager or human&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Has high-value order (&amp;gt;$5,000)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mentions competitors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Requests refunds/account changes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Describes problems outside training&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Escalation process:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Acknowledge concern with empathy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to a specialist immediately&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create High Priority case with summary&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transfer to human queue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide full conversation context&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What I Learned:&lt;/em&gt;&lt;/strong&gt; The Real Success Factors&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Security isn’t optional — authentication first, no shortcuts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Language precision prevents hallucinations — directive words create predictable behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Human touch is irreplaceable — empathy and judgment can’t be automated.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Meta-lesson:&lt;/em&gt;&lt;/strong&gt; Building an Agentforce agent isn’t about the AI. It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Understanding business processes deeply&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setting clear boundaries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Knowing when humans add irreplaceable value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Protecting customer trust and data above all else&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get these basics right, and the technical execution becomes easy. Get them wrong, and no amount of fancy AI can help you.&lt;br&gt;
 &lt;br&gt;
&lt;strong&gt;&lt;em&gt;Coming Up in Part 2&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
These three mistakes taught me what NOT to do. But I still had critical questions about the technical architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Action permissions: What can agents actually modify? (Spoiler: never give delete access, and be very careful with updates)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Topic organization: How do you structure agent knowledge so it doesn't get confused when customers ask about multiple things?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mental models: Why did my first attempt fail even though I thought I "understood" the process?&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Agentforce Done Right: Permissions, Topics, and Why Your Brain Needs Organizing First.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I'll share the architectural decisions and organizational strategies that transformed my chaotic first attempt into a reliable production agent.&lt;br&gt;
Don't miss it! Follow me here on Dev. to so you get notified when Part 2 drops next week.&lt;br&gt;
Good luck with your first Agentforce Agent, and share your experience.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>crm</category>
      <category>agentforce</category>
    </item>
  </channel>
</rss>
