Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve Einstein Prompt Templates after changing Allowed Languages #3125

Closed
Eliott-Mischler opened this issue Nov 21, 2024 · 5 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@Eliott-Mischler
Copy link

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 or sfdx 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

  • In an org with sufficient licenses / permissions to create Einstein Prompt Templates, create one under Prompt Builder.
  • Attempt to retrieve said Prompt Template with 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

{
  "architecture": "win32-x86",
  "cliVersion": "@salesforce/cli/2.66.7",
  "nodeVersion": "node-v22.11.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Users\\Gaask\\AppData\\Local\\sf\\client\\2.66.7-5567872",
  "shell": "powershell",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.8 (core)",
    "@oclif/plugin-commands 4.1.7 (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.66.7 (core)",
    "apex 3.5.6 (core)",
    "api 1.3.1 (core)",
    "auth 3.6.72 (core)",
    "data 3.11.2 (core)",
    "deploy-retrieve 3.15.8 (core)",
    "info 3.4.17 (core)",
    "limits 3.3.38 (core)",
    "marketplace 1.3.4 (core)",
    "org 5.1.2 (core)",
    "packaging 2.9.0 (core)",
    "schema 3.3.40 (core)",
    "settings 2.4.4 (core)",
    "sobject 1.4.44 (core)",
    "telemetry 3.6.19 (core)",
    "templates 56.3.28 (core)",
    "trust 3.7.39 (core)",
    "user 3.6.2 (core)"
  ]
}
@Eliott-Mischler Eliott-Mischler added the investigating We're actively investigating this issue label Nov 21, 2024
Copy link

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.

Copy link

Hello @Eliott-Mischler 👋 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

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Nov 21, 2024
@Eliott-Mischler
Copy link
Author

{
  "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)"
  ]
}

@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue and removed more information required Issue requires more information or a response from the customer labels Nov 22, 2024
@shetzel
Copy link
Contributor

shetzel commented Nov 22, 2024

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.

@shetzel shetzel closed this as completed Nov 22, 2024
@Eliott-Mischler
Copy link
Author

Eliott-Mischler commented Nov 25, 2024

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 ?

@Eliott-Mischler Eliott-Mischler changed the title Unable to retrieve recent Einstein Prompt Templates Unable to retrieve Einstein Prompt Templates after changing Allowed Languages Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants