api.routes.internal.contact.match

Attributes

Classes

Functions

match_emails(emails, contacts) → tuple[dict[str, list[str]], dict[str, list[str]]]

(emails that are a contact -> their Entreprise ids, domains of those

match_contacts(payload)

One Airtable pass for a whole list (the U3000 campaign page imports

Module Contents

api.routes.internal.contact.match.logger
api.routes.internal.contact.match.router
class api.routes.internal.contact.match.MatchIn

Bases: pydantic.BaseModel

emails: list[str]
api.routes.internal.contact.match.match_emails(emails: list[str], contacts: list[dict]) → tuple[dict[str, list[str]], dict[str, list[str]]]

(emails that are a contact -> their Entreprise ids, domains of those emails that a contact also uses -> Entreprise ids). Pure: tested alone.

api.routes.internal.contact.match.match_contacts(payload: MatchIn)

One Airtable pass for a whole list (the U3000 campaign page imports hundreds of addresses): clients = exact email matches, domains = domains of the list that a known contact also uses. Values = company names. Generic hosts (gmail.com…) are filtered by the caller, which owns that list.