Understanding the Issue
The Agent’s underlying SQL/SOQL generation engine does not recognize Event as a valid table in its schema map, even though it is a standard object. This is due to the Event object not being UI API Enabled, which is a known limitation.
The root cause of this issue is that the Event object is not yet UI API Enabled, which prevents the ‘Query Records’ action from accessing it. This limitation is documented in the Salesforce help center: https://help.salesforce.com/s/issue?id=a02Ka00000iuwEH
Verifying the Issue
To verify that this issue is not related to other factors, teams can take the following steps:
- Instruction Isolation: Remove all custom prompts and instructions to run the agent in its most raw, ‘default’ state.
- Cross-Object Validation: Test requests on Account, Contact, and Order objects to confirm the agent is active and the ‘Query Records’ action is functional generally.
- Permission Check: Confirm the running user has Read access to the Event object and the relevant fields.
- Action Configuration: Verify that the ‘Query Records’ action is assigned to the Topic, but the schema seems to be missing the definition for Event.
Resolution
Unfortunately, there is no direct resolution to this issue, as it is a known limitation of the Agentforce platform. However, teams can use alternative methods to access the Event object, such as using Apex code or other integration methods.
ApexExample.cls
public class ApexExample { public List<Event> getEvents() { return [SELECT Id, Subject, StartDateTime FROM Event]; }}
Heads up: The above Apex code example is for illustration purposes only and may require modifications to work in your specific use case.
Best Practices
Checklist for Resolving Query Records Action Failure
- Verify the Event object is not UI API Enabled.
- Check the running user has Read access to the Event object and relevant fields.
- Confirm the ‘Query Records’ action is assigned to the Topic.
- Use alternative methods to access the Event object, such as Apex code or other integration methods.
- Monitor the Salesforce help center for updates on UI API Enablement for the Event object.
What is the root cause of the ‘No Event table found’ error?
The root cause is that the Event object is not yet UI API Enabled.
Can I use Apex code to access the Event object?
Yes, you can use Apex code to access the Event object as an alternative method.
Is there a workaround for the ‘Query Records’ action failure?
There is no direct workaround, but teams can use alternative methods to access the Event object.
Will the ‘Query Records’ action work for other standard objects?
Yes, the ‘Query Records’ action should work for other standard objects that are UI API Enabled.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.