Skip to content

Skip prospects whose own website mentions an excluded brand - #258

Open
wardjon31 wants to merge 1 commit into
ethanplusai:mainfrom
wardjon31:feat/exclude-site-mentions
Open

wardjon31 wants to merge 1 commit into
ethanplusai:mainfrom
wardjon31:feat/exclude-site-mentions

Conversation

@wardjon31

Copy link
Copy Markdown

What this changes

Adds icp.exclude_if_site_mentions, a list of brands that rule a company out when its own website mentions them. A retailer for one kit brand shouldn't cold-email a club that already wears that kit.

  • Before writing, the Writer reads the company's homepage and up to six of its own kit, shop, sponsor and about pages. A whole-word mention in text, a link or an image address (including a link to a <brand>store shop) marks the prospect excluded, and no email is written.
  • The Sender checks again before anything goes out, so drafts written before the check, or before the site changed, are caught too. excluded joins STOP_STATUSES.
  • Verdicts are cached per company for 30 days. A site that can't be read gives no verdict and is tried again.
  • Off unless a brand is listed, so nothing changes for anyone else.

New module: sellbird/collectors/supplier_check.py (uses public_http_client).

How it was tested

  • tests/test_supplier_check.py (7 tests, fictional club.example / acmekit data): whole-word matching including the <brand>store case and a longer word that starts with the brand, crawling linked shop pages, caching, the config field, and the Writer and Sender paths.
  • Full suite: 3712 passed, 43 skipped.

Checklist

  • No real person's or business's name, email, phone, address or domain anywhere in the code, tests, docs or this description (CONTRIBUTING.md).
  • pytest passes.
  • Commits are signed off (git commit -s).
  • Docs and CHANGELOG.md updated if behaviour changed.

🤖 Generated with Claude Code

A retailer for one brand shouldn't cold-email a club already wearing it.
New icp.exclude_if_site_mentions lists the brands. Before writing, the
writer reads the company's homepage and up to six of its own kit, shop,
sponsor and about pages; a whole-word mention (text, link or image URL,
including a <brand>store link) marks the prospect 'excluded' and skips it.
The sender re-checks before sending so earlier drafts are caught, and
'excluded' joins the statuses that stop a sequence.

Verdicts are cached per company for 30 days; an unreadable site gives no
verdict and is retried. Off unless a brand is listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jon Ward <357348325+wardjon31@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant