Loading
Prepare for Email to Become the Default Login ExperienceRead More
Agentforce and Einstein Generative AI
Identify a Customer by Phone Number

Identify a Customer by Phone Number

Give your agent a way to identify a customer by phone number so that voice callers aren't asked to spell out an email address. You build a flow that looks up a contact by phone, wrap it in a custom action, and make that action the agent's only identification path.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.
User Permissions Needed
   
To create an action and edit an agent:

Manage Agentforce Service Agents AND Manage AI Agents

OR

Customize Application

To open, edit, or create a flow in Flow Builder: Manage Flow

Make sure that:

  • You have an agent with at least one subagent that needs to identify the customer, for example to look up their orders, cases, or account.
  • The agent user's permission set grants Read access to the Contact object and to the records the agent retrieves after it identifies the customer.

Voice callers can't reliably spell an email address aloud. Speech recognition confuses letters that sound alike, such as A and 8, B and D, or M and N, so an email address captured over voice often fails to match a contact record. A phone number is spoken as digits and read back digit by digit, which is far more accurate. For a voice agent, identify the customer by phone number, order number, account number, or date of birth rather than by email address.

Agents ship with a built-in action that identifies a customer by email address, but there's no built-in action that identifies a customer by phone number. You build one in Flow Builder, with no code, and then make it the only identification action the subagent can reach.

Note
Note You don't need a separate verification step to force identification. When a downstream action, such as an order lookup, requires a resolved contact record as input, the agent can't complete the customer's request until the phone identification action runs first. Identification becomes a data dependency rather than a routing gate.
  1. Build a flow that looks up a contact by phone number.

    The flow takes a phone number, finds the matching contact, and returns that contact record to the agent.

    1. From Setup, in the Quick Find box, enter Flows, select Flows, and then create an Autolaunched Flow (No Trigger).
    2. Add a text input variable for the phone number, and make it available for input.
    3. Add a Decision element that checks that the phone number isn't blank.

      The Decision lets the flow skip the lookup when no phone number is provided, so it never queries contacts with an empty filter and returns an arbitrary record.

    4. Add a Get Records element on the Contact object, filtered where the contact's phone field equals the input phone number, and store only the first matching record.
      Note
      Note The standard Contact phone field appears in the UI as Business Phone, and its API name is Phone. Filter on the phone field your customers actually provide, such as Mobile Phone if that's how they call in.
    5. Add a record output variable for the contact, make it available for output, and add an Assignment element that copies the found record into it.
    6. Save and Activate the flow.
  2. Create a custom action from the flow.

    The action is how the agent calls your identification flow during a conversation.

    1. In Agentforce Builder, add a new action to the subagent that handles the customer's request.
    2. Choose New action, give it a clear name such as Identify Customer by Phone, and set the reference type to Flow. Then select the identification flow you activated.

      Write a description that tells the agent when to use the action, such as "Identify a customer by their phone number and return their contact record." A specific description is the main factor in whether the agent selects the action at the right moment. For more information, see Best Practices for Agent Action Instructions.

    3. Require the phone number input so that the agent never calls the action without a value.
    4. Keep the contact output hidden from the conversation, and add loading text such as Let me pull up your account. so the caller isn't met with silence while the lookup runs.
  3. Make phone identification the subagent's only identification path.

    If the email action stays in place, the agent can still choose it and ask the caller to spell out an email address.

    1. Confirm that the Identify Customer by Phone action is listed in the subagent's actions.
    2. Remove the built-in Identify Customer by Email action from the same subagent.
    3. Save your changes, and then commit a new agent version.
  4. Test the identification path.

    Use the Preview panel in Agentforce Builder in Simulate Mode to have a short conversation with the agent. Confirm that the agent asks for a phone number instead of an email address, identifies the contact, and completes the follow-up lookup. For more information, see Simulate and Live Test Modes.

The agent identifies callers by phone number and no longer asks anyone to spell out an email address. Because the phone action is the only identification path on the subagent, the agent uses it every time before it runs an action that needs a resolved contact.

 
Loading
Salesforce Help | Article