Loading
AI Sales Agents
Use Your Own Data Vendor with Prospecting Agent

Use Your Own Data Vendor with Prospecting Agent

Modify the existing Prospecting Agent topics with Apex class or autolaunched flow logic to connect to your own data provider.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions with the Agentforce for Sales or Agentforce for an Industry add-on, or in Agentforce 1 Sales and Industry Editions where included. Requires each user to have the Agentforce for Sales or Agentforce for an Industry add-on to access actions.
User Permissions Needed
To set up Agentforce Prospecting:

View Setup

AND

Modify All Data

OR

Customize Application

To create and configure prospecting agents: Sales Agentic Prospecting Manager
To use ZoomInfo data: ZoomInfo Prospecting Access

Before you begin, Turn On Agentforce Prospecting and Build and Manage Prospecting Agents.

Prospecting Agent uses actions in the existing Account_Research and Prospect_Finder topics to qualify accounts, find potential prospects, validate prospects against your ideal customer profile, and enrich prospect details. To use a data vendor other than the standard provider, create an Apex class with an @InvocableMethod or an autolaunched flow for each action. Then update the existing topic action references to point to those implementations. Keep the same inputs, outputs, and JSON response shapes as the standard actions.

This change is backward compatible and doesn’t affect existing agents. It gives customers the flexibility to customize agent actions so they can run with their own data vendor.

  1. Create a source ID format for prospects from your data provider.

    Use the format prefix__id, such as myvendor__001. The prefix is 1–100 characters, contains only letters and underscores, and can't start or end with an underscore. Don't use salesforce or zoominfo as the prefix. Use the same custom source ID throughout all four actions. Prospecting Agent uses this ID to pass a prospect from discovery to validation and enrichment.

  2. Create an Apex class with an @InvocableMethod or an autolaunched flow for each agent action. Include all of the necessary fields.
    Note
    Note
    • Use the same custom source ID throughout all four actions. Prospecting Agent uses this ID to pass a prospect from discovery to validation and enrichment.
    • For each Apex class, if a prospect isn't found or the vendor service is unavailable, return an empty result and include the reason in errorMessage or outputErrorMessage.
    1. Create an Apex class with an @InvocableMethod or an autolaunched flow for QualifyAccount action. This action decides whether an account is worth prospecting. Include these fields.
      Field Type Fields
      Required inputs accountId, accountSource, qualificationCriteria
      Optional inputs researchSummaries, zoominfoAccountAttributes, niceToHaveCriteria, signalSummaries
      Outputs isQualified, accountPov, errorMessage, responseJson

      Return responseJson in this shape.

      { "isQualified": true, "accountPov": "...", "errorMessage": "..." }
    2. Create an Apex class with an @InvocableMethod or an autolaunched flow for the FindPotentialProspects action. This action returns candidate prospect IDs from your data provider. Include these fields.
      Field Type Fields
      Required inputs accountId, accountSource, icpCriteria
      Optional inputs maxProspects, agentSpecId, runId
      Outputs potentialProspects, outputErrorMessage, responseJson

      Return each prospect ID in the prefix__id format.

      { "potentialProspects": ["myvendor__001", ...]}
    3. Create an Apex class with an @InvocableMethod or an autolaunched flow for the ValidateProspects action. This action validates one prospect against your ideal customer profile criteria. Echo the prospectId value exactly as the action received it. Include these fields.
      Field Type Fields
      Required inputs prospectToValidate, icpCriteria
      Outputs validationResults, responseJson

      Return validationResults in this shape:

      {
          "validationResults": [
            {
              "prospectId": "Salesforce__003XX000000ABC",
              "isValid": false,
              "summary": "Bad fit: Engineer below Senior level matches the bad-fit criterion 'Engineers below Senior level'"
            }
          ]
        }
      

      Return responseJson in this shape:

      {"validationResults":[{"prospectId":"Salesforce__003XX000000ABC","isValid":true,"summary":""}]}
    4. Create an Apex class with an @InvocableMethod or an autolaunched flow for the GetProspectAttributes action. This action enriches one valid prospect with details from your data provider. Include these fields.
      Field Type Fields
      Required input prospectId
      Outputs firstName, lastName, jobTitle, emailAddress, companyName, companyId, phoneNumber, responseJson, outputErrorMessage

      The responseJson field names differ from the flat outputs. Use title instead of jobTitle, email instead of emailAddress, and a nested company.

      Return responseJson in this shape:

      "
            { "firstName":"Jane", 
       "lastName":"Doe", 
       "title":"VP of Finance",
              "email":"jane@acme.com",
      	 "phone": "1234",
       "company": 
      { "name":"Acme Inc.", 
        "id":"acme-co-123" } 
      }
      "
  3. Create custom agent actions from the Apex class or autolaunched flow. These new agent actions replace the standard agent actions currently referenced by the agent. Keep the action descriptions, input names, output names, and output types the same as the standard actions. Wrong names lead to dropped fields. Actions to create:
    • QualifyAccount
    • FindPotentialProspects
    • ValidateProspects
    • GetProspectAttributes
  4. In the Prospecting Agent, replace the standard actions referenced by the agent with the new custom agent actions you created.
    1. In ProspectingAgent.agent, modify the Account_Research topic to use your QualifyAccount implementation.
    2. Modify the Prospect_Finder topic to use your FindPotentialProspects, ValidateProspects, and GetProspectAttributes implementations.
    3. Keep the Prospect_Finder instruction that calls GetProspectAttributes with the same source ID after a valid ValidateProspects result. That instruction also merges the GetProspectAttributes responseJson value under a prospect key.
  5. Preview the agent with an account that has known prospects in your data provider. Verify that the agent qualifies the account, returns prospects with your custom source ID prefix, validates the prospects, and shows the enriched prospect details.
 
Indlæser
Salesforce Help | Article