Inspiration
Time management is a core focus of business today. Our team talked with a time management consultant about different automation tools that they could use in their consulting work. Additionally, our team talked with an account executive at a shipping firm to understand how they could be helped with AI automation. Attention Castle began from this conversation. The name comes from the idea of helping manage an account executive's valuable time and attention.
What it does
Attention Castle currently evaluates Slack messages (3 times a day) and groups them by priority in a user's private channels (i.e. Emily-High-Priority). It is also a reliable source for time management best practices. Users can train Attention Castle on the correct prioritization of messages. Currently, the message prioritization in Slack is based on sales opportunities.
How we built it
Our team built Attention Castle using two agents: a default agent (for use in Salesforce) and a custom agent (for use in Slack). The agents call custom Apex actions, flows, and prompt templates when prioritizing and summarizing messages. A series of time-based and record-triggered flows drive most of the processes. We used the standard Salesforce-Slack integration, interfacing through the Slack API for custom commands.
Challenges we ran into
We experienced several limitations with the current Agentforce product. After about a week of building, we learned that Agentforce currently does not fully support namespaces. Because of this challenge, we had to change to a new dev org without a namespace. We also encountered difficulties with setting up Apex SDK for Slack, so we then focused our build on utilizing the Slack API.
We experienced challenges in processing large volumes of messages while remaining within Salesforce's CPU and queuing limits. We achieved this by using Apex classes, leveraging asynchronous queues, future methods, and bulk processes.
Accomplishments that we're proud of
Our team is most proud of having persevered through technical setbacks and finding workarounds. We are proud of Attention Castle's clever solution that consolidates all of a user's messages into dedicated Slack channels. Additionally, we are proud of building a solution for how to prompt the agent on relevant opportunities and on a user's custom rules.
The ability to use one agent to serve multiple people, while applying custom rules for each person, is a valuable solution that can elevate any organization.
What we learned
For the first time, we built a Salesforce-Slack integration. This was also our team's first time creating agent actions and prompt templates, and integrating these with flows. We also learned a lot about writing Apex classes in ways that remain within CPU and queue limits. Finally, we learned a lot about the DX structure and metadata for Agentforce.
What's next for Attention Castle?
Now that the core infrastructure has been built, it is ready to expand to all communication channels: meetings, emails, tasks, feeds, texts, and phone calls.
Future features can also include Tableau integration for data visualizations about a user's time management; these data insights can help them improve. We can expand the message prioritization rules to VIPs, leads, and contacts.
Attention Castle is headed for the Salesforce AppExchange, so that users around the globe can enjoy the features that we've built!
Built With
- actions
- agent
- agentforce
- apex
- api.slack.com
- creativity
- flows
- human
- prompt
- salesforce
- slack
- template


Log in or sign up for Devpost to join the conversation.