Closed Eliott-Mischler closed 1 week ago
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.
Hello @Eliott-Mischler :wave: None of the versions of sf
you shared match the latest release.
Shared: 2.66.7
Latest: 2.67.7
Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc
and nightly
releases! (docs)
After updating, share the full output of sf version --verbose --json
{
"architecture": "win32-x86",
"cliVersion": "@salesforce/cli/2.67.7",
"nodeVersion": "node-v22.11.0",
"osVersion": "Windows_NT 10.0.22631",
"rootPath": "C:\\Users\\Gaask\\AppData\\Local\\sf\\client\\2.67.7-3acb081",
"shell": "powershell",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.8 (core)",
"@oclif/plugin-commands 4.1.8 (core)",
"@oclif/plugin-help 6.2.16 (core)",
"@oclif/plugin-not-found 3.2.25 (core)",
"@oclif/plugin-plugins 5.4.15 (core)",
"@oclif/plugin-search 1.2.14 (core)",
"@oclif/plugin-update 4.6.10 (core)",
"@oclif/plugin-version 2.2.15 (core)",
"@oclif/plugin-warn-if-update-available 3.1.21 (core)",
"@oclif/plugin-which 3.2.17 (core)",
"@salesforce/cli 2.67.7 (core)",
"apex 3.6.2 (core)",
"api 1.3.2 (core)",
"auth 3.6.73 (core)",
"data 3.11.3 (core)",
"deploy-retrieve 3.15.11 (core)",
"info 3.4.18 (core)",
"limits 3.3.39 (core)",
"marketplace 1.3.4 (core)",
"org 5.1.4 (core)",
"packaging 2.9.0 (core)",
"schema 3.3.40 (core)",
"settings 2.4.4 (core)",
"sobject 1.4.45 (core)",
"telemetry 3.6.20 (core)",
"templates 56.3.29 (core)",
"trust 3.7.41 (core)",
"user 3.6.2 (core)"
]
}
I'm not able to reproduce this. After I created a new prompt template I was able to retrieve it with the CLI v2.67.7. I also modified existing templates and they were retrieved.
The error you're seeing is a server error. The general rule we use in cases like this is if the CLI is sending the correct request then this is a server side problem. You can use the SF_MDAPI_TEMP_DIR
environment variable to save the package.xml generated and used for the retrieve request. If it looks correct, then I would suggest either trying again or open a support case for the server side team who owns GenAiPromptTemplate
.
This looks similar to: https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A9379SAB
If you discover new details that indicate a problem with the CLI please reopen this providing those details.
Hello, I have identified a few more specifics regarding this. It seems the breaking factor is changing the allowed response languages.
I have tried creating an exact copy of an existing Prompt Template, without editing the allowed languages, and I was able to retrieve it.
Then, upon changing the allowed languages in any way, I am unable to retrieve it, receiving the aforementioend error message. Restoring the allowed languages to the default value does not render the metadata retrievable again either. As such, I'm inclined to believe it becomes impossible to retrieve a Prompt Template as soon as one version has had modifications to the allowed languages.
Is this reproducible on your end ?
Hi @Eliott-Mischler - I was able to reproduce this, and it seems like a server-side bug, so we'll get one created and assigned to the correct team
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
This issue has been linked to a new work item: W-17319452
Summary
When attempting to retrieve recently updated Prompt Templates made in the CRM using Prompt Builder, be it via the VSCode extension under
Org Browser > GenAiPromptTemplate
orsfdx project retrieve start -m GenAiPromptTemplate
, the following error occurs :Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:GenAiPromptTemplate and file name:{Prompt Template Name}.
.This does not occur for "Old" prompt templates which haven't seen updates recently. Exact timeframe would be hard to define, but 3-month-old templates are all okay, and the ones we've modified today all fail immediately upon being saved, even if all that was added was whitespace.
Steps To Reproduce
sfdx project retrieve start -m GenAiPromptTemplate
Expected result
Metadata is retrieved via the command
Actual result
Error :
Metadata API received improper input. Please ensure file name and capitalization is correct. Load of metadata from db failed for metadata of type:GenAiPromptTemplate and file name:{Prompt Template Name}.
Additional information
System Information