Skip to content

[schemas] CRM engagement: notes, tasks, dates, interactions#394

Open
alanshurafa wants to merge 1 commit into
NateBJones-Projects:mainfrom
alanshurafa:upstream/crm-engagement
Open

[schemas] CRM engagement: notes, tasks, dates, interactions#394
alanshurafa wants to merge 1 commit into
NateBJones-Projects:mainfrom
alanshurafa:upstream/crm-engagement

Conversation

@alanshurafa

Copy link
Copy Markdown
Collaborator

Adds schemas/crm-engagement: engagement layer on top of schemas/crm-core. Tables and RPCs for per-contact notes, tasks, important dates, and logged interactions, so a contact record carries its activity history.

Self-contained under schemas/crm-engagement/; idempotent. Includes README + metadata.json.

Depends on #393 (crm-core) — the engagement tables reference crm_contacts. Apply crm-core first.

Testing: applied on an ephemeral Postgres alongside the full schema stack; composes cleanly.

@github-actions github-actions Bot added the schema Contribution: database extension label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

OB1 PR Gate

Folder structure — All files are in allowed directories
Required files — README.md and metadata.json found in all contribution folders
Metadata valid — All metadata.json files passed JSON Schema validation
No credentials — No API keys, tokens, or secrets detected
SQL safety — No destructive SQL or core table modifications
Category artifacts — Required file types present for each category
PR format — Title follows [category] Description format
No binary blobs — No oversized or binary files
README completeness — All READMEs include Prerequisites, Steps, and Expected Outcome
Contribution dependencies — All declared skill and primitive dependencies exist and are linked in README
LLM clarity review — Covered by Claude PR Review workflow
Remote MCP pattern — No local MCP server patterns detected — uses remote MCP correctly
Tool audit link — Extensions/integrations link to the MCP Tool Audit guide
Scope check — All changes are within the contribution folder(s)
Internal links — All relative links in READMEs resolve to existing files

Result: All 15 checks passed! Ready for human review.


Post-Merge Tasks

These don't block merge — they're reminders for admins after this PR lands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17e85cb294

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1374 to +1375
SELECT * INTO v_suggestion
FROM public.crm_keep_in_touch_suggestions(100, 0, 'all', p_contact_id, true) s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve review actions with the same privacy scope

When a privileged caller reads the queue with p_exclude_restricted = false to include a restricted contact or a suggestion driven only by restricted engagement rows, this update path still recomputes the queue with true. The supplied suggestion_key is then absent from the recomputed result and dismiss/snooze/convert raises CRM keep-in-touch suggestion not found, so restricted suggestions exposed by the read RPC cannot be acted on. Pass through an explicit privacy-scope parameter or resolve the exact key without hard-coding the restricted filter.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

schema Contribution: database extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant