Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Agentforce and Einstein Generative AI
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
          Add the Search the Web Action to a Prompt Template

          Add the Search the Web Action to a Prompt Template

          Add the Search the Web data action to a prompt template so your prompt can include current information from the web, such as current events, industry trends, and product information.

          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

          Note
          Note The Search the Web agent action isn’t supported in Government Cloud.
          Note
          Note When you run Search the Web in a prompt template, it uses your prompt template's token-based billing, not the separate billing used when it runs in an agent.

          The search provider determines which service processes web search queries. If you don’t select a provider, the action uses BrightData as the default search provider.

          1. From Setup, in the Quick Find box, search for Prompt Builder, and then select Prompt Builder.
          2. Open an existing prompt template, or click New Prompt Template to create one.
          3. In Template Details, click the Resources tab, and then select Salesforce Data Action.
          4. From the list, select Search The Web. The action is inserted into your prompt body.
            Resources tab in Template Details with Salesforce Data Action expanded and Search The Web selected
          5. In the prompt body, click the inserted Salesforce Data Action: Search The Web to open its properties.
            The properties show inputs: Search Query, Search Provider, and Allowed Domains.
            Edit Search The Web panel showing the three inputs: Search Query, Search Provider, and Allowed Domains
          6. In the Search Query field, enter what you want to search the web for.
            For example, enter current market trends in the electric vehicle industry. To run the same search every time, enter the text you want to search for. To run a search that's based on the record the template runs on, add inputs such as company information or product details. To refine your results, add more inputs.
          7. (Optional) For Search Providers, select a provider to use for web search.
            The values are Brightdata, OpenAI, and You.com.
          8. (Optional) In Allowed Domains, enter a comma-separated list of up to 10 domains to restrict results to those sources.
          9. Click Apply.
          10. To show the web sources, click the Properties tab and turn on Include Citations.
            Citations appear in the Generated Response.
          11. Click Save & Preview.
          12. In Preview Settings, enter sample values for the prompt template inputs. For example, enter a company name for the Company Information input. Make sure Generate Response is turned on, and optionally select a Response Language.
          13. Click Preview to see the generated response and citations.
           
          Loading
          Salesforce Help | Article