MailOdds
Salesforce

Salesforce Email Validation with MailOdds

Native Apex integrations for email validation, suppression, and data quality. No middleware required. 20 production-ready patterns with Named Credential authentication.

Setup time: 15-30 min
Intermediate to Advanced
Native Apex, no middleware

Prerequisites

  • MailOdds account with API key
  • Salesforce Enterprise Edition or higher
  • Named Credential configured for api.mailodds.com
  • Apex development access (System Administrator or Developer profile)

Named Credential Setup

All integrations below use a single Named Credential. Configure it once, then reference it as callout:MailOdds in every Apex class.

1

Create a Named Credential

Setup > Named Credentials > New. Label: MailOdds. URL: https://api.mailodds.com. Identity Type: Named Principal. Authentication Protocol: No Authentication (we pass the key in the header).

2

Add the Authorization Header

In the Named Credential, enable "Generate Authorization Header" = false. Instead, add a Custom Header: Authorization = Bearer mo_live_YOUR_KEY.

3

Add a Remote Site Setting

Setup > Remote Site Settings > New. Name: MailOdds_API. URL: https://api.mailodds.com. Active: checked.

4

Create Custom Fields

On Lead/Contact: Email_Validation_Status__c (Picklist), Email_Validation_Action__c (Text), Email_Sub_Status__c (Text), Email_Validated_At__c (DateTime).

Integration Patterns

10 production-ready patterns, from lead intake gating to campaign pre-send audits. Each includes working Apex code.

Lead Intake Gate with Typo Auto-Correction

Sales Dev Intermediate

Validates emails on lead creation, auto-corrects typos via the suggested_email field, and quarantines rejects to prevent bad data from reaching your pipeline.

POST /v1/validateenhanced depthsuggested_email field

Division-Specific Validation Policies

RevOps Advanced

Apply different validation rules per business unit using Custom Metadata Type mappings. Enterprise divisions can enforce strict reject-on-risky while SMB can allow catch-all addresses.

POST /v1/validatepolicy_id parameterCustom Metadata mapping

Nightly Database Scrub

Marketing Ops Advanced

Schedule a nightly bulk validation job via the API, then use Platform Events to write results back as they complete. Webhook-driven writeback eliminates polling.

POST /v1/jobscallback_url webhooksPlatform Events

Bounce-to-Suppression Pipeline

Deliverability Intermediate

Automatically sync hard bounces from Pardot/MCAE into the MailOdds suppression list, creating a shared blocklist across your email infrastructure.

POST /v1/suppressionbounce event sync

Account Email Health Score

RevOps / CS Advanced

Compute an aggregate email health score for each Account by batch-validating all Contact emails. Surface the score on the Account record for CSMs and AEs.

POST /v1/validate/batchenhanced depthaggregate scoring

Two-Tier Cost-Optimized Validation

Finance / Ops Intermediate

Run standard (free) validation on all inbound leads. Only spend credits on enhanced SMTP validation for leads that pass qualification. Typical savings: 72%.

POST /v1/validatedepth parameter (standard/enhanced)

Domain Blocklist via Policies

Sales Ops Intermediate

Block competitor and freemail domains at the gate. Apply different filtering rules per lead source using validation policies with domain filter rules.

POST /v1/validatepolicy_iddomain_filter rules

Data Quality Command Center

RevOps Leadership Intermediate

Pull telemetry data into native Salesforce dashboards. Track validation volume, hit rates, and credit consumption with ETag caching for efficiency.

GET /v1/telemetry/summaryETag caching

Conversion Guard with Suppression Gate

Sales Ops Advanced

Double-gate at Lead conversion: check the suppression list first, then re-validate the email. Prevents converting leads with known-bad addresses into Contacts and Opportunities.

POST /v1/suppression/checkPOST /v1/validateconversion blocking

Campaign Pre-Send Audit

Marketing Ops Advanced

Run a pre-flight validation audit on campaign member lists before sending. Generate a risk report with a Go/No-Go recommendation based on valid-email ratios.

POST /v1/validate/batch or POST /v1/jobsrisk scoring

Revenue Intelligence Patterns

10 patterns that turn email delivery signals into pipeline actions. Webhook-driven engagement scoring, bounce forensics, deferral monitoring, and transactional sending with structured data.

Understanding is_bot and is_mpp in Webhook Events

is_bot = true when the event came from a security scanner, link prefetcher, or corporate email gateway (not a human). Common with Barracuda, Proofpoint, and Mimecast.

is_mpp = true when the event came from Apple Mail Privacy Protection, which pre-fetches all images and inflates open counts. Affects roughly 50% of iOS/macOS mail users.

