Skip to main content
Use case prompt
Sales reps recognize a company’s logo faster than its name. A logo in each row of the account list and in each record header makes a CRM easy to scan. Your app decides where each domain comes from, what a record shows while enrichment is pending, and which values a rep can change.

Find the domain for each account

The logo needs only a domain, and most accounts already have one:
  • The account has a website. Store its bare hostname, such as stripe.com.
  • A contact has a work email. Use the part after @. Skip free email providers, such as gmail.com, because that domain is not the account’s company.
  • You have only the account name. Send it to Search from your server, and let the rep confirm a candidate. The company autocomplete shows this flow.

Render the list and the record header

Both views use the same Logo.dev CDN URL at a different size: 20px in list rows and 56px in the record header. An account with no logo shows the generated monogram:
To show your own avatar for an account with no logo, use the component from logo from a domain.

Enrich the record on your server

The same domain gets the brand’s description and colors from Brand. Call it once when an account gets its domain, not on every page view:
api/enrich-account.ts
Save the result with the account, and render the record from it: A palette often starts with black or white, so use the first color with an OKLCH chroma (oklch.c) of 0.08 or more as the accent. The brand kit import use case has a picker.

Test the account views

Test with an account that has a website, one with only a contact email, and one with only a name. Enrich a domain that Logo.dev has not indexed, and check that the pending state retries. Check that a not_found result shows the logo and the name with no description. Then enrich an account again, and check that the rep edit stays.

Brand

Every field, status, and identifier for brand lookups.

Company autocomplete

Capture a clean domain when a rep adds a company.