Skip to content

fix(audience): apply excludeFilter to broadcasts and sequences - #83

Merged
clbotdev merged 1 commit into
mainfrom
issue-41-exclude-filter
Oct 19, 2026
Merged

clbotdev merged 1 commit into
mainfrom
issue-41-exclude-filter

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Closes #41. Part of #79.

sequences.excludeFilter was stored but never read, and the update endpoints didn't even accept it, so "everyone except customers" still emailed customers.

  • Broadcast audiences and triggered sequence enrollment now leave out contacts matching excludeFilter (AND NOT coalesce(...)), and triggered enrollment also honours the sequence filter.
  • PATCH /sequences/:id and MCP update_sequence accept excludeFilter (null clears it); GET /contacts and MCP list_contacts accept excludeFilter so the editor's recipient count is right.
  • Broadcast editor: new Exclude filter builder under Audience.
  • Docs: broadcasts, sequences, MCP.

Testing

  • Unit: audience query with exclusion; triggered enrollment skips excluded contacts. Full API suite green.
  • Browser E2E (local stack, Mailpit): audience "tag = newsletter" (2 recipients) + exclude "tag = customer" → count drops to 1, exclusion persists after reload, Send now delivers only to the non-excluded contact.

The sequence's excludeFilter was stored but never read, and the update
endpoints didn't accept it. Contacts matching it are now left out of
broadcast audiences and triggered sequence enrollment (which now also
honours the sequence filter). REST, MCP, the contacts list (for the
recipient count) and the broadcast editor accept an exclusion.

Refs #41, #79
@clbotdev
clbotdev force-pushed the issue-41-exclude-filter branch from 97e0af1 to 28146b8 Compare October 19, 2026 15:22
@clbotdev
clbotdev merged commit 09cf4af into main Oct 19, 2026
5 checks passed
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.

sequences.excludeFilter is stored but never applied when sending

2 participants