Overview

Validate a phone number

The validatePhone method is for validating and standardizing phone numbers in Salesforce. It checks the provided phone number against external validation sources and returns detailed insights, including a formatted phone number, its categorized type, and validation advice.

This method works with the saveValidationResult method to store the validation outcome in Salesforce. After validating a phone number, the result can be processed to update records or saved for auditing purposes.

Key Points

  • Accepts a PhoneValidationInput_v1 object, where the phoneNumber field is required.
  • Validates the provided phone number and returns a PhoneValidationOutput_v1 object with validation insights.
  • Provides status codes and validation advice, and returns the formatted phone number along with its categorization (e.g., FIXED_LINE, MOBILE).
  • The result from validatePhone can be stored in Salesforce using the saveValidationResult method, ensuring traceability and compliance.