Lodol Docs

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.

Classifies an expense into a primary category and optional sub-category from your provided list, and flags uncertain or miscellaneous classifications for review.

Parameters

ParameterTypeRequiredDescription
transaction_dataobjectYesTransaction object with date, amount, currency, merchant, and description.
category_listarrayYesList of valid classification categories / GL codes. Include 'Miscellaneous' in this list if you want that category to be available.

Response

{
  "explanation": "Classified as travel based on flight-related merchant and description.",
  "primary_category": "Travel",
  "requires_review": false,
  "sub_category": "Airfare"
}

Extract specified fields from a document.

This action extracts specified fields from a document and stores them for further use. It allows you to specify which fields to extract based on their names.

Parameters

ParameterTypeRequiredDescription
filepathstringYesUpload the source document or enter a URL.
fieldsarrayYesList of field names to extract

Response

{
  "fields": [
    {}
  ]
}

Extract and validate an invoice.

This action extracts key invoice fields, determines a GL code, validates line-item and overall totals, and returns structured invoice data with validation errors.

Parameters

ParameterTypeRequiredDescription
filestringYesUpload 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 ICP qualification.

Check if a lead matches the Ideal Customer Profile. Returns a qualification decision with a score and reason.

Parameters

ParameterTypeRequiredDescription
companystringYesCompany name to evaluate.
emailstringNoContact email (optional context).
namestringNoContact name (optional context).

Response

{
  "company": "Acme Corp",
  "email": "jane@example.com",
  "is_qualified": true,
  "name": "Jane Doe",
  "reason": "Company matches target profile criteria.",
  "score": 85
}

Reconcile invoice(s) against a purchase order.

This action extracts fields from one or more invoices and compares them against a purchase order to identify compliance discrepancies.

Parameters

ParameterTypeRequiredDescription
invoice_filesarrayYesUpload invoices or enter URLs.
purchase_orderarrayYesPurchase order line items. Each item has a description, quantity, and unit_price.
totalnumberYesTotal amount for the purchase order.

Response

{
  "discrepancies": [],
  "requires_review": false
}

Validate a receipt for reimbursement.

This action extracts receipt fields and validates policy compliance against transaction data, category policies, duplicate submissions, and submission timing limits.

Parameters

ParameterTypeRequiredDescription
receipt_filestringYesUpload a receipt or enter a URL.
transactionobjectNoOptional transaction context with date, amount, currency, merchant, and category.
require_itemizationbooleanNoWhether itemized line items are required (default true).
category_policiesobjectNoOptional category policy map. Each category can specify max_days_after_transaction (maximum days allowed between transaction and submission) and spending_limit (maximum receipt amount for that category).
fallback_max_days_after_transactionnumberNoFallback max days allowed after transaction (default 30).
fallback_spending_limitnumberNoFallback spending limit when category policy is missing (default 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.

This action validates a resume to ensure it meets provided job requirements.

Parameters

ParameterTypeRequiredDescription
filepathstringYesUpload a resume PDF or enter a URL.
requirementsstringYesThe job requirements to validate against

Response

{}

On this page