We’d love to have you join us—get early access to our Eloqua campaign delivery services at an exclusive price.

May 2025

Format for Sync

Dynamic Phone Number Formatting to Prevent SFDC Sync Failures

Eloqua Migration

The Problem

Sync Fails, Leads Drop

If you’ve ever had leads fail to sync from Eloqua to Salesforce, chances are the culprit was a badly formatted phone number.

Salesforce is strict about phone field formats — especially when integrations expect standardized inputs. When your form doesn’t match that format, data sync fails silently. It’s worse when the field is mapped and required in SFDC, causing leads to be lost or delayed.

If you’re capturing global leads on Eloqua landing pages, and using SFDC as your CRM, you must validate and format phone numbers properly by country.

The Solution

Dynamic Formatting by Country

We can use JavaScript and a country selection dropdown to auto-format the phone input field. In this post, we’ll focus on the United States example:

  • Eloqua form validation Format changes to: (XXX) XXX-XXXX
  • Eloqua form validation Users are guided with a live input mask
  • Form validation eloqua Ensures successful submission AND valid SFDC sync

This solution is scalable across multiple countries using a standard library like intl-tel-input, or simple logic per country.

How to do it

Format U.S. Numbers Based on Country Selection

1. Add Country Dropdown

Use this dropdown in your Eloqua form template:

The browser will automatically handle the error detection and show messages like “Please fill out this field” or “Enter a valid email address” — in the visitor’s native language.



2. Add Phone Input with Masking

Here’s the phone input:


And here’s the script to add the formatting based on the country:



3. Test with SFDC Field Requirements

Make sure the formatted output matches what Salesforce expects. For U.S. numbers, the format (555) 555-5555 is typically acceptable.

If you're using Salesforce Validation Rules, this formatting also prevents failed record creation due to non-conforming data.

p>

Sprint Task Breakdown

Sprint Item: Add dynamic phone formatting to avoid SFDC sync issues

Subtasks:

  • Eloqua Salesforce Integration Add country dropdown
  • Eloqua Salesforce Integration Apply input mask on phone field
  • Eloqua Salesforce Integration Validate format per country
  • Eloqua Salesforce Integration Test Salesforce sync compatibility
  • Eloqua Salesforce Integration QA across browsers and devices

Level of Effort

Estimated Time

Task Time Estimate
Add country dropdown 30 mins
Write JavaScript for input mask 1 hour
Test formatting and edge cases 1 hour
QA Salesforce sync on test record 1 hour
Total Estimated Effort 3.5 hours

Why Use Pl8ypus

Format Once. Sync Always.

Pl8ypus doesn’t just deliver working landing pages—we future-proof your campaign builds. From Salesforce sync issues to dynamic country handling, our developers bake these features into every template we touch.

Faster, smarter, transparent

Eloqua campaign delivery made easy.