---
title: Use Cases
description: "### When contract is active send data to database Customer is using M-Files for incoming invoices. In a relevant software, invoice gets processed and OCRed, and then sent for approval to relevant persons. When invoice is approved, data is sent…"
url: "https://extensionkit.unitfly.com/documentation/sql-integration-use-cases/"
updated: "2025-05-01"
category: Configurations / SQL Integration
---

# Use Cases

### When contract is active send data to database

Customer is using M-Files for incoming invoices. In a relevant software, invoice gets processed and OCRed, and then sent for approval to relevant persons. When invoice is approved, data is sent for processing to ERP systems.

#### Configuration

When Contract become Active rule will be executed.

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-49.png)
Configuration of SQL Integration

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-50.png)
Configuration of SQL Integration

The result of this configuration will be the execution of a stored procedure and adding Contract data from M-Files to the database.

### When invoice is approved, send data for processing to database

Customer is using M-Files for incoming invoices. In a relevant software, invoice gets processed and OCRed, and then sent for approval to relevant persons. When invoice is approved, data is sent for processing to ERP systems.

#### Configuration

When AP Invoices entered state, Approved rule will be executed.

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-51.png)

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-52.png)

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-53.png)

![](https://extensionkit.unitfly.com/wp-content/uploads/2025/05/image-54.png)

The result of this configuration will be the execution of a stored procedure and adding Invoice data from M-Files to the database.
