Skip to content
English
  • There are no suggestions because the search field is empty.

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)

  1. Trigger: Event occurs in Devensoft (e.g., task status changes).
  2. 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_since filters.
  3. Enrichment: Fetch related entities (deal, owner, severity, dates) via additional endpoints.
  4. Personalization: Match the event to user preferences and roles (notify only relevant users).
  5. Dispatch: Send via preferred channel(s) using connectors/APIs (SMTP, Teams, Slack, SMS).
  6. Audit & Throttle: Log deliveries, apply rate limits and de-duplication.

B. Scheduled Digest (daily/weekly)

  1. Cron/Flow Trigger: Scheduled run (e.g., 08:00 daily).
  2. Query Devensoft: Pull relevant updates since last run (tasks due today, status changes, new risks).
  3. Segment & Personalize: Group by user’s deals/roles; honor channel and frequency preferences.
  4. Render: Build digest content (HTML email, Adaptive Card for Teams, Slack block kit).
  5. 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

  1. Who to notify?
    • Direct assignees (task/milestone owner)
    • Deal team members (by role or watchlist)
    • Sponsors/Executives for stage changes or high-severity events
  2. What to send?
    • Highlight what changed, why it matters, and next action
    • Include links back to Devensoft entity pages
  3. When & how often?
    • Real-time for critical events (risks escalations, closing tasks)
    • Digest for routine updates (weekly synergy progress)
  4. 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:

  1. HTTP (GET): https://api.devensoft.com/api/tasks?due_before={today}&status=open
    • Headers: Authorization: Bearer
  2. Filter Array: Tasks matching user’s watchlist/assignee.
  3. Apply to Each (User): Compose personalized summary.
  4. Condition (Channel):
    • Teams: Use “Post adaptive card in a chat or channel.”
    • Email: Use “Send an email (V2)” with HTML template.
  5. Log: Write to SharePoint list/Azure Table for audit.

Adaptive Card example (Teams):

 
 
 
 
 
 
JSON
 
 
{
"$schema":"https://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.5",
"body":[
{"type":"TextBlock","size":"Large","weight":"Bolder","text":"Your tasks due today"},
{"type":"TextBlock","text":"Deal: Contoso Acquisition","wrap":true},
{"type":"TextBlock","text":"Task: Legal review — Due: 2025-12-30","wrap":true}
],
"actions":[
{"type":"Action.OpenUrl","title":"Open in Devensoft","url":"https://app.devensoft.com/deals/123/tasks/456"}
]
}
 
Show more lines
 

7.2 Azure Logic Apps (event-driven)

Trigger: Recurrence every 10 minutes (if no webhook).
Workflow:

  1. HTTP GET: GET /api/risks?severity=high&updated_since={lastRun}
  2. For each risk:
    • HTTP GET: Fetch related deal and assigned users.
    • Switch by user preference: Teams/Slack/Email.
  3. Send message:
    • Teams: “Post message” with Adaptive Card
    • Slack: “Chat.PostMessage” with Block Kit
  4. Persist: Write to Azure Table (eventId, userId, sentTimestamp).

Slack Block Kit example:

 
 
 
 
 
 
JSON
 
 
{
"blocks":[
{"type":"header","text":{"type":"plain_text","text":"High-Severity Risk Updated"}},
{"type":"section","text":{"type":"mrkdwn","text":"*Deal:* Contoso Acquisition\n*Risk:* Vendor contract delay\n*Severity:* High\n*Status:* Escalated"}},
{"type":"actions","elements":[
{"type":"button","text":{"type":"plain_text","text":"View in Devensoft"},"url":"https://app.devensoft.com/deals/123/risks/789"}
]}
]
}
 
Show more lines
 

7.3 Python (custom microservice)

Use a lightweight service (e.g., FastAPI + Celery) to poll events and dispatch notifications.

 
 
 
 
 
 
Python
 
 
import os, time, requests
from datetime import datetime, timedelta
 
API_BASE = "https://api.devensoft.com/api"
TOKEN = os.environ["DEVENSOFT_TOKEN"]
HEADERS = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/json"}
 
def get_high_risks(updated_since: str):
url=f"{API_BASE}/risks"
params={"severity":"high","updated_since":updated_since}
r=requests.get(url,headers=HEADERS,params=params,timeout=20)
r.raise_for_status()
returnr.json()# Expect list of risks
 
def notify_email(to_email: str, subject: str, html: str):
# Call your email gateway (e.g., SendGrid/SMTP)
pass
 
def notify_teams(teams_user_id: str, card_payload: dict):
# Call Microsoft Graph to send adaptive card
pass
 
def personalize_and_dispatch(risk, user_pref):
subject=f"[Devensoft] High Risk Updated: {risk['title']}"
link=f"https://app.devensoft.com/deals/{risk['deal_id']}/risks/{risk['id']}"
html=f"""
<h3>High-Severity Risk Updated</h3>
<p><b>Deal:</b> {risk['deal_name']}<br>
<b>Risk:</b> {risk['title']}<br>
<b>Status:</b> {risk['status']}<br>
<a href="{link}">Open in Devensoft</a></p>
"""
if"teams"inuser_pref["channels"]:
# build adaptive card and send via Graph
pass
if"email"inuser_pref["channels"]:
notify_email(user_pref["email"],subject,html)
 
def run():
last_run=(datetime.utcnow()-timedelta(minutes=10)).isoformat()
risks=get_high_risks(last_run)
forriskinrisks:
recipients=resolve_recipients(risk)# map deal/roles to users
foruser_prefinrecipients:
personalize_and_dispatch(risk,user_pref)
 
if __name__ == "__main__":
whileTrue:
try:
run()
exceptExceptionase:
# log and retry/backoff
print("Error:",e)
time.sleep(600)
``
 
Show more lines
 

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)

 
 
 
 
 
 
HTML
 
 
<!doctype html>
<html>
<body style="font-family: Arial, sans-serif;">
<h2 style="margin-bottom:4px;">[Devensoft] Task Overdue</h2>
<p><b>Deal:</b> Contoso Acquisition<br/>
<b>Task:</b> Legal review<br/>
<b>Due:</b> 2025-12-29 (Overdue)</p>
<p><a href="https://app.devensoft.com/deals/123/tasks/456">Open in Devensoft</a></p>
<hr/>
<p>You receive these alerts because of your preferences. <a href="https://preferences.contoso.com">Manage preferences</a>.</p>
</body>
</html>
 
Show more lines
 

Teams (Adaptive Card excerpt)

 
 
 
 
 
 
JSON
 
 
{
"type":"AdaptiveCard",
"version":"1.5",
"body":[
{"type":"TextBlock","text":"Pipeline Stage Changed","size":"Large","weight":"Bolder"},
{"type":"FactSet","facts":[
{"title":"Deal","value":"Contoso Acquisition"},
{"title":"From → To","value":"LOI → IC Review"},
{"title":"Owner","value":"Jane Doe"}
]}
],
"actions":[
{"type":"Action.OpenUrl","title":"Open in Devensoft","url":"https://app.devensoft.com/deals/123"}
]
}
 
Show more lines
 

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.