Learn about Zapier Matching Telephone Numbers in Metaview.
When creating Zaps you may encounter an error if the formatting of phone numbers you use to match candidates is inconsistent. Follow these steps to configure your Zap to handle variations in phone number country code prefixes, such as switching between +44 and 0.
Set the input data field to include the candidate’s phone number (e.g., candidate number).
Enter the following JavaScript code:
Copy
let phone_number = input_data['Phonenumber'] || '';// Convert the phone number from +44 to 0 prefixif (phone_number.startsWith('+44')) { var converted_number = '0' + phone_number.slice(3); // Replace +44 with 0} else { var converted_number = phone_number; // Return unchanged if it doesn't start with +44}// Prepare the outputoutput = { 'converted_number': converted_number };
This setup will handle cases where a candidate’s phone number is entered with a +44 prefix, converting it to the 0 format if necessary. If the prefix is already correct, it remains unchanged.