Contact Us

September 22, 2024

May 13, 2026 1:30 pm

Optimizing Agentforce Setup for Salesforce Data Lookups

Share with

Understanding the Requirement

The requirement involves querying multiple objects in Salesforce to retrieve specific data. For example, the sales rep may ask, “What customers at University of Toronto (Account) are using the Math 101 book (Product) and have an NPS of 10?” This query spans multiple objects, including Account, Contact, Product, Opportunity, and Quote/QuoteLine.

Initial Approach

The community member initially attempted to create separate data streams, DLOs, DMOs, and data retrievers for each object, as well as add relationships between each object and the DMOs. However, this approach yielded limited results.

The root cause of the issue lies in the complexity of querying multiple objects separately, which can lead to performance issues and data inconsistencies.

Recommended Approach

Instead of creating separate data streams and DMOs for each object, consider using Flows to invoke the Slack agent and query the data. This approach allows for more efficient and flexible querying of multiple objects.

Example Flow

// Example Flow code to invoke Slack agent and query data
// ...

This approach eliminates the need for complex data stream and DMO configurations, making it easier to manage and maintain the Agentforce setup.

Best Practices and Next Steps

To implement this approach, follow these best practices:

Checklist

  • Use Flows to invoke the Slack agent and query data
  • Configure the Flow to query multiple objects as needed
  • Test and refine the Flow to ensure accurate and efficient data retrieval
  • Monitor and optimize the Flow for performance and data consistency
  • Document the Flow configuration and maintenance procedures

For additional guidance and support, consider reaching out to a qualified Salesforce consultant or the Agentforce community.

What is the recommended approach for querying multiple objects in Salesforce?

Use Flows to invoke the Slack agent and query the data.

Do I need to create separate data streams and DMOs for each object?

No, using Flows eliminates the need for complex data stream and DMO configurations.

How do I configure the Flow to query multiple objects?

Configure the Flow to query the necessary objects, and test and refine as needed.

What are the benefits of using Flows to invoke the Slack agent?

Using Flows allows for more efficient and flexible querying of multiple objects, and eliminates the need for complex data stream and DMO configurations.

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert