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

Error during deployment of genAiPromptTemplate metadata to Scratch Org #3198

Open
Eliott-Mischler opened this issue Jan 29, 2025 · 1 comment
Labels
waiting for internal reply The Salesforce team is working on a fix and has promised an update

Comments

@Eliott-Mischler
Copy link

Expected result

Pushing a genAiPromptTemplate retrieved from a Sandbox Org into a Scratch Org deploys successfully and causes no errors.

Actual result

The deployment to a Scratch Org fails with the following error : force-app\main\default\genAiPromptTemplates\Profil_Consommateur_Case.genAiPromptTemplate-meta.xml Error parsing file: 'DYW2v9UcOjEUClCiohijaAqJsFnmRY0EcHEQpp0ghTg=_1' is not a valid value for the type xsd:int (3:82)

Additional information

When creating a Scratch Org to push metadata that was retrieved from a Sandbox Org, an XML difference in the metadata definition of the genAiPromptTemplate object between Sandbox & Scratch Org causes an error to occur.
Recently, the XML for the genAiPromptTemplate object changed, with a hash now being contained in the versionIdentifier and activeVersion tags. Previously, versionIdentifier was versionNumber with an integer value.

The Prompt Template XML is as follows :

<?xml version="1.0" encoding="UTF-8"?>
<GenAiPromptTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeVersion>DYW2v9UcOjEUClCiohijaAqJsFnmRY0EcHEQpp0ghTg=_1</activeVersion>
    <createdInVersion>63.0</createdInVersion>
    <developerName>Profil_Consommateur_Case</developerName>
    <masterLabel>Profil Consommateur Case</masterLabel>
    <relatedEntity>Case</relatedEntity>
    <templateVersions>
        <content>Instructions : 
&quot;&quot;&quot;
Your role is to create a consumer profile based on the aggregated data from the prior conversations with said customer.
From the data, you will extract the following key points, explained in a concise (aim for a little under the length of a tweet per section) and clear manner :
1. Products of interest : Here you will list the categories of products the user has mentioned, while listing each individual product per category as well. Double-check that you didn&apos;t accidentally list the same product twice, and make sure you list every product you picked up. Empty categories or repetition are to be avoided at all costs, keep it clear and to the point. If the client is interested in free products / samples, mention it here as well.
2. Recurring feedback : Here, you will summarize the common pain points and topics around which the user&apos;s questions or feedback revolve. You may mention the product again, but the point of this section is rather &quot;what about these products concerns the consumer?&quot;.
3. Possible health implications : Here, you will suggest, based on the age and the content of the conversations, whether the consumer is likely to have a health complication. Do not hesitate to admit if you don&apos;t have enough to go off of in this one, and only make a suggestion if you feel justified in it.
4. Consumer tone : Here, you are tasked with gauging what the user is looking for, and whether they have specific, noteworthy temperaments or tones that persisted throughout previous interactions. If they have been respectful, no need to specify, simply do so if you feel the consumer has a slightly odd or abnormal tone, expression, or expectation (such as writing excessive emails asking for free products, a prevailing sense of authority when speaking, etc.)


This list will be prefaced by &quot;Profil du Consommateur [Consumer Name], [Consumer age] ans&quot;. Skip the age description if it is not given.
&quot;&quot;&quot;

Data :
&quot;&quot;&quot;
{!$Flow:ProfilConsommateurEinstein.Prompt}
&quot;&quot;&quot;
</content>
        <inputs>
            <apiName>objectToSummarize</apiName>
            <definition>SOBJECT://Case</definition>
            <referenceName>Input:Case</referenceName>
            <required>true</required>
        </inputs>
        <primaryModel>sfdc_ai__DefaultGPT4Omni</primaryModel>
        <status>Published</status>
        <templateDataProviders>
            <definition>flow://ProfilConsommateurEinstein</definition>
            <parameters>
                <definition>SOBJECT://Case</definition>
                <isRequired>true</isRequired>
                <parameterName>objectToSummarize</parameterName>
                <valueExpression>{!$Input:Case}</valueExpression>
            </parameters>
            <referenceName>Flow:ProfilConsommateurEinstein</referenceName>
        </templateDataProviders>
        <versionIdentifier>DYW2v9UcOjEUClCiohijaAqJsFnmRY0EcHEQpp0ghTg=_1</versionIdentifier>
    </templateVersions>
    <type>einstein_gpt__recordSummary</type>
    <visibility>Global</visibility>
</GenAiPromptTemplate>

System Information

CLI:
@salesforce/cli/2.73.9 win32-x64 node-v22.12.0

Plugin Version:
@oclif/plugin-autocomplete 3.2.17 (core)
@oclif/plugin-commands 4.1.16 (core)
@oclif/plugin-help 6.2.21 (core)
@oclif/plugin-not-found 3.2.35 (core)
@oclif/plugin-plugins 5.4.25 (core)
@oclif/plugin-search 1.2.18 (core)
@oclif/plugin-update 4.6.23 (core)
@oclif/plugin-version 2.2.20 (core)
@oclif/plugin-warn-if-update-available 3.1.30 (core)
@oclif/plugin-which 3.2.25 (core)
@salesforce/cli 2.73.9 (core)
apex 3.6.8 (core)
api 1.3.3 (core)
auth 3.6.87 (core)
data 4.0.1 (core)
deploy-retrieve 3.17.7 (core)
info 3.4.32 (core)
limits 3.3.44 (core)
marketplace 1.3.7 (core)
org 5.2.23 (core)
packaging 2.9.12 (core)
schema 3.3.46 (core)
settings 2.4.10 (core)
sobject 1.4.49 (core)
telemetry 3.6.29 (core)
templates 56.3.35 (core)
trust 3.7.55 (core)
user 3.6.6 (core)
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_BINPATH,C:\Users\Gaask\AppData\Local\sf\client\bin\sf
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: true
Shell: powershell
Channel: stable

Diagnostics

✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
✅ pass - can access: https://test.salesforce.com
✅ pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
❌ warn - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
✅ pass - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - [@salesforce/plugin-auth] CLI using stable v1 crypto

@WillieRuemmele
Copy link
Member

WillieRuemmele commented Jan 29, 2025

Hi @Eliott-Mischler -

can you run the deploy command with --dev-debug and provide the stack trace?

just so I'm understanding, the activeVersion field used to be a number, but now, when you retrieve it, it's this hash? does this happen when retrieving in metadata format?

I've reached out to the metadata owning team to see what's going on, this doesn't match what's documented in their metadata documentation

@WillieRuemmele WillieRuemmele added the waiting for internal reply The Salesforce team is working on a fix and has promised an update label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for internal reply The Salesforce team is working on a fix and has promised an update
Projects
None yet
Development

No branches or pull requests

2 participants