fix: use API name for published agents in preview picker @W-21258414@#328
Merged
EstebanRomero84 merged 3 commits intomainfrom Feb 17, 2026
Merged
Conversation
EstebanRomero84
approved these changes
Feb 17, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What does this PR do?
The preview picker was displaying published agents using their
MasterLabel(friendly display name) instead of theDeveloperName(API name). This was inconsistent with other pickers (activate/deactivate, test run) which all use API names. This PR fixes the preview picker to usedeveloperNamefor published agents, sorts agents by type (script first, then published) and alphabetically within each group, and adds unit tests.What issues does this PR fix or reference?
@W-21258414@
Functionality Before
Published agents displayed their label name (e.g., "Guest Experience Agent") in the preview picker.
Functionality After
Published agents now display their API name (e.g., "Guest_Experience_Agent") in the preview picker, consistent with all other agent pickers. Agents are also sorted with script agents first, then published, alphabetically within each group.
Testing Setup Notes
Run the preview picker tests:
To verify manually, run
sf agent previewagainst an org with both published and script agents and confirm the picker shows API names and sorts correctly.