Get the FREE Ultimate OpenClaw Setup Guide →

Account Hierarchy Builder

npx machina-cli add skill akhilkannur/marketing-agent-blueprints/account-hierarchy-builder --openclaw
Files (1)
SKILL.md
993 B

Corporate Hierarchy Builder

Core Instructions

You are a highly specialized AI agent focusing on Sales Ops. Your mission is: Groups separate account records into a parent-child hierarchy based on shared domain and corporate suffix patterns.

Implementation Workflow

Phase 1: Initialization & Seeding

  1. Check: Does accounts.csv exist?
  2. If Missing: Create accounts.csv using the sampleData provided in this blueprint.
  3. If Present: Load the data for processing.

Phase 2: The Loop

  1. Read: accounts.csv.
  2. Group: By shared Domain.
  3. Infer: Mark the first/oldest as Parent.
  4. Output: Save account_hierarchy.csv.

Blueprint ID: account-hierarchy-builder Source: Real AI Examples

Source

git clone https://github.com/akhilkannur/marketing-agent-blueprints/blob/main/skills/account-hierarchy-builder/SKILL.mdView on GitHub

Overview

Account Hierarchy Builder groups separate account records into a parent-child hierarchy using shared domain patterns and corporate suffix patterns. It runs in two phases: initialization/seeding of accounts.csv and a loop that groups by Domain and designates the oldest as the Parent, then outputs account_hierarchy.csv. This helps sales ops visualize account relationships for targeting and territory planning.

How This Skill Works

Phase 1 initializes data: it checks if accounts.csv exists; if missing, it creates accounts.csv from the provided sampleData; if present, it loads the data for processing. Phase 2 processes the data by reading accounts.csv, grouping records by Domain, inferring the first/oldest as the Parent, and saving the results to account_hierarchy.csv.

When to Use It

  • When multiple accounts share the same Domain and corporate suffix, you need a clear parent-child mapping.
  • After importing new accounts to update the hierarchy without manual re-linking.
  • During CRM data cleansing to resolve orphaned subsidiaries.
  • For Territory planning and account mapping to align teams with corporate structures.
  • In quarterly data refreshes to maintain up-to-date hierarchies.

Quick Start

  1. Step 1: Ensure accounts.csv exists or provide sampleData to seed.
  2. Step 2: Run the Corporate Hierarchy Builder to process and group by Domain.
  3. Step 3: Locate the output at account_hierarchy.csv and verify the Parent designations.

Best Practices

  • Ensure Domain values are clean and standardized before processing.
  • Validate corporate suffix patterns align with your naming conventions.
  • Back up accounts.csv before running the builder.
  • Review a sample of the generated hierarchy for accuracy.
  • Run in a staging environment before applying to production datasets.

Example Use Cases

  • A multinational vendor where acme.com and acme-solutions.com map under Acme Corp.
  • Subsidiaries like globex.com and globex-inc.com grouped under Globex Holdings.
  • Tech startups with shared domains across product lines mapped to a single parent.
  • Financial institutions where parent corp controls regional affiliates.
  • Retail chains with multiple brand domains grouped under a parent company.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers