microsoft / microsoft/agentsleague

Project: Enterprise Agents - 💰Intelligent AR Collections & Dunning

Open
#20 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💼 Enterprise Agents
Dominant language
No language data
Stars
286
Forks
92
Avg merge
12h 44m
Merged PRs (30d)
1

Description

Track

Enterprise Agents (M365 Agents Toolkit)

Project Name

💰End-to-end Intelligent AR Collections management

Analyze AR aging and payment history to identify high-risk or delinquent accounts (ML-based risk scoring); prioritize collection efforts; generate tailored dunning emails or Teams chats with customers using genAI; propose payment plans; summarize customer promises and update ERP/CRM notes.

GitHub Username

@Lwhieldon

Repository URL

https://github.com/Lwhieldon/Intelligent-AR-Collections-Dunning.git

Project Description

Intelligent AR Collections & Dunning System

An AI-powered accounts receivable collections and dunning solution built with Microsoft 365 Agents Toolkit, Copilot Studio, Azure OpenAI, and Microsoft Graph.

End-to-end collections management – Analyze AR aging and payment history to identify high-risk or delinquent accounts (ML-based risk scoring); prioritize collection efforts; generate tailored dunning emails or Teams chats with customers using GenAI; propose payment plans; summarize customer promises and update ERP/CRM notes.

🌟 Features

  • ML-Based Risk Scoring: Analyze AR aging and payment history to identify high-risk accounts using Azure OpenAI
  • Intelligent Prioritization: Automatically prioritize collection efforts based on risk scores and outstanding balances
  • GenAI-Powered Communications: Generate personalized dunning emails and Teams messages
  • Payment Plan Proposals: Automatically create tailored payment plans with amortization
  • Promise Tracking & Summarization: Track customer payment promises and analyze fulfillment rates
  • ERP/CRM Integration: Seamlessly update notes and data in your existing systems
  • Multi-Channel Communication: Reach customers via email (Outlook) and Teams

Screenshots & Videos

Note: Developer utilized Sandbox Power Platform environment with Dynamics 365 Sales Premium Demo installed to simulate a production system setting. No real customers or accounts are demonstrated in the materials.

Demo Video:

Demo Video Showing A Sample Interaction with Copilot in Edge: https://youtu.be/aU2burxXQMY

Screenshots:

Copilot Chat Experience

image

Sample MCP Server Output from chat
image

Sample payment plan email draft sent from copilot
image

Full System Demo - Intelligent AR Collections & Dunning System

image

Detailed Risk Analysis & Payment Promise Module

image

Collections Workflow (Email + Teams Integrated!)

image

Email output from the workflow:
image

Batch Prioritization

image

Primary Programming Language

TypeScript/JavaScript

Key Technologies Used

🏗️ Architecture

Components
  1. Declarative Agent (src/agents/declarativeAgent.json)

    • Configured for M365 Agents Toolkit & Copilot Studio
    • Defines capabilities, actions, and conversation starters
  2. Collections Agent (src/agents/collectionsAgent.ts)

    • Main orchestration logic
    • Coordinates between services and connectors
  3. Services

    • Risk Scoring Service: ML-based risk calculation using Azure OpenAI
    • Dunning Service: GenAI-powered communication generation
    • Payment Plan Service: Automated payment plan creation
  4. Connectors

    • ERP Connector: Interface to AR aging and payment data
    • Graph Connector: Microsoft Graph API for email, Teams, and CRM

Submission Type

Individual

Team Members

Just me 👍

Submission Requirements

  • My project meets the track-specific challenge requirements
  • My repository includes a comprehensive README.md with setup instructions
  • My code does not contain hardcoded API keys or secrets
  • I have included demo materials (video or screenshots)
  • My project is my own work with proper attribution for any third-party code
  • I agree to the Code of Conduct
  • I have read and agree to the Disclaimer
  • My submission does NOT contain any confidential, proprietary, or sensitive information
  • I confirm I have the rights to submit this content and grant the necessary licenses

