AI-201 · Question #35
Universal Containers' Agent Action includes several Apex classes for the new Agentforce Agent. What is an important consideration when deploying Apex that is invoked by an Agent Action?
The correct answer is A. The Apex classes must have at least 75% code coverage from unit tests, and all dependencies. Salesforce enforces a minimum 75% code coverage requirement for all Apex classes upon deployment to production, regardless of how those classes are invoked. There are no exceptions for Apex used by Agentforce Agent Actions - the standard platform rule applies. Additionally, all u
Question
Universal Containers' Agent Action includes several Apex classes for the new Agentforce Agent. What is an important consideration when deploying Apex that is invoked by an Agent Action?
Options
- AThe Apex classes must have at least 75% code coverage from unit tests, and all dependencies
- BApex classes invoked by an Agent Action may be deployed with less than 75% test coverage as
- CThe Apex classes may bypass the 75% code coverage requirement as long as they are only used
How the community answered
(48 responses)- A94% (45)
- B2% (1)
- C4% (2)
Explanation
Salesforce enforces a minimum 75% code coverage requirement for all Apex classes upon deployment to production, regardless of how those classes are invoked. There are no exceptions for Apex used by Agentforce Agent Actions - the standard platform rule applies. Additionally, all unit tests must pass without errors before deployment succeeds. This means teams building Agent Actions backed by Apex must write sufficient unit tests covering at least 75% of the code paths. Choices B and C are incorrect because Salesforce does not grant coverage exemptions based on the invocation context (Agent Action, triggers, etc.).
Topics
Community Discussion
No community discussion yet for this question.