Skip to content

feat: email notification for opportunity workspace#1867

Draft
jjenscodee wants to merge 16 commits intomainfrom
feat/oppty-workspace-email-notify
Draft

feat: email notification for opportunity workspace#1867
jjenscodee wants to merge 16 commits intomainfrom
feat/oppty-workspace-email-notify

Conversation

@jjenscodee
Copy link
Contributor

@jjenscodee jjenscodee commented Feb 25, 2026

Sends email notifications when LLMO strategy or opportunity statuses change via PUT /sites/{siteId}/llmo/strategy.
Changes:

  • Templates: Uses llmo_opportunity_status_update and llmo_strategy_update (via EMAIL_LLMO_OPPORTUNITY_STATUS_UPDATE_TEMPLATE and EMAIL_LLMO_STRATEGY_UPDATE_TEMPLATE).
  • Opportunity updates: Notifies assignee and strategy owner. Payload includes recipient_name, assignee_, strategy_owner_, opportunity_name, opportunity_status, strategy_url.
  • Strategy updates: Notifies strategy owner and all opportunity assignees. Payload includes recipient_name, strategy_status, strategy_url, strategy_owner_*, opportunity_list.
  • Name resolution: Uses TrialUser.findByEmailId for display names; falls back to email if not found.
  • Missing strategy owner: Skips sending to owner when createdBy is missing; still sends to assignees.
  • Strategy URL: Built from Site.getBaseURL() as https://llmo.now/{hostname}/insights/opportunity-workspace.
  • Files: opportunity-workspace-notifications.js, email-service.js, llmo.js controller, tests, docs.

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description. Or if there's no issue created, make sure you
    describe here the problem you're solving.
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:

  • make sure you add a "Not implemented yet" note the endpoint description, if the implementation is not ready
    yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
  • make sure you add at least one example of the request and response.

If the PR is changing the API implementation or an entity exposed through the API:

  • make sure you update the API specification and the examples to reflect the changes.

If the PR is introducing a new audit type:

  • make sure you update the API specification with the type, schema of the audit result and an example

Related Issues

Thanks for contributing!

@jjenscodee jjenscodee self-assigned this Feb 25, 2026
@github-actions
Copy link

This PR will trigger a minor release when merged.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jjenscodee jjenscodee force-pushed the feat/oppty-workspace-email-notify branch from 7e11d39 to 862b341 Compare February 27, 2026 17:22
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