Loading
Agentforce and Einstein Generative AI
Table des matières
Sélectionner des filtres

          Aucun résultat
          Aucun résultat
          Voici quelques conseils de recherche

          Vérifiez l'orthographe de vos mots-clés.
          Utilisez des termes de recherche plus généraux.
          Sélectionnez moins de filtres pour élargir votre recherche.

          Recherchez dans toute l’aide de Salesforce
          Add Conditional Logic to a Prompt Template (Beta)

          Add Conditional Logic to a Prompt Template (Beta)

          Use conditional blocks to create dynamic prompts that adapt based on your grounded data.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations
          User Permissions Needed
          To create and manage prompt templates in Prompt Builder:

          Prompt Template Manager permission set

          • Manage Prompt Templates
          • Execute Prompt Templates

          OR

          Customize Application permission set

          Before you begin.

          • To enable the Block Editor, from Setup, in the Quick Find box, enter Prompt Builder Settings. Then, turn on the Conditional Logic for Prompt Templates (Beta) toggle.
          • Identify the merge fields you want to use in your conditions. These fields come from your grounded data sources (objects, flows, or custom resources).

          Add a conditional block

          1. From Prompt Builder, open or create a prompt template.
          2. Position your cursor where you want to add conditional logic.
          3. Type / (slash) to open the block menu.
          4. Select Conditional Block or If Statement.
          5. In the condition field, enter your expression using merge fields and operators. For example, {!Case.Priority} == "High".
          6. Add content for the if branch. This content appears when the condition is true.
          7. Optionally, click Add Else If to add additional conditions for more scenarios.
          8. Optionally, click Add Else to add content when no conditions are true.
          9. Test your conditional logic using the Preview feature with sample data.
          10. Click Save.
           
          Chargement
          Salesforce Help | Article