From AI Recommendation to Business Approval: Integrating Oracle AI Data Platform with Microsoft Teams
In my previous Blog, I demonstrated how Oracle AI Data Platform (AIDP) can analyze customer behavior and generate intelligent sales discount recommendations. In this article, I focus on what happens next—turning those AI recommendations into business decisions by integrating Oracle AI Data Platform with Microsoft Teams using Power Automate and Oracle ORDS.
AI Doesn't End with a Recommendation
One of the biggest misconceptions in Enterprise AI is believing that generating an AI recommendation is the final step.
It isn't.
An AI model can recommend the optimal sales discount, identify a fraudulent transaction, predict customer churn, or classify invoices. However, in most enterprise environments, these recommendations still require human approval before they become business actions.
Unfortunately, this is where many AI initiatives lose momentum.
The recommendation sits in a database.
Someone exports it into Excel.
An approval email is sent.
A manager reviews the request.
Someone manually updates the ERP system.
Although AI generated the insight in seconds, the approval process can take hours—or even days.
The real challenge isn't building AI.
It's embedding AI into the business workflow.
Bringing AI Where Users Already Work
Rather than building another approval application, we decided to integrate the approval process directly into Microsoft Teams.
Teams is already where business users collaborate, discuss opportunities, approve documents, and communicate with colleagues.
This approach reduces context switching, improves adoption, and significantly shortens the decision cycle.
Overall Solution Architecture
Once Oracle AI Data Platform generates a discount recommendation, the approval workflow begins.
Each component has a clearly defined responsibility, making the solution loosely coupled, secure, and easy to extend.
Step 1 – AI Stores the Recommendation
The AI notebook writes the recommended discount into Oracle Autonomous Transaction Processing (ATP).
Each recommendation includes information such as:
- Customer Name
- Customer Tier
- Payment Rating
- Recommended Discount
- Run ID
- Approval Status
Every new recommendation is inserted with the status:
PENDINGAt this stage, the recommendation is awaiting business approval.
Immediately after inserting the record, the notebook invokes a Power Automate HTTP endpoint, passing only the information required for the approval request.
The AI process ends here.
From this point onward, Power Automate orchestrates the workflow.
Step 2 – Power Automate Creates the Approval Request
Power Automate acts as the orchestration engine.
After receiving the notification from Oracle AI Data Platform, it constructs a Microsoft Teams Adaptive Card.
The card contains the information an approver needs to make an informed decision, including customer details, payment rating, customer tier, and the AI-recommended discount percentage.
Rather than polling for updates, the workflow uses the "Post Adaptive Card and wait for a response" action.
This allows the flow to pause until someone submits the approval, resulting in a cleaner, event-driven design.
Step 3 – Business Users Approve Directly in Microsoft Teams
The approval request appears directly inside Microsoft Teams.
Approvers don't need to:
- Open another application
- Search for the request
- Log into Oracle
- Review spreadsheets
Everything required to make the decision is presented within the Adaptive Card.
The user simply selects Approve or Reject and clicks Submit.
The response automatically includes the approver's Microsoft identity, eliminating manual data entry and ensuring accountability.
Step 4 – Protecting Oracle APIs with OAuth2
One of the most important aspects of this solution is security.
Microsoft Teams never communicates directly with Oracle ATP.
Instead, Power Automate first requests an OAuth2 access token from Oracle REST Data Services (ORDS).
Only after successful authentication does ORDS issue a bearer token.
Power Automate then calls the protected approval API using that token.
Without a valid OAuth2 token, the request is rejected with an HTTP 401 Unauthorized response.
This ensures that only trusted applications can update approval records.
Step 5 – Oracle ORDS Updates the Approval
The protected ORDS endpoint validates the token before executing the approval logic.
The PL/SQL handler updates the recommendation only if its current status is still PENDING, preventing duplicate approvals or stale Teams cards from modifying an already processed request.
Once the update succeeds, Oracle ATP records:
- Approval Status
- Approver Name
- Approval Timestamp
Oracle ATP remains the single source of truth throughout the entire workflow.
Step 6 – Closing the Loop
After successfully updating Oracle ATP, Power Automate posts a confirmation message back into Microsoft Teams.
The team immediately knows:
- Who approved the request
- Whether it was approved or rejected
- When the decision was made
This creates a transparent and fully auditable approval process without relying on emails or manual notifications.
Why This Pattern Works
Although this implementation was built for AI-driven discount approvals, the architecture is applicable to many enterprise scenarios.
The recommendation engine can be replaced with any AI model, while the approval workflow remains unchanged.
Examples include:
- Credit Limit Approvals
- Purchase Order Approvals
- Invoice Exception Handling
- Vendor Onboarding
- Order Holds
- Insurance Claims
- Risk Assessments
The pattern is simple:
AI recommends. Humans decide. Enterprise systems record the outcome securely.
Final Thoughts
The success of Enterprise AI is determined not only by the quality of its predictions but by how seamlessly those predictions fit into existing business processes.
By integrating Oracle AI Data Platform with Microsoft Teams, Power Automate, Oracle ORDS, and Oracle ATP, we transformed AI recommendations into secure, auditable business decisions without introducing another application for end users.
This Human-in-the-Loop architecture keeps people in control while allowing AI to accelerate decision-making, improve productivity, and strengthen governance.
In my view, this is where Enterprise AI delivers its greatest value—not by replacing human judgment, but by empowering it.
Comments
Post a Comment