# How to add Microsoft Teams to Macola

> Source: https://netray.co/integrations/macola-microsoft-teams
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Build a Teams bot or workflow that watches Macola's database for events like POs awaiting approval or orders on credit hold, posts adaptive cards to the right channel or person, and returns the decision to a controlled write path. Entra ID identifies who clicked, and your on-prem Macola stays behind your firewall.

## System

Macola

## Capability

microsoft-teams

## Intro

Many Macola companies already live in Microsoft 365. Email and Teams are where managers actually are, but approvals in Macola still wait for someone to open the client, find the document and act. The result is POs sitting for days and credit holds that nobody notices until a customer calls.

Teams is a good fit because it supports structured messages with buttons, a real identity for the approver and a record of the decision. The integration does not need to replace Macola screens; it needs to deliver the right item to the right person with enough context to decide.

The design question for a Macola shop is where the bridge runs. Most installs are on-premises, so the practical pattern is an outbound-only connector from a server in your network to Microsoft's cloud, with decisions pulled back rather than pushed in.

## Use Cases

### Purchase order approvals

**Description:** A PO above a spend limit posts an adaptive card to the approving manager with vendor, lines, total and budget context, with Approve and Reject buttons.

### Credit hold review

**Description:** Orders held for credit show up in a finance channel with open AR balance and aging so a controller can release or decline.

### Shortage and expedite alerts

**Description:** When a required component shows negative availability against a firm job, planners get a card listing the job, the item and the open supply.

### Customer order desk

**Description:** Sales reps ask a bot for order status by typing the order number in a chat and get the header and line summary back.

### Daily shipment digest

**Description:** A morning post lists orders due to ship today and anything past due, linked to a read-only report.

### Quality and receiving flags

**Description:** Receiving exceptions such as over-shipments or rejected lots notify purchasing and quality in a single thread.

## System Surface

- Read events from the Macola SQL Server database using a polling query keyed on status and date columns, or on a log table your admin maintains. Exact table names vary by version, so confirm them against your schema.
- PO approval logic in Macola may be configured by user limits or by an add-on; map your actual approval rule rather than assuming a standard workflow.
- Decisions that change data must use a Macola-supported interface, such as a licensed web service or an import routine, because posting and audit logic is in the application layer.
- User identity mapping is a manual table: Entra ID user principal name to Macola user ID.
- Reports and drill-through links can point to a read-only reporting site or Crystal-style reports if your shop uses them.

## How It Works

### Pick the integration style

**Detail:** Use Power Automate for simple alerts, or an Azure Bot Framework app (or Teams webhook workflow) when you need two-way approvals and custom logic.

### Register the app in Entra ID

**Detail:** Create an app registration with the minimum Graph and bot permissions and restrict installation to the relevant teams.

### Build the Macola event reader

**Detail:** An on-prem service polls for new approval-needed rows and writes them to its own queue table with a stable idempotency key.

### Send adaptive cards

**Detail:** Render the card with key fields and a deep link to the document, then store the Teams message and activity IDs.

### Map identity and authorize

**Detail:** On button click, resolve the Entra user, map to the Macola user, and verify they have authority for this PO or order.

### Apply decision through a controlled path

**Detail:** Write the approval via your supported interface, or write to a staging table that an approved Macola routine consumes.

### Update the card and log

**Detail:** Replace the card with the outcome and keep an audit row with approver, time and Macola document reference.

## Example Flows

### PO approval in Teams

**Trigger:** A buyer saves a PO whose total exceeds the department limit.

**Steps:**

- The poller sees the PO flagged as awaiting approval.
- An adaptive card goes to the approver with vendor, lines and total.
- The approver clicks Approve; the bot verifies their Macola approval limit.
- The decision is applied through the supported interface.

**Result:** The PO is released the same day instead of waiting for someone to open the Macola client, and the audit trail shows who approved it.

### Credit hold triage

**Trigger:** An order is placed on credit hold at entry.

**Steps:**

- A card posts to the finance channel with customer, order value and AR aging.
- A controller replies Release, Decline or Ask Sales.
- Release is queued for review and applied by an authorized user path.

**Result:** Held orders get a visible owner and a response, reducing late-shipped orders caused by forgotten holds.

## On Prem

Teams is cloud-hosted, but the Macola side can stay fully on-premises. Run the bridge service on a server inside your network with a read-only SQL login, and let it make only outbound HTTPS calls to Microsoft endpoints. For button callbacks, either expose a narrow endpoint behind a reverse proxy or have the service poll a relay queue. Keep card content minimal: document number, vendor or customer name and totals, with a link that requires VPN or internal network access to open the full record. If you add natural-language Q&A in a Teams bot, host the model locally on your own GPU server so ERP content is not sent to an outside model API.

## Security

- Use Entra ID single sign-on and map each Teams user to a named Macola user; do not run decisions as a shared service account without a recorded approver.
- Enforce approval limits server-side by re-checking Macola rules at decision time, not just when the card is built.
- Give the bot read-only database access and restrict its write path to a single approved action.
- Limit the bot to specific teams and channels, and avoid including line pricing in broad channels.
- Keep an immutable log of card sends and decisions tied to Macola document numbers.

## Options

### Power Automate with an on-prem data gateway

**Fit:** Good for one-way alerts and simple approvals if you can expose a SQL view and your licensing allows it.

**Effort:** Days to two weeks.

### Custom Teams bot built in-house

**Fit:** Suits teams with .NET or Node developers who know the Macola schema and approval rules.

**Effort:** Roughly three to six weeks for approvals plus alerts.

### Partner build with Netray and a Macola reseller

**Fit:** Fits shops wanting approvals, a Q&A assistant on local models and clear audit controls.

**Effort:** A scoped pilot is typically a few weeks, depending on your licensed Macola interface.

## Pitfalls

- Letting a Teams click write directly into PO tables and bypass Macola approval logic.
- Duplicate cards because the poller has no idempotency key when it restarts.
- Posting full cost detail into a channel with guests or broad membership.
- Forgetting to refresh or retire cards when the PO is changed or cancelled in Macola.
- Mismatch between Entra and Macola user lists after staff changes.

## Faq

### Is there a standard Macola connector for Teams?

**Answer:** I would not assume one. Some resellers or add-on vendors may offer notification tools, so ask yours. Otherwise you build a small bridge using the database for reads and a supported interface for writes.

### Can approvers act from the Teams mobile app?

**Answer:** Yes. Adaptive cards work in the Teams mobile client, so approvers can act away from the office. Make sure the card carries enough context and that any deep link needs VPN or an internal network.

### Does the bot need to be hosted in Azure?

**Answer:** The bot endpoint must be reachable by Microsoft's service, but you can host it on your own infrastructure behind a reverse proxy, or use a polling relay. The Macola database does not have to leave your network.

### How do we keep approval limits enforced?

**Answer:** Re-check the approver's authority against Macola data at the time of the click, not when the card was sent. Reject the action if the PO changed, the limit is exceeded, or the user is not mapped.

### Can Teams chat answer ERP questions too?

**Answer:** Yes, a bot can answer status questions using read-only queries. Constrain it to approved views, show the source records, and host the language model locally if the data must not leave your environment.

## Search terms

macola microsoft teams integration, teams for macola, macola teams bot, macola approval workflow teams, macola purchase order approval teams, macola adaptive cards, macola erp teams notifications, macola power automate teams, exact macola microsoft teams, macola 10 teams integration

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
