Expense Policy Decision Engine (Policy API Integration)
Last updated
Was this helpful?
Last updated
Was this helpful?
This Expense Policy Decision Engine (Policy API Integration) template is a workshop that builds on the of the and introduces a simulated API integration. Instead of using a real external API, this class uses GLIK Knowledge to simulate an API response containing policy rules (such as spending thresholds and vendor blacklists).
Participants will:
Learn how to use the to simulate calling an external policy API.
Dynamically assign and evaluate retrieved rules in an expense approval workflow.
Understand how internal knowledge objects can act as structured data endpoints.
This simulation sets the stage for connecting to real enterprise APIs in later stages.
A workflow that:
Accepts an uploaded invoice file
Extracts invoice metadata
Retrieves policy rules (thresholds, blacklists) from GLIK Knowledge
Applies conditional logic to approve, reject, or escalate
if no rule applies
Create a new memory object with the following JSON content:
Apply these tags:
type:policy
demo:true
Required Blocks:
📥 Start
📄 Doc Extractor
🧠 Knowledge Retrieval Block (query: type:policy AND demo:true
)
🧮 Conditional Block (compare values from invoice_data
to policy_memory
)
🤖 LLM Block (fallback)
✅ Answer or End Block
Variables Used:
invoice_data
policy_memory
approval_result
conversation_notes
Modify the policy memory with a tighter threshold
Add a new blacklisted vendor
Re-upload the workflow and re-run with different invoice PDFs to test the logic path
Structured data in memory vs. static config
Simulated API integration
Conditional logic based on dynamic variables
Querying GLIK Knowledge by tag
Using fallback reasoning for exception cases
After this class, learners are ready to:
Integrate real external APIs (e.g., using API Call
blocks)
Use branching logic to support multi-policy contexts
Expand the workflow into a full Expense Audit Engine