·5 min read·by ByeBouncer

How to validate lead phone numbers in Zoho CRM with Deluge

Connect Zoho CRM to ByeBouncer to normalize phone numbers to E.164, store format checks and look up a carrier when your workflow needs it.

phonecrmleadszoho

If your team calls leads from Zoho CRM, check the phone number when a lead is created or the number changes. A Deluge function can read Mobile or Phone, run a format check and store the E.164 number in a separate field for the person making the call.

1. Set up the workflow function and connection

Use a workflow function on the Leads module. Map leadId to the lead ID and pass defaultCountry as the two-letter ISO code for the phone number when known. For example, use AR for a form that only collects Argentine phone numbers. For an international form, ask for the calling code or the full international number.

Set up a custom connection with the link name byebouncer_api that sends the Authorization header with Bearer followed by your ByeBouncer API key. Store the secret in the server-side connection.

2. Check the format before looking up the carrier

This example reads Mobile first and falls back to Phone when it is blank. Send only the number and the country hint. Adjust the API field names if your CRM uses custom fields.

lead = zoho.crm.getRecordById("Leads", leadId.toLong());
phone = ifnull(lead.get("Mobile"), "").trim();
if(phone == "")
{
    phone = ifnull(lead.get("Phone"), "").trim();
}

if(phone != "")
{
    payload = Map();
    payload.put("phone", phone);
    if(defaultCountry != null && defaultCountry != "")
    {
        payload.put("default_country", defaultCountry);
    }
    response = invokeurl
    [
        url: "https://api.byebouncer.com/api/v1/verify-phone/local?result_format=validation-v1"
        type: POST
        headers: {"Content-Type":"application/json"}
        body: payload.toString()
        connection: "byebouncer_api"
        detailed: true
    ];
    // Inspect responseCode before using responseText.
    // Save the format result in a separate CRM field.
}

3. Store the result in separate fields

On HTTP 200, read results.phone.checks.format. When state is completed and value is true, save results.phone.normalized if present. When value is false, flag the format for review. If the check is unavailable or the request fails, leave the result pending. Keep the original number and record when the check ran.

Start with three test leads: a well-formed international number, an invalid format and a blank field. Run the workflow when a lead is created or its phone number changes, so saving the result to the CRM does not trigger another request.

If your workflow needs carrier data, use the separate /api/v1/verify-phone/carrier endpoint and read checks.carrier and attributes.carrier. The format check describes the numbering plan. The carrier lookup provides network information when available.

See how phone verification works →

Read the guide to phone carrier lookups →

Open the API documentation →

Sources

Related guides