Skip to main content

Getting Started with TruvioSense​

This guide walks through installing and setting up TruvioSense in a Business Central environment.

Before starting, ensure the following prerequisites are met:

  • Microsoft Dynamics 365 Business Central online, version 26.2 or later
  • ExFlow - Accounts Payable Automation extension installed
  • Administrative access to Business Central, including permission to create Job Queue Entries in all companies
  • An Authentication Email on the Business Central user that runs the onboarding
  • Pop-up windows allowed in the browser for Business Central
  • At least 3–6 months of historical invoice data for best results

IT Admin Setup Guide​

The first section of this guide is intended for IT administrators who are preparing a Microsoft Entra tenant for the Truvio Core API integration.

To enable secure communication between the TruvioSense AI service, a dedicated service user needs to be created.

Before the service user can sign in from the ERP to the Core API, an IT administrator must:

  1. Ensure a dedicated service user exists in Microsoft Entra ID that will be used to authenticate from the ERP.
  2. Grant tenant-wide admin consent to the Truvio Entra application.
  3. Assign the Truvio.SubscriptionService app role to the service user.

Once these prerequisites are complete, the service account can be used to sign in from the ERP to connect to the Core API.

Prerequisites​

  • An account with permission to grant tenant-wide admin consent for applications in Microsoft Entra (typically a Global Administrator or Privileged Role Administrator).
  • Access to the Azure portal with rights to manage Enterprise applications in the tenant.
  • A service user available in Microsoft Entra ID (create one if it does not already exist).

This guide describes the steps a Microsoft Entra administrator must complete before a user can sign in from the ERP to the Truvio Core API.

Step 1: Prepare a Service User in Entra​

Create (or identify) a dedicated service user in Microsoft Entra ID that will be used to authenticate from the ERP to the Core API.

The service user should be a standard member account in the tenant. Treat the credentials as a shared service identity and store them securely.

As a tenant administrator, open the admin consent link below in a browser and sign in with an account that has permission to grant tenant-wide consent.

Review the requested permissions and click Accept to grant tenant-wide consent.

After consent is granted, the Truvio application will appear in the tenant under Microsoft Entra ID -> Enterprise applications.

Step 3: Assign the Truvio.SubscriptionService App Role to the Service User​

  1. Sign in to the Azure portal.
  2. Navigate to Microsoft Entra ID -> Enterprise applications.
  3. Locate and open the Truvio application that was consented in Step 2.
  4. Go to Users and groups -> Add user/group.
  5. Under Users, select the service user created in Step 1.
  6. Under Select a role, choose Truvio.SubscriptionService.
  7. Click Assign.

Only principals that have been assigned the Truvio.SubscriptionService app role will be able to authenticate to the Core API.

Step 4: Set Up TruvioSense in Business Central​

All steps outside of the ERP system are now complete. The remaining steps take place in Business Central.

The setup page is called TruvioSense - Coding & Approvals Setup. Open it by searching for the page name, or from ExFlow Setup --> TruvioSense - Coding & Approvals --> TruvioSense setup.

The setup page controls TruvioSense for all companies in the database from one place. The company list shows every company. Selecting a company in the list updates the Companies section and the Vendors section to show the settings for that company. The page opens with the current company selected, and the current company is shown in bold. Companies cannot be added or deleted on this page.

The page has three sections:

  • Companies (top) — the job queue category for the selected company, plus the status fields Job handler scheduled and Continuous export enabled
  • Company list — all companies in the database, with Company identifier and Enabled. The current company is shown in bold
  • Vendors (bottom) — the vendors of the company selected in the list

Companies section

FieldDescription
Job queue categoryThe job queue category used for the TruvioSense jobs in the selected company. The category must exist in that company. A category is required before the job handler can be scheduled
Job handler scheduledYes when the TruvioSense job handler exists in the job queue. The job handler is shared by all companies. Read-only
Continuous export enabledYes when the TruvioSense service is available, so that documents are exported as soon as they are created. ExFlow can switch this off for a while if the service does not respond. Read-only

Company list

FieldDescription
NameThe name of the company. Read-only
Company identifierThe name of the company as it is sent to the TruvioSense service, in a URL-safe format. Read-only
EnabledActivates TruvioSense for the company. Documents are only exported for enabled companies. A company cannot be enabled until the data upgrade has run

Vendors section

FieldDescription
Vendor No.The vendor number
NameThe vendor name
EnabledActivates TruvioSense for the vendor. Documents from the vendor are exported and used to predict coding in the ExFlow Import Journal
StatusThe latest status for the vendor from the TruvioSense service. Use it to find vendors with problems
Document images sentThe number of document images sent for the vendor. Drill down to open TruvioSense Documents filtered on the vendor's sent documents

