Inspiration
I'm always using ChatGPT to assist me with my Salesforce work, it felt like if I could just give Agentforce the tools, it would be able to apply itself to carrying out metadata operations within the org. The aim was to create a form of admin assistant to be used in developer environments to speed up build.
What it does
SuperAdmin AI makes use of invocable Apex methods that interact with Salesforce metadata to carry out operations normally restricted to admin clicking through various screens.
How I built it
Starting with the MetadataService class, I built a MetadataUtility class that all the invocable methods would be going in to in order to carry out these operations.
Challenges I ran into
With metadata operations, it's one thing trying to achieve a specific outcome e.g. "create this flow". It's another beast entirely trying to set it up to be dynamic, it was very easy for small tasks to spiral into huge builds. For example, there's no "create a flow element" because each type of flow element is it's own specific metadata type so fully achieving the flow aspect I wanted became too big for this project.
Accomplishments that we're proud of
I do particuarly love the formula field piece, this is as close as I think we get to the aim of this project which is, "here are the tools, you use your logic SuperAdmin AI to drive the build".
What we learned
More than I ever wanted to know about Flow Metadata, genuinely will have nightmares for the next month of falling down an infinite well of Flow > Flow Assignments > Flow Assignment Inputs > Flow Assignment Input Reference Or Value...
What's next for SuperAdmin AI
I'd love to start from scratch with all the time in the world and do it properly. My team can never know how hacky some of the code I built for this was! My strategic design would change completely, especially with how I'm surfacing inputs to SuperAdmin AI. So what's next for SuperAdmin AI... probably tear it all out and start again! XD
Built With
- agentforce
- apex
- salesforce
Log in or sign up for Devpost to join the conversation.