Smart Actions by Lodol
API actions for the Smart Actions by Lodol integration.
Smart Actions by Lodol
Perform intelligent actions like validation and extraction using Lodol's built-in Smart Actions.
Classify an expense transaction
Sort an expense into one of your categories, with an optional sub-category, and flag anything uncertain or miscellaneous for review.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_data | object | Yes | The expense to classify, with its date, amount, currency, merchant, and description. |
category_list | array | Yes | The list of categories to choose from, such as your general ledger (GL) codes. Include 'Miscellaneous' in the list if you want that option available. |
Response
{
"explanation": "Classified as travel based on flight-related merchant and description.",
"primary_category": "Travel",
"requires_review": false,
"sub_category": "Airfare"
}Extract fields from a document
Pull the fields you name out of a document and save them for later steps.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
filepath | string | Yes | Upload the source document or enter a URL. |
fields | array | Yes | The names of the fields to pull from the document. |
Response
{
"fields": [
{}
]
}Extract and validate an invoice
Read the key details from an invoice, assign a general ledger (GL) code, check that the line items and totals add up, and flag any problems found.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file | string | Yes | Upload an invoice or enter a URL. |
Response
{
"currency": "USD",
"due_date": "2025-01-31",
"gl_code": "Software Subscription",
"invoice_date": "2025-01-01",
"invoice_number": "INV-1001",
"line_items": [
{
"description": "Software subscription",
"quantity": 1,
"total": 99.0,
"unit_price": 99.0
}
],
"requires_review": false,
"subtotal": 99.0,
"tax": 0.0,
"total": 99.0,
"validation_errors": [],
"vendor_name": "Example Vendor"
}Check if a lead fits your ideal customer profile
Check whether a lead matches your ideal customer profile. Returns a yes-or-no decision with a fit score and the reason.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
company | string | Yes | The company name to evaluate. |
email | string | No | The contact's email address, for extra context. |
name | string | No | The contact's name, for extra context. |
Response
{
"company": "Acme Corp",
"email": "jane@example.com",
"is_qualified": true,
"name": "Jane Doe",
"reason": "Company matches target profile criteria.",
"score": 85
}Reconcile invoices against a purchase order
Read one or more invoices and compare them against a purchase order to find any mismatches.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_files | array | Yes | Upload invoices or enter URLs. |
purchase_order | array | Yes | The lines on the purchase order. For each one, give the description, quantity, and price per unit. |
total | number | Yes | The total amount for the purchase order. |
Response
{
"discrepancies": [],
"requires_review": false
}Validate a receipt for reimbursement
Read the details from a receipt and check it against your expense policy. Flags spending-limit breaches, duplicate submissions, late submissions, and mismatches with the recorded transaction.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
receipt_file | string | Yes | Upload a receipt or enter a URL. |
transaction | object | No | Optional details of the matching payment (date, amount, currency, merchant, and category) to compare the receipt against. |
require_itemization | boolean | No | Set to true to require the receipt to list individual line items. Defaults to true. |
category_policies | object | No | Optional rules for each expense category. For a category you can set the most days allowed between the purchase and submission, and the highest receipt amount allowed. |
fallback_max_days_after_transaction | number | No | The most days allowed between purchase and submission when a category has no rule of its own. Defaults to 30. |
fallback_spending_limit | number | No | The highest receipt amount allowed when a category has no rule of its own. Defaults to 500. |
Response
{
"currency": "USD",
"merchant_name": "mock_value",
"policy_compliant": true,
"policy_violations": [],
"total_amount": 42.0,
"transaction_date": "2025-01-01"
}Validate a resume against job requirements
Check a resume against the job requirements you provide.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
filepath | string | Yes | Upload a resume PDF or enter a URL. |
requirements | string | Yes | The job requirements to check the resume against. |
Response
{}