BetterFiles CDA Generator

Overview

Generates professional Commission Disbursement Allocation PDFs.

  • Renderer: WeasyPrint + Jinja2 (HTML/CSS to PDF — no border artifacts)
  • Script: /home/opsadmin/.openclaw/workspace-betterfiles/scripts/generate-cda.py
  • Theme: Frost (dark navy header + electric blue #4361EE)
  • Discord webhook: 1475966262931751124 → BetterFiles channel 1473827960677994559

Default signatories on every CDA:

  • Broker: Rico Peralta
  • Agent: Stephania Moreno

Layouts

CodeNameDescription
F1ClassicStandard 4-col grid
F2HeroProperty address as full-width blue hero banner
F3SidebarDark left panel + main content right
F4CardsFloating card tiles per section
F5ExecutiveLarge type, generous whitespace (default)

Required Data Fields

Extract these from uploaded docs (settlement statement, CI) before asking the user:

prop            Property address
file_no         Escrow / file number
date            CDA date
closing_date    Closing date
close_price     Sale price
gross_comm      Gross commission amount
seller          Seller name
buyer           Buyer name
escrow_co       Escrow company name
escrow_addr     Escrow company address
escrow_phone    Escrow phone
escrow_officer  Escrow officer name
payees          List of payee objects (see below)

Payee Object — Wire

{
  "name": "Real Estate Resources",
  "amount": "$10,888.00",
  "address": "7349 Milliken Ave, Rancho Cucamonga, CA 91730",
  "wire_bank": "Bank of America",
  "wire_routing": "026009593",
  "wire_account": "325187023423"
}

Payee Object — Check

{
  "name": "Better Files LLC",
  "amount": "$700.00",
  "address": "1220 Oak St, Suite J 1031, Bakersfield, CA 93304",
  "check_method": "Overnight check w/ tracking"
}

Payee Object — Fee (no wire/check)

{
  "name": "ASAP Capital",
  "amount": "$500.00",
  "notes": "Transaction Fee<br>7211 Haven Ave, Rancho Cucamonga, CA 91730"
}

How to Generate

Step 1 — Write data to temp file

cat > /tmp/cda-data.json << 'EOF'
{
  "prop": "2941 Baltic Ave, Long Beach, CA 90810",
  "file_no": "7092-DD",
  "date": "March 18, 2026",
  "closing_date": "March 16, 2026",
  "close_price": "$645,750.00",
  "gross_comm": "$12,088.00",
  "seller": "NRZ Reo XVI, LLC",
  "buyer": "SEAAA Inc., a CA Corp.",
  "escrow_co": "Prime Time Escrow, Inc.",
  "escrow_addr": "18121 Irvine Blvd., Tustin, CA 92780",
  "escrow_phone": "(714) 604-2530",
  "escrow_officer": "Desiree J. Diaz",
  "payees": [
    {
      "name": "Real Estate Resources",
      "amount": "$10,888.00",
      "address": "7349 Milliken Ave, Rancho Cucamonga, CA 91730",
      "wire_bank": "Bank of America",
      "wire_routing": "026009593",
      "wire_account": "325187023423"
    },
    {
      "name": "ASAP Capital",
      "amount": "$500.00",
      "notes": "Transaction Fee<br>7211 Haven Ave, Rancho Cucamonga, CA 91730"
    },
    {
      "name": "Better Files LLC",
      "amount": "$700.00",
      "address": "1220 Oak St, Suite J 1031, Bakersfield, CA 93304",
      "check_method": "Overnight check w/ tracking"
    }
  ]
}
EOF

Step 2 — Generate + post to Discord

cd /home/opsadmin/.openclaw/workspace-betterfiles
 
# Generate with default layout (F5) and post to Discord
python3 scripts/generate-cda.py \
  --data-file /tmp/cda-data.json \
  --output /tmp/CDA-output.pdf \
  --discord
 
# Specific layout, no Discord
python3 scripts/generate-cda.py \
  --data-file /tmp/cda-data.json \
  --layout F1 \
  --output /tmp/CDA-output.pdf

Step 3 — Post to Discord manually

WEBHOOK="https://discord.com/api/webhooks/1475966262931751124/Xo3lqk7MEEXDdkdOVykE_ff0PU49o0nEt6aA6YxJQB5VHKbpSuCkBrcwqmnHVOvFZo4G"
 
curl -s -X POST "$WEBHOOK" \
  -F "content=**CDA — [PROPERTY] | ASAP Capital**" \
  -F "file=@/tmp/CDA-output.pdf;type=application/pdf"

Defaults (auto-applied, override in JSON)

FieldDefault
brokerageASAP Capital
brokerage_addr7211 Haven Avenue, Rancho Cucamonga, CA 91730
brokerage_phone818-600-7684
brokerRico Peralta
agentStephania Moreno
roleSelling Broker
layoutF5 Executive

Workflow

  1. Extract — pull fields from uploaded settlement statement / CI docs first
  2. Confirm — verify gross commission, payee splits, and escrow details with user
  3. Generate — run script with --data-file and layout
  4. Discord — post with --discord flag or manual curl
  5. Report — confirm Discord message ID to user

Troubleshooting

# List available layouts
python3 scripts/generate-cda.py --list-layouts
 
# Quick test
python3 scripts/generate-cda.py \
  --data '{"prop":"123 Test St","file_no":"TEST-001","date":"March 18, 2026","closing_date":"March 15, 2026","close_price":"$500,000","gross_comm":"$10,000","seller":"Seller LLC","buyer":"Buyer Inc","escrow_co":"Test Escrow","escrow_addr":"123 Escrow Rd","escrow_phone":"555-1234","escrow_officer":"Jane Doe","payees":[{"name":"Brokerage","amount":"$10,000","wire_bank":"Chase","wire_routing":"021000021","wire_account":"999999999","address":"123 Main St"}]}' \
  --output /tmp/test-cda.pdf
 
# Reinstall deps if needed
pip3 install weasyprint jinja2 --break-system-packages

Invokes / Invoked by

Invokes: SKILL, SKILL, dispo-lifecycle Invoked by: _summary, _summary