Normalizes and hashes customer data for Facebook Ads offline conversion uploads. Use this when integrating CRM data with advertising platforms to maintain privacy and compliance.
// Source: https://github.com/ChatbotXIO/ChatbotX | License: MIT | Copyright 2024-present AhaChat LLC
// Provided via justclaw.it.com; keep this notice with the code.
// node:crypto (sync) on purpose — 100k rows × 13 keys through async Web
// Crypto is far too slow. This module is only reachable through the
// `./customer-file` package export, never the package root, so the builder's
// edge/middleware graph never pulls it in (spec D25).
import { createHash } from "node:crypto"
import type { CustomerFileColumnMap } from "./header-map"
import { CUSTOMER_FILE_KEYS, type CustomerFileKey } from "./keys"
import {
normalizeBirthYear,
normalizeCity,
normalizeCountry,
normalizeCustomerPhone,
normalizeEmail,
normalizeGender,
normalizeMadid,
normalizeName,
normalizeState,
normali
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key