cli icon indicating copy to clipboard operation
cli copied to clipboard

Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:GenAiPlanner

Open fedegiust opened this issue 7 months ago • 8 comments

Summary

With the latest version of the CLI I can't deploy or retrieve GenAiPlanner metadata anymore... There is an ongoing issue with Agentforce where Custom Topics are not visible from the Asset Library, for this there was a workaround by generating or editing the GenAiPlanner metadata to link the Topics to the Agent and deploy. After the Agentforce DX was introduced, this is no longer possible

When using sf project retrieve start -m Agent

Image

When trying to deploy

Image

Steps To Reproduce

Have any project that uses agentforce. Have the latest CLI Try to deploy or retrieve GenAiPlanner metadata

Expected result

Should be able to deploy or retrieve

Actual result

Throwing an error

Additional information

System Information

PASTE_VERSION_OUTPUT_HERE

fedegiust avatar Jun 04 '25 15:06 fedegiust

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

github-actions[bot] avatar Jun 04 '25 15:06 github-actions[bot]

Hello @fedegiust :wave: It looks like you didn't include the full Salesforce CLI version information in your issue. Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

github-actions[bot] avatar Jun 04 '25 15:06 github-actions[bot]

hi @fedegiust - does this work on the non-latest version? could you provide a working version?

WillieRuemmele avatar Jun 04 '25 15:06 WillieRuemmele

I wasn't able to reproduce this using the latest CLI version

 ➜  sf project deploy start -m GenAiPlanner

 ─────────────── Deploying Metadata ───────────────

 Deploying v63.0 metadata to [email protected] using the v64.0 SOAP API.

 ✔ Preparing 223ms
 ✔ Waiting for the org to respond 418ms
 ✔ Deploying Metadata 1.37s
   ▸ Components: 6/6 (100%)
 ◯ Running Tests - Skipped
 ◯ Updating Source Tracking - Skipped
 ✔ Done 0ms

 Status: Succeeded
 Deploy ID: 0Afed0000005X4zCAE
 Target Org: [email protected]
 Elapsed Time: 2.02s


Deployed Source
┌───────────┬────────────────────────┬──────────────┬───────────────────────────────────────────────────────────────────────────────┐
│ State     │ Name                   │ Type         │ Path                                                                          │
├───────────┼────────────────────────┼──────────────┼───────────────────────────────────────────────────────────────────────────────┤
│ Unchanged │ Agent_for_Setup        │ GenAiPlanner │ force-app/main/default/genAiPlanners/Agent_for_Setup.genAiPlanner-meta.xml    │
│ Unchanged │ EmployeeCopilotPlanner │ GenAiPlanner │ force-app/main/default/genAiPlanners/EmployeeCopilotPlanner.genAiPlanner-meta │
│           │                        │              │ .xml                                                                          │
│ Unchanged │ Guest_Experience_Agent │ GenAiPlanner │ force-app/main/default/genAiPlanners/Guest_Experience_Agent.genAiPlanner-meta │
│           │                        │              │ .xml                                                                          │
│ Unchanged │ Local_Info_Agent       │ GenAiPlanner │ force-app/main/default/genAiPlanners/Local_Info_Agent.genAiPlanner-meta.xml   │
│ Unchanged │ TestAGent              │ GenAiPlanner │ force-app/main/default/genAiPlanners/TestAGent.genAiPlanner-meta.xml          │
│ Unchanged │ The_Campus_Assistant   │ GenAiPlanner │ force-app/main/default/genAiPlanners/The_Campus_Assistant.genAiPlanner-meta.x │
│           │                        │              │ ml                                                                            │
└───────────┴────────────────────────┴──────────────┴───────────────────────────────────────────────────────────────────────────────┘


➜  dreamhouse-agents git:(main) ✗  hub:(GLOBAL - DevHub) scratch:(AgentTestingProd)
 ➜  sf -v                                  
@salesforce/cli/2.90.4 darwin-arm64 node-v20.12.2

I was deploying the same EmployeeCopilorPlanner as well

WillieRuemmele avatar Jun 04 '25 15:06 WillieRuemmele

This started happening after installing the Agentforce DX plugin and tried to create an Agent. Not sure if it was a coincidence. I created a new scratch and works fine now on the new scratch