Both fields are Booleans on engagement events (opened, clicked). Always guard with == true since they may be absent on non-engagement events.

Additional Custom Fields for Revenue Intelligence

Lead: Engagement_Score__c, Last_Engagement_Message_Id__c, Last_Click_URL__c
Contact: Emails_Sent_Count__c, Human_Opens_Count__c, Last_Human_Open_At__c
Opportunity: Email_Policy_Id__c, Last_Upsell_Message_Id__c, Proposal_View_Count__c, Proposal_Click_Count__c, Proposal_Last_Viewed_At__c, Last_Clicked_Link__c, Sending_Domain_Id__c
Campaign: MailOdds_List_Id__c
Custom Settings: MailOdds_Config__c (Webhook_Secret, Deferral_Threshold), Active_Sending_Config__c (Primary_Domain_Id, Fallback_Domain_Id, Min_Grade_Threshold)
Custom Objects: Email_Bounce_Log__c, Email_Deferral_Log__c

AI-Bot Filtered "Hot Lead" Routing

Sales Dev Advanced

Receive webhook click events, verify HMAC-SHA256 signatures, filter bot and Apple MPP noise, then bump engagement scores on Leads. Creates a high-priority Task when the score crosses a configurable threshold.

Webhook: message.clickedis_bot / is_mpp filterHMAC-SHA256 signature verification

Programmatic "Win-Back" via Suppression Audit

Sales Ops Advanced

Poll the suppression audit log on a schedule, find hard-bounced contacts, cross-reference Accounts for alternate contacts, and create win-back Tasks for the sales team.

GET /v1/suppression/auditevent_type / event_category filterpagination

Schema-Driven Transactional Upsell

RevOps / E-Commerce Advanced

Fire a transactional upsell email with JSON-LD structured data when an Opportunity closes. Uses campaign_type, schema_data, and ai_summary for rich inbox rendering. Stores the returned message_id for engagement tracking.

POST /v1/delivercampaign_typeschema_dataai_summaryoptions.validate_first

Dynamic Sender Reputation Balancing

Deliverability / IT Intermediate

Poll your sending domain identity score on a schedule. When the grade drops below a configurable threshold, auto-switch to a fallback domain and alert the team with a full breakdown.

GET /v1/sending-domains/{id}/identity-scoregrade / score / breakdown

Pre-Emptive Revenue Protection

Sales Leadership Advanced

Block Opportunity Close-Won on high-value deals when the primary contact email is unvalidated or rejected. Creates an smtp_required policy via preset, validates with policy_id, and creates an urgent Task on rejection.

POST /v1/policies/from-preset (smtp_required)POST /v1/validate with policy_idtrigger gate

Bounce Forensics Pipeline

Deliverability Advanced

Receive bounce webhooks with full SMTP forensics: bounce_type, smtp_code, enhanced_status_code, smtp_response, mx_host, and isp. Logs to a custom object and auto-suppresses hard bounces.

Webhook: message.bouncedbounce_type / smtp_code / enhanced_status_codemx_host / isp / smtp_response

Engagement-Decay Re-Validation

Marketing Ops Advanced

Track delivered and human-opened events via webhook (filtering is_bot and is_mpp). A scheduled job finds "zombie" contacts with sends but zero human opens, then re-validates to detect stale addresses.

Webhook: message.delivered + message.openedis_bot / is_mpp filterPOST /v1/validate re-check

Campaign List Sync

Marketing Ops Intermediate

When a Campaign becomes Active, create a MailOdds subscriber list and sync all members. Uses Queueable chaining to handle lists larger than the 100-callout governor limit.

POST /v1/listsPOST /v1/lists/{id}/subscribersQueueable chaining

Proposal Engagement Tracker

Sales / AE Advanced

Companion to the Transactional Upsell pattern. Matches incoming webhook open/click events by message_id to the Opportunity record. Filters bots and creates a high-priority Task for the AE on first human open.

Webhook: message.opened + message.clickedmessage_id join keyis_bot / is_mpp filter

Deferral Early Warning System

Deliverability / IT Intermediate

Receive deferral webhooks with smtp_code, smtp_response, mx_host, isp, and attempts. Logs to a custom object and fires an alert when any ISP exceeds a configurable hourly deferral threshold.

Webhook: message.deferredsmtp_code / smtp_response / isp / attemptsISP threshold alerting

Frequently Asked Questions

Troubleshooting

Need more help?

Can't find what you're looking for? We're here to help you get Salesforce working.

Build Production-Grade Salesforce Integrations

Get 1,000 free validations. Start with one pattern, scale to all twenty.