Skip to main content
image of transactions being enriched demo

Overview

Transform basic lead information (email or domain) into rich company profiles with logos, colors, industry classification, and social links—all automatically. When your users interact with organizations in your CRM, they typically start with minimal data: an email address, a company name, or a domain. Brand.dev enriches these records with:
  • Company logos for visual recognition in contact lists
  • Phone numbers and addresses for complete contact profiles
  • Social media links (LinkedIn, X, etc.) for outreach
  • Industry classification for segmentation and reporting
  • Company descriptions for context at a glance

Prerequisites

  1. A Brand.dev API key
  2. A CRM or contact management application

Implementation

1. Trigger Enrichment

Enrich lead data when a new contact or organization is created. Extract the domain from the user’s email or use the company domain directly:
import BrandDev from "brand.dev";

const client = new BrandDev({ apiKey: process.env.BRAND_DEV_API_KEY });

async function enrichLead(email: string) {
  // Fetch brand data by email - automatically extracts domain
  const { brand } = await client.brand.retrieveByEmail({ email });
  
  // Select logo based on your UI theme
  const lightLogo = brand.logos?.find(logo => logo.mode === 'light')?.url;
  const darkLogo = brand.logos?.find(logo => logo.mode === 'dark')?.url;
  
  return {
    companyName: brand.title,
    description: brand.description,
    phone: brand.phone,
    domain: brand.domain,
    logo: lightLogo || brand.logos?.[0]?.url, // Use light logo or fallback to first available
    logoDark: darkLogo, // Optional: store both for theme switching
    address: brand.address,
    socials: brand.socials,
    industry: brand.industries
  };
}
The Retrieve by Email endpoint automatically rejects disposable and free email providers (Gmail, Yahoo, etc.) to avoid false enrichments.
Use the mode field on logos to select appropriate versions for light or dark mode UIs. See the Brand API reference for all available fields and filtering options.

2. Map to CRM Fields

Map Brand.dev response fields to your CRM’s data model:
Brand.dev FieldCRM Field
titleCompany Name
descriptionCompany Description
phonePhone Number
logos[0].urlCompany Logo
address.street, city, countryAddress
socials (type: linkedin)LinkedIn URL
socials (type: x)X (Twitter) URL
industriesIndustry/Segment

3. Display Enriched Profiles

Use the enriched data to create visually rich organization profiles:
function buildOrganizationProfile(enrichedData: any) {
  return {
    header: {
      logo: enrichedData.logo || '/placeholder-company.svg',
      name: enrichedData.companyName,
      tagline: enrichedData.description?.slice(0, 100)
    },
    contact: {
      phone: enrichedData.phone,
      address: formatAddress(enrichedData.address)
    },
    social: enrichedData.socials?.reduce((acc: any, s: any) => {
      acc[s.type] = s.url;
      return acc;
    }, {})
  };
}

Best Practices

1. Enrich on Create, Not on View

Trigger enrichment when leads are created or imported, not every time a profile is viewed. Cache the enriched data in your database.

2. Handle Missing Data

Not all companies have complete profiles. Display graceful fallbacks for missing logos, phone numbers, or addresses.

3. Allow Manual Overrides

Let users edit enriched fields. Their corrections should take precedence over API data on future views.