Automatic Number Identification (ANI)
Automatic Number Identification (ANI) is the telephony system's captured phone number of the caller, delivered with every inbound call alongside the dialed number (DNIS).
Definition
Automatic Number Identification (ANI) is the telephony system's captured phone number of the caller, delivered with every inbound call alongside the dialed number (DNIS). In Salesforce Service Cloud Voice (the platform's native telephony product built on Amazon Connect, plus Partner Telephony alternatives) the ANI surfaces on the Voice Call record the moment the call connects. Service Cloud's CTI integrations use the ANI to perform a screen pop: a SOQL lookup against Contact, Account, and Lead phone fields finds the matching CRM record and opens it for the agent before the call is even answered.
ANI is the foundational signal for personalised customer service. Without it, every inbound call requires the agent to ask for identification, slowing the conversation and damaging the experience. With it, the system can authenticate the caller, surface their case history, and route the call to the right Agent skill based on customer attributes already known. Modern Service Cloud Voice deployments use the ANI in the Amazon Connect IVR for self-service decisions (account balance lookup, last order status), in Omni-Channel skill-based routing, and in Einstein Conversation Insights for caller segmentation analytics. ANI is also one of the inputs to fraud-detection patterns where unusual ANI behaviour triggers additional verification.
How ANI flows from the telephony network into Salesforce
Where ANI originates
ANI is captured by the originating telephony switch and travels with the call signalling (SIP, ISDN, SS7). The receiving telephony system reads the ANI from the call setup. In Service Cloud Voice with Amazon Connect, AWS captures the ANI when the call hits the Connect instance and exposes it to Contact Flows and the agent surface.
ANI versus DNIS
ANI is who is calling. DNIS (Dialed Number Identification Service) is what number they dialed. Both are useful: ANI personalises the experience based on the caller; DNIS routes the call based on which business line the customer chose (Sales, Support, Billing). Routing decisions usually combine the two.
Screen pop based on ANI
The CTI integration runs a SOQL query against Contact.Phone, Contact.MobilePhone, Lead.Phone, and Account.Phone whenever a call connects. Matching records open in the Service Console; multiple matches surface a search results page. Most orgs additionally configure custom Apex search to widen the lookup beyond standard phone fields.
ANI in the Contact Flow
Amazon Connect Contact Flows can read the ANI through the Customer Number system attribute and route based on it. A common pattern: look up the caller's account tier (Bronze, Silver, Gold), greet them by name, route Gold-tier callers directly to a premium queue. The Contact Flow uses Lambda functions to query Salesforce for the lookup.
Authentication and fraud signals
ANI alone is weak authentication; numbers can be spoofed and shared phones are common. Modern Service Cloud Voice deployments use ANI as a starting point and then layer voice-biometrics, PIN entry, or additional verification before granting account-level access. ANI patterns (high-volume calls from one number, unusual geographic origin) also feed fraud-detection models.
ANI and Omni-Channel routing
Omni-Channel can use ANI-derived attributes for skill-based routing. Once the IVR identifies the caller, Omni-Channel routes the call to an Agent with skills matching the caller's product, region, or tier. The routing decision uses the Salesforce-side context derived from the ANI lookup, not the raw ANI.
International ANI and formatting
ANI arrives in various formats: E.164 (international format with + prefix), national format, or unformatted digits. Service Cloud Voice typically normalises to E.164. Salesforce phone fields should also be stored in E.164 for reliable lookup; mixed formats produce zero matches even when the data is technically there.
Common pitfalls
Three patterns recur. Inconsistent phone formatting in Salesforce (some E.164, some local) breaks ANI lookup. Reliance on ANI as authentication produces security holes. And missing ANI on calls from blocked or unidentified numbers leaves Agents unprepared. Each is solvable with formatting standards, layered authentication, and explicit handling of missing ANI.
How to use ANI in Service Cloud Voice
Putting ANI to work is mostly a coordination exercise between Salesforce phone-data hygiene and Amazon Connect Contact Flow design. Both halves must align.
- Standardise Salesforce phone formatting
Convert every phone field on Contact, Lead, and Account to E.164 format. Build a validation rule that enforces the format on new records and a one-time migration for existing data.
- Configure the Amazon Connect Contact Flow to expose ANI
Use the Customer Number system attribute. Pass it to a Lambda that queries Salesforce for the matching customer record.
- Build the screen pop logic
Configure the CTI integration to open the matching Contact, Lead, or Account record on call connect. Handle multiple matches with a search results page; handle no match with a New Contact action.
- Route based on ANI-derived attributes
Once the lookup finds the customer, use account tier, product, or region to route the call to an Agent with matching skills via Omni-Channel.
- Plan for missing ANI
Some callers block ANI or call from systems that strip it. Build a fallback Contact Flow path that asks the caller for identification rather than failing the call.
- Inconsistent phone formatting in Salesforce breaks ANI lookup. Some fields store E.164, others store local format; the lookup misses matches that should match.
- ANI is weak authentication. Numbers can be spoofed; treat ANI as a starting point and layer additional verification before sensitive operations.
- Blocked or missing ANI is common. Build an explicit fallback path or Agents end up handling unidentified callers without context.
- Multiple matches on ANI (shared family phone, business mainline) need a disambiguation step. Show the candidates rather than auto-picking the wrong one.
Trust & references
Cross-checked against the following references.
- Service Cloud VoiceSalesforce Help
- Amazon Connect Contact AttributesAWS Documentation
Straight from the source - Salesforce's reference material on Automatic Number Identification (ANI).
- Voice Call ObjectSalesforce Help
Hands-on resources to go deeper on Automatic Number Identification (ANI).
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What does ANI provide?
Q2. What does Salesforce do with ANI data?
Q3. Why does phone number formatting matter for ANI matching?
Discussion
Loading discussion…