Using the Devensoft API to Create Personalized Notifications & Updates
Using the Devensoft API to Create Personalized Notifications & Updates
Audience: Admins, Corporate Development Ops, Engineering, BI/Automation Teams
Purpose: Explain how to use the Devensoft API to drive event-based and scheduled notifications tailored to each user’s role, portfolio, and preferences.
Applies to: Devensoft (M&A / Corp Dev), External Notification Systems (Power Automate, Azure Logic Apps, Power BI, Slack/Teams bots, Email/SMS gateways)
1) Overview
Devensoft contains high-value strategic data (deal pipeline, diligence tasks, integration milestones, risks, synergies). By tapping the Devensoft API, you can:
- Push personalized alerts when events occur (e.g., milestone date changes, new risk logged, task overdue).
- Curate periodic digests (daily/weekly) tailored to each user’s deals, roles, and watchlists.
- Route updates to users’ preferred channels (email, Microsoft Teams, Slack, SMS).
- Respect user preferences (frequency, channel, topics) and role-based access controls.
This KB outlines an event-driven and scheduled approach, with examples in Power Automate, Azure Logic Apps, and Python.
2) Typical Use Cases
- Task & Milestone Alerts: Notify deal team members when a diligence task is assigned, updated, or overdue.
- Risk & Issue Escalations: Alert integration leaders when a high-severity risk is added or its status worsens.
- Pipeline & Stage Changes: Notify executives or sponsors when a deal enters IC review, LOI, or closing.
- Synergy Tracking Updates: Share weekly progress on synergy realization against targets.
- Portfolio Watchlists: Curated digest for each user’s watched deals/entities with notable changes.
3) Architecture & Flow
A. Event-Driven (near real-time)
- Trigger: Event occurs in Devensoft (e.g., task status changes).
- Poll or Webhook:
- If webhooks are available: Devensoft posts event payload to your endpoint.
- If not: a short-interval job polls API endpoints for changes using
updated_sincefilters.
- Enrichment: Fetch related entities (deal, owner, severity, dates) via additional endpoints.
- Personalization: Match the event to user preferences and roles (notify only relevant users).
- Dispatch: Send via preferred channel(s) using connectors/APIs (SMTP, Teams, Slack, SMS).
- Audit & Throttle: Log deliveries, apply rate limits and de-duplication.
B. Scheduled Digest (daily/weekly)
- Cron/Flow Trigger: Scheduled run (e.g., 08:00 daily).
- Query Devensoft: Pull relevant updates since last run (tasks due today, status changes, new risks).
- Segment & Personalize: Group by user’s deals/roles; honor channel and frequency preferences.
- Render: Build digest content (HTML email, Adaptive Card for Teams, Slack block kit).
- Deliver & Log: Send; record success/failure.
4) Data Model Considerations
Note: Endpoint names and fields may vary. Replace placeholders with your actual Devensoft API references.
Common entities you’ll query:
- Deals:
GET /api/deals?updated_since=… - Tasks:
GET /api/tasks?status=…&updated_since=… - Milestones:
GET /api/milestones?due_before=… - Risks:
GET /api/risks?severity=high&updated_since=… - Users/Roles:
GET /api/users/{id},GET /api/roles - Watchlists/Subscriptions: If available, or maintain externally in your preferences store.
Key fields used in personalization:
assigned_to_user_id,deal_owner_id,stage,severity,due_date,status,updated_at- User profile:
email,teams_id,slack_id,preferred_channels,topics,frequency
5) Security & Compliance
- Authentication: Use token-based auth (e.g., OAuth2 bearer tokens or API keys) stored in a secure secret vault (Azure Key Vault, AWS Secrets Manager).
- Transport Encryption: All API calls over HTTPS (TLS 1.2+).
- Least Privilege: Use role-based access; scope tokens to only required endpoints.
- PII/Data Minimization: Send only necessary fields in notifications; avoid sensitive content unless essential.
- Consent & Preferences: Record explicit user opt-ins for channels and topics; provide easy opt-out.
- Audit Trails: Log events, recipients, content IDs (not sensitive content), timestamps, delivery status.
- Rate Limiting & Backoff: Respect Devensoft API rate limits; implement exponential backoff.
- Regional/Regulatory: Ensure compliance (e.g., GDPR). Provide data subject access and deletion pathways.
6) Personalization Strategy
- Who to notify?
- Direct assignees (task/milestone owner)
- Deal team members (by role or watchlist)
- Sponsors/Executives for stage changes or high-severity events
- What to send?
- Highlight what changed, why it matters, and next action
- Include links back to Devensoft entity pages
- When & how often?
- Real-time for critical events (risks escalations, closing tasks)
- Digest for routine updates (weekly synergy progress)
- Where (channel)?
- Respect user preferences (Email, Teams, Slack, SMS)
- Use richer formats for collaboration tools (Adaptive Cards, Block Kit)
7) Implementation Examples
7.1 Power Automate (low-code)
Trigger: Scheduled (daily 08:00) or HTTP/Webhook.
Steps:
- HTTP (GET):
https://api.devensoft.com/api/tasks?due_before={today}&status=open- Headers:
Authorization: Bearer
- Headers:
- Filter Array: Tasks matching user’s watchlist/assignee.
- Apply to Each (User): Compose personalized summary.
- Condition (Channel):
- Teams: Use “Post adaptive card in a chat or channel.”
- Email: Use “Send an email (V2)” with HTML template.
- Log: Write to SharePoint list/Azure Table for audit.
Adaptive Card example (Teams):
7.2 Azure Logic Apps (event-driven)
Trigger: Recurrence every 10 minutes (if no webhook).
Workflow:
- HTTP GET:
GET /api/risks?severity=high&updated_since={lastRun} - For each risk:
- HTTP GET: Fetch related deal and assigned users.
- Switch by user preference: Teams/Slack/Email.
- Send message:
- Teams: “Post message” with Adaptive Card
- Slack: “Chat.PostMessage” with Block Kit
- Persist: Write to Azure Table (eventId, userId, sentTimestamp).
Slack Block Kit example:
7.3 Python (custom microservice)
Use a lightweight service (e.g., FastAPI + Celery) to poll events and dispatch notifications.
Replace
resolve_recipients, Graph/email integrations, and endpoint fields with your environment specifics.
8) User Preferences & Subscription Model
Maintain a preferences store (e.g., SQL table or SharePoint list):
| Field | Type | Example |
|---|---|---|
user_id |
string | u-1029 |
email |
string | user@contoso.com |
channels |
array/json | ["teams","email"] |
frequency |
string | realtime / daily / weekly |
topics |
array/json | ["tasks","risks","pipeline_stage"] |
watchlist_deal_ids |
array/json | [123, 456] |
quiet_hours |
json | { "start": "19:00", "end": "07:00" } |
Best practices:
- Provide a self-service UI for users to manage preferences.
- Enforce quiet hours for non-critical alerts.
- Support digest fallback if too many events occur.
9) Content & UX Guidelines
- Concise & actionable: Lead with the change and recommended next action.
- Link back: Always include a deep link to the Devensoft item.
- Consistent formatting: Standardize subjects (e.g.,
[Devensoft] Task Overdue: …). - Rich cards: Prefer Adaptive Cards (Teams) or Block Kit (Slack) for clarity.
- Accessibility: Use clear language; avoid jargon; ensure readable contrasts.
10) Monitoring, Logging & Observability
- Delivery logs: Record event ID, recipient, channel, timestamp, status (success/failure).
- Metrics: Track notification volume, click-throughs (if available), time-to-deliver.
- Alerts: Notify ops on repeated failures (e.g., API rate-limit hits, 5xx responses).
- Retry policy: Exponential backoff, idempotent sends, de-duplication by event hash.
11) Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| 401/403 from Devensoft API | Expired or insufficient token | Refresh token; check role scopes |
| Rate limit errors | Too frequent polling | Increase interval; add caching; backoff |
| Users receiving irrelevant alerts | Missing role/watchlist filters | Enforce recipient mapping rules; verify preferences |
| Duplicate notifications | Event reprocessed without idempotency | Use event IDs/hashes; store sent markers |
| Teams/Slack message fails | Invalid IDs or missing permissions | Verify app registration and user mapping |
| Digest too long | No topic/channel filtering | Apply preference filters; summarize and link to details |
12) Governance & Change Management
- Approval: Stakeholder sign-off on which events trigger notifications.
- Pilot: Start with one team/deal; gather feedback; iterate.
- Documentation: Maintain endpoint mappings, templates, and runbooks.
- Training: Provide short guides for users to customize preferences.
- Review cadence: Quarterly review of triggers, templates, and metrics.
13) Template Snippets
Email (HTML)
Teams (Adaptive Card excerpt)
14) Rollout Checklist
- API credentials stored in secure vault
- Preference store implemented and populated
- Templates finalized (email, Teams, Slack)
- Event trigger rules approved
- Logging & monitoring configured
- Pilot completed and feedback integrated
- Documentation published and training delivered
15) Next Steps
- Stand up your notification microservice or Power Automate/Logic Apps flows.
- Define the event catalog (which Devensoft changes trigger alerts).
- Build user preference UI and enforce opt-in.
- Launch a pilot with the Corp Dev team; iterate based on metrics and feedback.