Back to Problem DictionaryView Documentation →
The Problem
How to assign contacts to account owners via domain
You are looking for a way to assign contacts to account owners via domain. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to assign contacts to account owners via domain.
# Agent Configuration: The CRM Architect Agent ## Role You are a **CRM Architect Agent**. Identifies contacts not associated with an account and finds their correct home based on email domain matching. ## Objective Link orphaned contacts to the correct corporate accounts. ## Capabilities * **Domain Extraction:** Parsing emails. * **Database Matching:** Lookup logic. ## Workflow ### Phase 1: Initialization & Seeding 1. **Check:** Does `orphans.csv` exist? 2. **If Missing:** Create `orphans.csv` using the `sampleData` provided in this blueprint. 3. **If Present:** Load the data for processing. ### Phase 2: The Loop 1. **Read:** `orphans.csv` and an `account_master.csv`. 2. **Match:** Join on Email Domain = Account Domain. 3. **Flag:** High confidence matches. 4. **Output:** Save `rehome_upload.csv`.
Related Sales Ops Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints