Loading
Build AI Solutions for Service
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Send a File with Dynamic Content from an Enhanced Bot

          Send a File with Dynamic Content from an Enhanced Bot

          Send a dynamic file as a bot message. For example, fill in and send a personalized invoice related to an account.

          Required Editions

          View supported editions for Einstein Bots.
          View supported editions for Messaging.
          User Permissions Needed
          To build and manage Einstein Bots:

          Customize Application

          OR

          Modify Metadata

          OR

          Manage Bots

          Supported file types and sizes vary by channel. See Send Images and Files in Messaging Sessions.

          To use a dynamic file in bot conversations, create an Apex class or flow that creates a file, uploads it to Files home, and returns the file’s ContentVersionId as output. To use a file created by an external service, create an Apex class or flow that stores the file in Files home and returns its ContentVersionId. See File with Dynamic Content: Example Apex Class.

          1. In the Bot Builder, click Dialogs, and then select the dialog that you want to send a file from.
          2. Add the Apex or Flow action dialog step to the dialog. Then create a bot variable that stores your Apex class or flow’s output.
            1. From the Dialog Component Library, drag the Apex or Flow action onto the canvas.
            2. In the Step Properties panel, in the Variable Name field, select the Apex class or flow that you created.
            3. In the Variable Name field, create an ID variable that stores the action output.
          3. Add the File dialog step to the dialog.
            1. From the Dialog Component Library, drag the File dialog step onto the canvas.
            2. In the Step Properties panel, in the File Interaction field, select Send File. And for the content type, select Dynamic (Content Version Variable).
            3. In the Variable Name field, enter and select the name of the ID variable you created. If you don’t see your variable, refresh the builder and try again.
          4. Save your changes.

          When you’re ready, activate your bot.

           
          Loading
          Salesforce Help | Article