Inspiration
Salesforce orgs are becoming increasingly complex, and manually debugging debug logs and metadata can be time-consuming and error-prone. After encountering multiple instances of delayed issue resolutions due to slow root cause identification and collaboration gaps, we realized there was a pressing need for a tool that could not only pinpoint the root cause but also provide clear guidance on how to resolve it. This led to the creation of AgentFix — a tool that leverages AgentForce Agent, Salesforce’s AI, to analyze debug logs and org metadata, identify the root cause (whether it’s code, data, or configuration), and suggest detailed fixes with code snippets or metadata changes. By providing actionable recommendations, AgentFix empowers teams to resolve issues faster and more efficiently, improving the troubleshooting process.
What it does
AgentFix is your intelligent, AI-powered 100% native Salesforce troubleshooting companion that takes the guesswork out of issue resolution. Gone are the days of manual log parsing and endless debugging. With AgentFix, Salesforce developers and admins can experience a whole new level of efficiency in resolving org issues.
Here’s how it works:
Root Cause Detection: AgentFix analyzes your debug logs and org metadata using Salesforce’s cutting-edge AI, AgentForce Agent, to swiftly identify the root cause of issues. Whether it’s a coding error, metadata misconfiguration, or data inconsistency, AgentFix pinpoints the problem with remarkable precision.
Actionable Fixes: Once the issue is detected, AgentFix doesn’t just leave you hanging. It provides clear, actionable fix suggestions, including code snippets and metadata changes that need to be made. These recommendations are tailored to address the root cause, allowing you to resolve the issue efficiently.
Metadata and Code Snippets: For each identified issue, AgentFix delivers a detailed, easy-to-follow code snippet or metadata change, ensuring you know exactly what to modify in your Salesforce org. This reduces the risk of error and accelerates the resolution process.
Real-Time Collaboration with Slack: Troubleshooting isn’t a solo task — that’s why AgentFix automatically creates dedicated Slack channels for each issue. The right stakeholders — developers, admins, and QA teams — are instantly notified and brought together in the same virtual space, enabling swift collaboration and faster problem-solving.
AgentFix turns complex issue resolution into a smooth, collaborative process, helping teams save time, reduce errors, and get their Salesforce orgs back on track in no time.
How we built it
When a user encounters an issue in Salesforce, the process of diagnosing and resolving it becomes seamless with AgentFix. Here’s how we built the solution to help users quickly detect and resolve issues:
1.Recreating the Issue: The user is guided to our custom UI, where they simply click a button to begin the troubleshooting process. They then repeat the steps that triggered the issue in Salesforce.
2.Log Collection: In the background, we automatically initiate the creation of debug logs for that user, capturing all relevant log data for a 3-minute window. This allows us to gather the necessary information without interrupting the user’s workflow.
3.Apex Job Scheduling: After the 3-minute window, we schedule an Apex job to run and retrieve the debug logs using the Tooling API. This ensures that the most recent logs are pulled right after the issue is recreated.
4.AI-Powered Root Cause Analysis: Once the logs are collected, we pass them to AgentForce Agent — Salesforce’s AI tool. AgentForce Agent analyzes the logs in real-time, looking for issues related to code, configuration, or data inconsistencies. If an issue is detected, the AI generates a root cause summary, pinpointing exactly what went wrong.
5.Fix Suggestions with Metadata Changes: Based on the root cause, AgentForce Agent then suggests a fix, providing detailed code or metadata change recommendations. It includes specific metadata elements that need modification, along with the exact line numbers to make those changes.
6.Real-Time Collaboration: To ensure quick resolution, AgentFix automatically creates a case in Salesforce and generates a Slack channel for the issue. The right team members — developers, admins, and QA — are automatically invited to the channel, allowing for rapid collaboration and faster problem resolution.
7.No Issues Found: If AgentForce Agent doesn’t detect any issues in the debug logs, the system remains idle and doesn’t take any further action, ensuring efficiency.
Challenges we ran into
1.Metadata Parsing: One of the primary challenges was efficiently parsing and analyzing Salesforce metadata to pinpoint root causes of issues. With the volume and complexity of Salesforce orgs growing, ensuring that AgentForce Agent could navigate through large amounts of metadata and log data without compromising accuracy was a significant hurdle.
2.Querying and Fetching Debug Logs: The process of querying the debug logs and retrieving their body data through the Tooling API presented its own technical difficulties. Ensuring that logs were correctly captured for a specific user and timeframe was crucial, as we needed to make sure we were working with the most relevant log data for analysis. This also involved managing the logistics of scheduling the retrieval and ensuring that the data was passed to AgentForce Agent correctly for root cause analysis.
3.AI Integration for Real-Time Analysis: Leveraging AgentForce Agent for real-time analysis of debug logs and metadata required fine-tuning. We needed to ensure that the AI wasn’t just identifying basic errors, but also uncovering complex, underlying issues that might not be immediately visible in the logs. Achieving high accuracy in identifying root causes and suggesting fixes was essential for the tool’s effectiveness.
4.Slack Collaboration Automation: Automating the creation of Slack channels and inviting the correct stakeholders presented a challenge in role mapping. Ensuring that the right people — developers, admins, QA, and others — were notified at the right time required careful orchestration to avoid bottlenecks in the troubleshooting process. Miscommunication or delays in bringing the right team members together could extend resolution times.
Accomplishments that we're proud of
1.AI-Powered Root Cause Detection: One of our biggest accomplishments is integrating Salesforce’s AgentForce Agent to automatically analyze debug logs and org metadata. By leveraging AI, we’ve been able to drastically reduce the time it takes to detect and understand the root cause of issues. This automation allows developers and admins to focus on implementing solutions instead of spending hours deciphering logs.
2.Actionable Fixes with Code Snippets: Unlike traditional debugging tools, AgentFix doesn't just identify issues; it provides actionable solutions. We’re proud that AgentFix offers detailed fix recommendations, including code snippets and metadata changes, with specific line numbers. This level of precision helps users apply solutions quickly and accurately.
3.Real-Time Collaboration with Slack: We successfully integrated Slack to foster real-time collaboration among team members. Each issue creates a dedicated Slack channel, ensuring that developers, admins, and QA teams can work together seamlessly and resolve issues faster. This integration has been a game-changer for improving team communication and speeding up issue resolution.
4.Streamlined Debug Log Collection and Analysis: Automating the process of collecting debug logs and passing them to AgentForce Agent was a significant achievement. We’ve created an efficient pipeline that schedules the retrieval of logs, processes them in real-time, and then generates actionable insights for troubleshooting. This smooth integration between the UI, backend processes, and AI has significantly improved troubleshooting workflows.
5.User-Friendly Experience: Despite the complexity of the underlying technology, we’ve managed to create a user-friendly experience. Users can easily recreate the issue, and the system takes care of the heavy lifting. With minimal manual intervention, users get actionable insights and solutions that improve their productivity and reduce troubleshooting times.
What we learned
1.The Power of AI in Troubleshooting: One of the most valuable lessons we learned was the incredible potential of AI to transform traditional debugging processes. By integrating AgentForce Agent, we discovered how AI can swiftly analyze complex debug logs and org metadata to uncover root causes. The power of machine learning in identifying issues that would have taken hours to diagnose manually opened our eyes to new possibilities for automation and efficiency in Salesforce management.
2.Importance of Seamless Integrations: Building an effective solution like AgentFix required seamless integration between multiple systems — from the Tooling API for fetching debug logs to the real-time collaboration features of Slack. We learned that creating a smooth, cohesive workflow across various tools is essential for ensuring a seamless user experience.
3.The Value of Automation: Automating processes like debug log collection, root cause analysis, and case creation showed us how much time and effort can be saved by automating repetitive tasks. By removing manual steps from the troubleshooting process, we not only improved efficiency but also reduced the risk of human error, allowing teams to focus on more strategic problem-solving.
4.Collaboration Accelerates Problem-Solving: Our integration of Slack revealed how vital real-time collaboration is in resolving complex issues. By bringing the right stakeholders together instantly in a shared Slack channel, we learned how much faster problems could be solved when teams work in sync. The power of collective expertise combined with automated insights significantly reduced resolution times.
What's next for AgentFix
Aiming High with AgentFix We envision AgentFix becoming the go-to tool for every Salesforce customer — a solution that revolutionizes how engineering teams troubleshoot, collaborate, and ensure more reliable Salesforce environments. Our goal is to make AgentFix so valuable and intuitive that it becomes indispensable to Salesforce orgs, no matter their size or complexity. To realize this vision, we are committed to rigorously testing AgentFix in larger, more complex Salesforce environments. This will allow us to fine-tune its capabilities, ensuring it can handle the toughest challenges.
Self-Healing After Approval Self-Healing After Approval means AgentFix doesn’t just suggest fixes — once it gets the green light from the right approver, it takes action on its own. It automatically updates the metadata or code in your Salesforce org, turning approved solutions into real-time changes without manual intervention.
Implementation Of RAG (Retrieval-Augmented Generation)
1.Improved Accuracy: Access to the most up-to-date and specific knowledge beyond training data.
2.Enhanced Relevance: Context-driven, highly relevant responses based on real-time external data.
3.Increased Specificity: Detailed and tailored answers pulled from your actual environment.
4.Customization: Personalized AI outputs using your organization’s specific knowledge base.
Introducing Release Metadata Comparison One of the exciting new features we’re working on is Release Metadata Comparison. By capturing snapshots of metadata before and after each deployment, AgentFix will automatically detect issues arising from recent changes. It will intelligently compare metadata files across releases, identify discrepancies, and pinpoint potential root causes — helping teams quickly stabilize their Salesforce environments after every deployment.
Smarter Case Management with AI But AgentFix doesn’t just stop at issue detection — it’s about smarter problem resolution. In future versions, AgentFix will identify if an existing case already covers the same issue. If so, it will create a child case under the original one, ensuring all work is tracked under a single case. This will be especially valuable when integrated systems experience failures or errors, allowing teams to collaborate more effectively and stay organized.
Exploring Splunk Integration for Proactive Insights We’re also exploring how Splunk integration can supercharge AgentFix’s capabilities. By leveraging Splunk’s powerful data analysis and monitoring tools, AgentFix will be able to ingest large volumes of logs, metrics, and events in real-time. This will enable us to detect trends, anomalies, and potential issues before they even show up in debug logs, making AgentFix more proactive and robust than ever before.
Built With
- agentforce
- api
- salesforce
- slack
Log in or sign up for Devpost to join the conversation.