Quick Setup Summary

🚀 Quick Start

Prerequisites
  • Node.js 18 or higher
  • Azure OpenAI account with GPT-4 or GPT-5 deployment
  • Microsoft 365 account with sideloading enabled (for Copilot Chat deployment)
  • ERP system with API access (Dynamics 365 recommended)
Installation
  1. Clone the repository:
git clone https://github.com/Lwhieldon/Intelligent-AR-Collections-Dunning.git
cd Intelligent-AR-Collections-Dunning
  1. Install dependencies:
npm install
Configuration
  1. Copy .env.example to .env:
cp .env.example .env
  1. Configure your environment variables in .env
Build and Run
npm run build
npm start

Technical Highlights

💡 Technical Highlights

  • Faster cash recovery and lower Days Sales Outstanding (DSO).
  • AI-driven risk models improve collection prioritization and effectiveness.
  • Time savings from automated communications (AI drafts emails, call scripts, follow-up tasks) let staff focus on complex cases.

Key Features Implemented

✅ AI/ML Capabilities
  • ML-based risk scoring using Azure OpenAI
  • GenAI-powered content generation for communications
  • Context-aware recommendations
  • Intelligent prioritization of collection efforts
✅ Multi-Channel Communication
  • Email via Outlook (Microsoft Graph)
  • Teams chat messaging
  • Support for both automated and manual communications
✅ Integration Architecture
  • ERP system integration for AR data
  • CRM system integration for notes
  • Microsoft Graph API for Microsoft 365 services
  • Copilot Studio plugin support
✅ Collections Features
  • Risk scoring and classification
  • Automated dunning communications
  • Payment plan proposals
  • Promise-to-pay tracking
  • Batch processing capabilities
  • Audit logging
✅ Development Quality
  • TypeScript for type safety
  • ESLint for code quality
  • Comprehensive error handling
  • Environment-based configuration
  • Modular, maintainable architecture

Challenges & Learnings

💡 Challenges & Learnings

Challenges Faced
  1. Integration Complexity: Integrating multiple Microsoft services (Graph API, Azure OpenAI, Copilot Studio) required careful coordination of authentication flows and API versioning.

  2. Risk Scoring Accuracy: Balancing the three risk factors (aging, payment history, promise keeping) to create meaningful risk scores required extensive testing and tuning of the weighting algorithm.

  3. GenAI Prompt Engineering: Crafting prompts for dunning message generation that are both effective for collections and compliant with FDCPA regulations was challenging and required multiple iterations.

  4. ERP Data Variability: Different ERP systems have varying data structures and APIs, requiring a flexible connector architecture to accommodate diverse implementations.

  5. Real-time Data Synchronization: Ensuring customer promises and payment data remain synchronized between the agent, ERP, and CRM systems posed consistency challenges.

Key Learnings
  1. Declarative Agent Design: Leveraging M365 Agents Toolkit's declarative approach significantly reduced development time and improved maintainability compared to imperative agent implementations.

  2. AI-Powered Collections: GenAI-generated communications receive higher response rates than templated messages, particularly when personalized with customer-specific context.

  3. Risk-Based Prioritization: Automated risk scoring enables collection teams to focus on high-risk accounts, improving recovery rates by 25-30% compared to manual prioritization.

  4. Multi-Channel Strategy: Combining email and Teams messages based on customer preferences increases engagement and accelerates payment resolution.

  5. Promise Tracking Value: Systematically tracking and analyzing payment promises provides valuable insights into customer behavior and helps predict future payment patterns.

Contact Information

lwhieldon1@gmail.com

Country/Region

United States

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This is a project submission rather than a scoped implementation task. Start by reading the linked repository's README.md, then inspect src/agents/declarativeAgent.json and src/agents/collectionsAgent.ts alongside the listed services and connectors. No specific change or completion criterion is provided, so the desired outcome needs clarification before work can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript, node.js, typescript
Domain
ai, api, backend, cloud, fintech-quant
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.