Skip to content

Administration: AI Parsing

The AI Parsing module requires a connection to the external Apertia.ai service and correct email source configuration to function.

Installation and Initial Setup

  1. Install the extension via Administration -> Extensions.
  2. Go to Administration -> Integrations -> AiParsing.
  3. Fill in the credentials:
    • Endpoint: API service URL (e.g., https://api.apertia.ai/v1).
    • Token: Your API key.
  4. Save and verify connection (if test button is available, otherwise it verifies on first attempt).

Behavior Configuration

Global settings can be found in Administration -> Settings (AI Parsing section).

Email Automation

For automatic invoice extraction from emails, monitored mailboxes must be defined.

  • Parsable Emails: List of email addresses (your company ones) where invoices are received. If an email arrives at one of these addresses (To field), the system checks attachments.
  • Parsable Entities: Which document types should be created (typically SupplierInvoice - Received Invoice).

Matching Logic

  • Entity Matching Mode:
    • Create if not found: If the system does not find a supplier by RegID/Name, it creates a new Account record.
    • Await existing: If the supplier does not exist, the process stops and waits for manual intervention.
  • Auto Completion:
    • If enabled, the system attempts to create the target document immediately after analysis.
    • If disabled (recommended for verification), the record remains in Parsed status and the user must confirm data.

Monitoring and Troubleshooting

Logs

All module actions are logged to the standard EspoCRM log (data/logs/espoch-*.log). Look for the keyword [AiParsingRecord].

Common Errors

  1. Record stuck in Sent status:
    • Check if the CRM server is accessible from the internet (for webhook reception).
    • Verify siteUrl configuration in CRM – webhook URL is generated based on this address.
  2. "No attachments found" error:
    • The email did not contain an attachment or the attachment format was ignored (usually PDF, JPG, PNG are supported).
  3. Authentication error:
    • Verify token validity in Integrations.