The Vendors section also has the actions Enable all vendors and Disable all vendors, which change all vendors in the selected company at once.

Install the extension​

  1. Open Business Central
  2. Search for Extension Management
  3. Install TruvioSense - Coding & Approvals by SignUp Software AB
  4. Wait for installation to complete
  5. Restart the session if prompted

Run data upgrade​

  1. Open TruvioSense - Coding & Approvals Setup
  2. Select Related --> Run data upgrade

The data upgrade runs for all companies in the database. It prepares the existing ExFlow document references, creates the default Prediction mapping, and sets the starting point for the initial export per vendor. A company cannot be enabled, and View predictions stays unavailable, until the data upgrade has run.

Onboard​

The onboarding connects the Business Central environment to the TruvioSense service. Use the service user prepared in Steps 1–3.

  1. In TruvioSense - Coding & Approvals Setup, select Onboarding --> Onboard
  2. Welcome — select Next
  3. Login — a separate window opens. Sign in with the service user and complete the steps in that window, then return to the onboarding page. If the window does not open, allow pop-ups for the site and try again. This step is skipped if the environment is already signed in
  4. Register — review the information that identifies the environment to TruvioSense:
    • URL — the Business Central environment URL
    • ERP System Name — BC
    • Onboarding Usage — External or Internal, taken from ExFlow Global Setup
    • Environment Type — the type of environment, for example production or sandbox
    • Region — the Azure region where TruvioSense processes and stores the data. This is the only field that can be changed. Leave it blank to use the default region
    • Tenant ID — the tenant ID of the environment
    • Subscription Service Name and Authentication Email — the subscription the environment is registered to, and the email of the signed-in Business Central user
  5. Select Next and confirm the registration
  6. Finish — select Finish to close the guide

The Authentication Email field on the Business Central user must have a value, otherwise the registration stops with an error.

Onboarding Usage is set in ExFlow Global Setup, in the TruvioSense group. The default is External. Do not change it after a completed onboarding.

Check onboarding status​

Select Onboarding --> Onboarding status to see the connection to the TruvioSense service:

FieldMeaning
Core Client IdThe ID that identifies the environment to the core service
Service ConfigurationYes when the service configuration has been read
Core Service LoginYes when the environment is signed in to the core service
Core Service Subscription StateThe subscription state for the environment
Service URLThe TruvioSense service address, based on the region and environment selected in the onboarding
KeyVault SourceThe source of the key vault configuration

Use Login to core services to sign in again, and Logout of core services to sign out. All TruvioSense features stop working while the environment is signed out.

Enable companies​

  1. Open TruvioSense - Coding & Approvals Setup
  2. For each company to activate:
    • Select the company in the list
    • Select a Job queue category in the Companies section
    • Set Enabled to Yes

Start with one company to verify everything works before enabling additional companies.

Enable vendors​

TruvioSense works per vendor. With the company selected in the list, use the Vendors section to select which vendors to activate:

  • Set Enabled per vendor, or
  • Use Enable all vendors or Disable all vendors to change all vendors in the company at once

Good candidates:

  • Vendors with 20+ historical invoices
  • Regular, repetitive invoicing patterns
  • Consistent coding

Poor candidates:

  • One-time vendors
  • Vendors with highly variable invoice types
  • New vendors with no history

Schedule the job handler​

The job handler runs the background processing: it starts the document export and the vendor insights update.

  1. Open TruvioSense - Coding & Approvals Setup
  2. Select Schedule job handler and confirm

A Job queue category must be selected for the current company before the job handler can be scheduled. Job handler scheduled then shows Yes. The job handler is shared by all companies, so it only needs to be scheduled once.

The job queue entry runs every 60 minutes, Monday to Friday, between 06:00 and 18:00. Its description is Handles scheduling of TruvioSense related jobs.

Background jobs​

TruvioSense uses three job queue jobs. Only the job handler is scheduled manually. The job handler creates the other two jobs on each run, so only the job handler entry stays in Job Queue Entries. The export job and the vendor insights job have the same description. Use Object ID to Run to tell them apart.

The jobs are set up once per database, not once per company:

  • Schedule job handler checks the job queue in all companies. If a job handler already exists in any company, no new one is created
  • The job queue entries are created in the company where Schedule job handler is run, with the Job queue category of that company
  • Each run of the export job and the vendor insights job covers all companies where Enabled is Yes. Companies that are not enabled are skipped
  • Scheduling the job handler requires permission to read job queue entries in all companies

