# Best Practices for Agentifying ERP Workflows

Legacy ERP systems like **SAP**, **NetSuite**, **PeopleSoft**, and **Oracle EBS** are notoriously difficult to integrate with modern automation platforms. GLIK enables a non-invasive, AI-native approach by embedding orchestration logic outside the ERP boundary.

Here are best practices to follow:

#### 1. **Target File-Based Surfaces First**

Most ERPs generate structured output as:

* PDF invoices
* CSV exports
* Excel-based ledgers
* Email-based approvals or exceptions

Use these as the **entry point** for your GLIK workflow instead of trying to interface directly with the ERP backend.

<details>

<summary>In Progress</summary>

This page is currently under active development. Content may be incomplete, evolving, or placeholder-only. Please check back later for finalized documentation and fully structured examples.

</details>

#### 2. **Use OCR and Classifiers to Bridge Structured + Semi-Structured Inputs**

Blocks like `Doc Extractor` and `Question Classifier` let you turn PDFs or form exports into actionable signals. This is critical when dealing with:

* Expense receipts
* Supplier forms
* Procurement logs

#### 3. **Load Internal Logic via Knowledge Retrieval**

Instead of hardcoding policy logic, define your:

* Thresholds
* Blacklisted vendors
* Approval hierarchies\
  in a Markdown or CSV file, then use `Knowledge Retrieval` to pull and apply them dynamically.

This makes your workflows portable across departments — even if each one has a different policy schema.

#### 4. **Treat Approval Chains as Agent Loops**

Where ERPs traditionally rely on multi-step human review flows:

* Use `Loop` and `IF/ELSE` blocks to simulate those steps
* Add `Agent` blocks to represent managers, reviewers, or compliance units
* Use `Template` or `HTTP Request` blocks to output approvals or escalate issues via email or Slack

#### 5. **Log Everything for Auditors**

ERP replacements often fail because they lose visibility. Use:

* `Variable Aggregator`
* `Code` block
* `Save Point Agent` (or custom Template → JSON output)\
  to generate a complete trail of decisions, timestamps, and policy sources.

***

### GLIK vs Traditional RPA/BPM Tools

| Aspect                    | Traditional RPA / BPM           | GLIK AI Orchestration                            |
| ------------------------- | ------------------------------- | ------------------------------------------------ |
| **Integration method**    | UI scripting, screen scraping   | Agent-based logic via files, forms, memory, LLM  |
| **Deployment speed**      | Weeks/months                    | Hours/days                                       |
| **System risk**           | Modifies fragile interfaces     | Wraps around existing systems (non-invasive)     |
| **Automation logic**      | Rules, flows, macros            | LLMs + agents + knowledge-based policy execution |
| **Resilience**            | Breaks on UI changes or updates | Abstracted from UI or code-level changes         |
| **Memory & policy reuse** | Siloed automations              | Scoped variables, reusable policy logic          |
| **Escalation path**       | Hard-coded, rarely dynamic      | Agent delegation + human-in-the-loop compatible  |
