# Expense Policy Decision Engine (Starter)

This workshop introduces the **starter version** of the Expense Policy Decision Engine — a simple, document-driven GLIK agent that evaluates expense submissions against organizational policy thresholds.

The goal of this lesson is to give participants hands-on experience working with GLIK’s orchestration interface, memory objects, conditional logic, and agent-based decision routing. It is ideal for first-time users or teams exploring how GLIK can automate legacy, rules-based workflows.

<details>

<summary>Implementation Support &#x26; Expert Guidance</summary>

Need assistance deploying or customizing this GLIK template for your organization?

Our team offers dedicated coaching and technical walkthrough sessions to ensure successful adoption and alignment with enterprise requirements.

Typical areas of support include:

* Template onboarding and orchestration strategy
* Workflow configuration and logic review
* Memory variable setup and session handling
* Custom integration guidance (e.g. plugins, APIs)
* [Request a Session](mailto:undefined)

</details>

### 🔍 What This Agent Does

This GLIK agent automates the first stage of policy enforcement by evaluating uploaded expense documents (such as receipts or invoices) against preset business logic defined in a policy file. The agent can:

* Ingest receipts (PDF/image)
* Extract fields (amount, category, vendor, etc.)
* Compare extracted values to rules from a policy document
* Decide to **approve**, **reject**, or **escalate** based on thresholds or ambiguity

<figure><img src="/files/FMyJ6jWkdMY4QSj2WrR7" alt=""><figcaption><p>Sample Expense Report — This invoice will be used in the Starter template walkthrough to demonstrate how the GLIK agent evaluates policy compliance based on extracted data.</p></figcaption></figure>

### 🧩 Key Components

| Component             | Function                                                          |
| --------------------- | ----------------------------------------------------------------- |
| **Start Block**       | Accepts file uploads (receipts, invoices) and optional user notes |
| **Doc Extractor**     | Parses uploaded documents into structured key-values              |
| **Data Enrichment**   | Normalizes formats and adds metadata (optional)                   |
| **Variable Assigner** | Stores parsed values in memory as `invoice_data`                  |
| **IF/ELSE Logic**     | Compares values against the uploaded policy memory                |
| **LLM Block**         | Adds explanation or fallback reasoning if logic is unclear        |
| **End Block**         | Outputs a decision response (approve/reject/escalate)             |

### 🎓 Learning Outcome

By completing this lesson, participants will be able to:

* Build and test a working GLIK agent using real invoice examples
* Understand how file parsing and scoped memory interact in GLIK
* Modify logic thresholds in the policy document to control agent behavior
* Identify key escalation points and extend functionality in later versions

***

### 📁 Practice Materials

> You can use the following sample receipts and policy files to test the agent template.

**Google Drive Folder:** [Access Example Files](https://drive.google.com/drive/u/4/folders/1vsqVOVTpaMwrtEsWBLqxQwlNeNaU8kuo)

*Receipts and policy book samples are provided in the folder above. These materials are for testing purposes only and can be substituted with actual enterprise documents when ready.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glik.ai/templates/policy-automation/expense-policy-decision-engine/expense-policy-decision-engine-starter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