To find the job queue entries, open Job Queue Entries in the company where the job handler was scheduled.

CodeunitNameJob queue descriptionWhen it runsHow it works
12069082ExMLJobHandlerHandles scheduling of TruvioSense related jobs.Recurring: every 60 minutes, Monday to Friday, 06:00–18:00. Created once with Schedule job handlerSchedules the other two jobs. On each run, it checks all companies for an active export job and an active vendor insights job (status Ready, Waiting or In Process). If a job is not active, it creates a new job queue entry for it in the current company. The entry starts straight away, runs once, and uses the company's Job queue category. A job that is already active is not started again. If the job handler entry is in Error or On Hold in the current company, it is restarted when the setup page is opened
12069080ExMLExportExFlow machine learning automation serviceOnce per job handler run. Can also be started with Run document exportExports posted invoices for all enabled companies, newest first. Credit memos are not exported. Skips documents from vendors that are not enabled, and documents older than the vendor's export starting point. For each document, it first sends the PDF (Document image sent = Yes), then the posted document with its coding (Posted document sent = Yes). If a step fails, the reason is saved in Error message and the document is tried again on the next run. Stops for a company where the data upgrade has not run
12069104ExMLVendorInsightsExFlow machine learning automation serviceOnce per job handler run. Can also be started with Update vendor insightsUpdates the vendor Status for all enabled companies. For every vendor, it clears Status. For enabled vendors, it then gets the latest status from the TruvioSense service. If the service has no data for the vendor yet, Status stays blank. Stops for a company where the data upgrade has not run

Job queue entry settings

The table shows how each job is set up in Job Queue Entries. ExFlow fills in these values automatically. Use Schedule job handler to create the job handler, rather than creating the entry manually.

FieldJob handlerDocument exportVendor insights
Object Type to RunCodeunitCodeunitCodeunit
Object ID to Run120690821206908012069104
Object Caption to RunExMLJobHandlerExMLExportExMLVendorInsights
DescriptionHandles scheduling of TruvioSense related jobs.ExFlow machine learning automation serviceExFlow machine learning automation service
Job Queue Category CodeThe Job queue category of the company where the job handler is scheduledSame as the job handlerSame as the job handler
Recurring JobYesNoNo
No. of Minutes between Runs60––
Run onMonday to Friday––
Starting Time / Ending Time06:00 / 18:00––
Maximum No. of Attempts to Run111
Earliest Start Date/TimeThe time Schedule job handler is selectedThe time the job handler creates the entryThe time the job handler creates the entry
Status when createdReadyReadyReady
Created bySchedule job handler on the setup pageThe job handler, on each runThe job handler, on each run
Used forStarting the other two jobsSending PDFs and posted invoices to TruvioSense, so that the service can build the prediction model per vendorUpdating the vendor Status in the Vendors section of the setup page
Start manually–Related --> Run document export on the setup pageRelated --> Update vendor insights on the setup page

A manual start runs the job straight away in the current session, not through the job queue. The job still covers all enabled companies.

The PDFs of documents in the ExFlow Import Journal are not sent by these jobs. They are sent by the continuous export when the journal document is updated, as long as Continuous export enabled shows Yes.

Wait for initial data export​

After vendors are enabled, the system exports historical posted invoices in the background via the Job Queue.

  1. The job handler starts the export on each run
  2. Posted invoices from enabled vendors in enabled companies are sent to the ML service, together with the PDF of each invoice
  3. Monitor progress on the TruvioSense Documents page

The initial export sends the most recent posted invoices per vendor, up to a limit set by the TruvioSense service. Invoices without a PDF attachment are not exported. The initial export may take several hours depending on data volume. No user action is required.

To start an export straight away, select Related --> Run document export.

Verify setup​

After a few hours, confirm that the system is working:

CheckHow
Documents exportedOpen TruvioSense Documents — verify Document image sent and Posted document sent = Yes, and Error message is blank
Vendor statusIn the Vendors section of the setup page, Document images sent grows over time and Status shows the latest status from the service
Job queue runningSearch Job Queue Entries — the TruvioSense job handler entry should show status Ready
Predictions availableProcess a new invoice in ExFlow Import Journal and select TruvioSense --> View predictions (allow 24–48 hours after first export)

Other actions on the setup page​

ActionDescription
DocumentsOpens TruvioSense Documents
Prediction mappingOpens the mapping of prediction fields to journal fields. See Using Predictions
Run document exportRuns the export for all enabled companies and vendors now
Update vendor insightsFetches the latest vendor Status from the service now
Reset dataMarks all documents as not sent and resets the export starting point for all vendors, so that all documents are exported again. This cannot be undone