fedegiust avatar Jun 06 '25 18:06 fedegiust

I'm having the same problem. Here's the sf command i'm trying to run:

sf project retrieve start --metadata GenAiPlannerBundle:ServiceAgent

I get the following output:

 ────────────── Retrieving Metadata ──────────────

 Retrieving v64.0 metadata from {redacted} using the v64.0 SOAP API

 ✔ Preparing retrieve request 13ms
 ✔ Sending request to org 927ms
 ✔ Waiting for the org to respond 988ms
 ✔ Done 0ms

 Status: Succeeded
 Elapsed Time: 1.92s

 »   Warning: Nothing retrieved

Warnings
┌────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐       
│ File                   │ Problem                                                                                                                                                                                         │       
├────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤       
│ unpackaged/package.xml │ Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:GenAiPlannerBundle and file name:ServiceAgent. │       
└────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘       

Nothing is retrieved. However, I can see the GenAiPlannerBundle with the name ServiceAgent in the Org Browser.

Here is my sf version --verbose --json output:

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.92.7",
  "nodeVersion": "node-v22.12.0",
  "osVersion": "Windows_NT 10.0.26100",
  "rootPath": "C:\\Users\\{redacted}\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.29 (core)",
    "@oclif/plugin-commands 4.1.25 (core)",
    "@oclif/plugin-help 6.2.28 (core)",
    "@oclif/plugin-not-found 3.2.55 (core)",
    "@oclif/plugin-plugins 5.4.39 (core)",
    "@oclif/plugin-search 1.2.24 (core)",
    "@oclif/plugin-update 4.6.42 (core)",
    "@oclif/plugin-version 2.2.28 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.40 (core)",
    "@oclif/plugin-which 3.2.35 (core)",
    "@salesforce/cli 2.92.7 (core)",
    "agent 1.22.8 (core)",
    "apex 3.6.19 (core)",
    "api 1.3.3 (core)",
    "auth 3.6.126 (core)",
    "code-analyzer 5.1.0 (user) published 17 days ago (Tue May 27 2025)",
    "custom-metadata 3.3.40 (user) published 195 days ago (Sat Nov 30 2024) (latest is 3.3.57)",
    "data 4.0.37 (core)",
    "deploy-retrieve 3.22.19 (core)",
    "info 3.4.65 (core)",
    "limits 3.3.56 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.7.13 (core)",
    "packaging 2.16.0 (user) published 0 days ago (Fri Jun 13 2025)",
    "schema 3.3.65 (core)",
    "settings 2.4.29 (core)",
    "sobject 1.4.59 (core)",
    "telemetry 3.6.43 (core)",
    "templates 56.3.49 (core)",
    "trust 3.7.97 (core)",
    "user 3.6.25 (core)",
    "sfdmu 4.38.0 (user) published 166 days ago (Sat Dec 28 2024)",
    "sfdx-git-delta 6.13.1 (user) published 7 days ago (Fri Jun 06 2025)",
    "sfdx-hardis 5.39.1 (user) published 7 days ago (Thu Jun 05 2025)",
    "texei-sfdx-plugin 2.8.3 (user) published 94 days ago (Mon Mar 10 2025)"
  ]
}

fehays avatar Jun 13 '25 17:06 fehays

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

github-actions[bot] avatar Jun 21 '25 02:06 github-actions[bot]

@fehays There is a new "alias"

If you run sf project retrieve start -m Agent it should retrieve anything related to the agent, including topics and actions

fedegiust avatar Jun 23 '25 18:06 fedegiust

Is anyone still having the issue? I looked up the number in the original screenshot and I don't see any instances of that error in the past couple weeks. I just tried to replicate this too and I am not having any luck.

Image

Note that GenAiPlannerBundle replaced GenAiPlanner in v64. So that might be causing issues?

GenAiPlanner components are available in API version 60.0 to 63.0. GenAiPlannerBundle replaces GenAiPlanner in API version 64.0 and later

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_genaiplanner.htm

iowillhoit avatar Jun 30 '25 21:06 iowillhoit

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

github-actions[bot] avatar Jul 08 '25 02:07 github-actions[bot]