> For the complete documentation index, see [llms.txt](https://docs.dynalogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dynalogic.com/birds-document-warehouse-product-overview/d365-finance-and-operations/input-management.md).

# Input Management

## D365 Workflows <a href="#d365-workflows" id="d365-workflows"></a>

The D365 Finance and Operations workflow supports payment approvals. Enable it by activating the **Purchase Invoice Workflow** configuration key.

To activate this configuration key, navigate to **Configuration Key** under **Ex Arte Raptor > Input Management**.

Please note: The **Process Management** module should **not** be installed if you intend to use this workflow functionality.

## Invoice setup <a href="#invoice-setup" id="invoice-setup"></a>

**Purpose**

The **Invoice Setup Rule Engine** offers a wide range of possibilities. Through this engine, you can create specific rules for individual vendors, for all vendors within a specific vendor group, for all vendors based on a buyer group, and more. It’s also possible to create a generic rule engine that applies to all vendors in general.

Additionally, you can combine one or more rule headers for a single invoice. This means you could have one rule header for invoice processing, another for process management with **AgilePoint NX**, or for sending business events to **Microsoft Power Automate** for automation. Alternatively, you can use the **Stop Further Processing** functionality after the first rule header to ensure that subsequent rule headers are not applied to the invoice.

Rule headers can also be created as templates by disabling the **Enabled** checkbox. With templates, you can easily copy them for specific vendors.

***

#### **Key Components** <a href="#invoice-setup-key-components" id="invoice-setup-key-components"></a>

**1. Rule Engine Header**

A rule engine header organizes multiple rule lines. Key functionalities include:

* Applying rules to a specific vendor
* Applying rules based on a query (see: Edit query)
* Enabling or disabling specific rule headers
* Stop processing after a specific header
* Reordering headers based on priority

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-1abc821a0ca067297e981a1572ca6eac2c42506d%2Fimage%20(97).png?alt=media" alt=""><figcaption></figcaption></figure>

**2. Rule Engine Lines**

Each rule header contains lines, each with a specific action or condition. You can optionally use queries to refine their execution. We recommend using queries to improve accuracy and relevance.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-4dbe4d4b358d0b1ce27ee30eb4397d918b92d3a1%2Fimage%20(98).png?alt=media" alt=""><figcaption></figcaption></figure>

***

#### **Rule types** <a href="#invoice-setup-rule-types" id="invoice-setup-rule-types"></a>

**Pre-actions**

Executed **before** creating ERP transactions.

* **Set invoice type:** define the type (e.g., Invoice Journal, Invoice Register). Saves type in the imported invoice header.
* **Set journal name:** assign ledger journal names in case of Invoice Journal or Invoice Register. You can use queries to detect which journal name can be chosen, the selected value is saved in the imported invoice header.
* **Set approver:** specify the invoice approver.
* **Set approved:** mark invoices as approved for payment
* **Set invoice payment release:** automatically populate today’s date, which can be manually overridden later.
* **Set voucher template:** define an existing voucher template. This way you can have predefined offset ledger accounts and distribution of the invoice total amount over all voucher template lines.
* **Set values from invoice default setup:** retrieve values from the invoice default setup from linked vendor or from general setup

**Actions**

Executed **during** transaction creation.

* **Set invoice data:** create ledger journal or vendor invoice headers using data from external sources and pre-actions.

**Post-actions**

Executed **after** ERP transactions are created.

* **Set business event:** trigger business event with data from imported invoice header
* **Set purchase order strategy:** define strategies for purchase orders or product receipts in case the invoice type is Pending Invoice. The selected value is saved in the imported invoice header. This logic will be applied during import of the purchase order references.
* **Check duplicates:** detect based upon setup and mark original invoice and duplicated invoices as duplicated.
* **Set purchase invoice workflow**: submit imported invoice in D365FO workflow.
* **Only in combination with Process Management**
  * **Set process template:** assign a process template from AgilePoint NX.
  * **Start process instance:** submit imported invoice in workflow from the Process Management parameters.

## Invoice default setup <a href="#invoice-default-setup" id="invoice-default-setup"></a>

You can manage the default invoicing setup at the path **9A Raptor DWH > Setup > Input management > Invoice default setup**. There you can edit the default values that are set on imported invoices. These values are applied using the invoice setup rule engine.

The security privilege for this feature is 'To maintain Ex Arte invoice default setup'. Users with 'To view Ex Arte invoice default setup' can open the setup but not change it.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-74523c93d841fcbb07d51454c8a35660006a2a5a%2Fimage%20(268).png?alt=media" alt=""><figcaption><p>The 'invoice default setup' screen</p></figcaption></figure>

The following default values can be set:

* **Invoice type:** the type that is saved in the imported invoice header (Pending invoice, Invoice journal or Invoice register). Leave it on **None** to keep the invoice type as it is.
* **Item sales tax group:** the item sales tax group that is set on the imported invoice.
* **Voucher template:** the voucher template that is set on the imported invoice. Use the select button to choose a template and the clear button to remove it.
* **Due date origin:** defines where the due date comes from.
  * **Imported invoice:** the due date from the imported invoice is kept.
  * **Payment terms:** the imported due date is cleared, so it is determined by the payment terms.

#### Setting default invoice values for specific vendors <a href="#invoice-default-setup-setting-default-invoice-values-for-specific-vendors" id="invoice-default-setup-setting-default-invoice-values-for-specific-vendors"></a>

When going to your vendors (**Accounts payable > Vendors > All vendors**), open a vendor and go to the **Invoice** tab. In the **Set up** group you will see a new menu item **Invoice default setup** to add default values for a specific vendor.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-3bf08824321a43c5e003de40ccb0e0d060671689%2Fimage%20(269).png?alt=media" alt=""><figcaption><p>Screenshot of the vendor screen highlighting the menu item 'Invoice default setup'</p></figcaption></figure>

Once you click on the aforementioned menu item, you'll land on the same default invoice setup page, but for that vendor specifically.

On this screen you have the same values as on the general setup, plus the parameter **Override default settings**.

You need to enable **Override default settings** to be able to edit any of the other settings on the page. If it is not toggled on, the default, non-vendor specific setup will be used when using default invoicing. When you toggle it off again, the vendor specific setup is deleted.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-9597e152ce9304e634af9a83b8063fd405db6477%2Fimage%20(270).png?alt=media" alt=""><figcaption><p>Screenshot of the vendor-specific invoice default setup page, showing the values cannot be edited when 'Override default settings' is not toggled on</p></figcaption></figure>

#### Applying the default values

The default values are not applied automatically. They are applied by the invoice setup rule engine, through the pre-action **Set values from invoice default setup**. Add this action as a rule line to the rule header (see [**Invoice setup**](#invoice-setup)) that processes your imported invoices.

When the action runs for an imported invoice:

* The setup of the vendor is used when **Override default settings** is enabled for that vendor. Otherwise the general setup is used.
* **Item sales tax group** and **Voucher template** are copied to the imported invoice.
* **Invoice type** is copied, unless it is set to **None**.
* When **Due date origin** is **Payment terms**, the due date of the imported invoice is cleared.

Because this is a pre-action, it is executed before the ERP transactions are created.

#### Data management

The invoice default setup is also available as a data entity, **Ex Arte invoice default setup entity**, to import and export the setup with the Data management framework. The public entity name is `PurchInvoiceDefaultSetup`. The vendor account is blank for the general setup.

The security privileges for the entity are 'To maintain Ex Arte invoice default setup entity' and 'To view Ex Arte invoice default setup entity'.

## Imported invoices <a href="#imported-invoices" id="imported-invoices"></a>

### **Imported Invoices Features** <a href="#imported-invoices-imported-invoices-features" id="imported-invoices-imported-invoices-features"></a>

#### **Actions** <a href="#imported-invoices-actions" id="imported-invoices-actions"></a>

* **Reinitialize Invoice:** Remove the ledger journal/pending vendor invoice and reapply the invoice setup rules - if the status is "Imported."
* **Change Invoice Type:** Create a new ledger journal/pending vendor invoice without reapplying rules for "Imported" invoices. You may need fill in extra required fields based on the selected invoice type.
* **Cancel Invoice:** Delete an invoice and its associated records.
* **Select Product Receipts**: Users can select product receipts for non-captured purchase orders, filtered by vendor accounts designated as Invoice accounts. Additionally, users can deselect product receipts if they are already linked to another invoice, for example. Only product receipts with line items matching the currency code of the associated imported invoice can be selected.
* **Post Invoice:** Quickly post invoices without navigating through linked journals.
* **Approve for Payment**: This functionality allows users to approve an invoice for payment if payment approval is not applied to the ledger journal or pending vendor invoice. However, this functionality is disabled when a process template is defined, provided the Process Management solution is in use.

Additionally, you can navigate to the linked ledger journal or pending vendor invoice, where you can create, edit, and delete invoice lines. However, posting the invoice is only possible if the totals are matched.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-6d270ad399a6c3f12fdc54a9222fc9a51c509898%2Fimage%20(99).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Vendor invoice journals <a href="#imported-invoices-vendor-invoice-journals" id="imported-invoices-vendor-invoice-journals"></a>

Vendor Invoice Journals support the following features:

1. **Merge Financial Dimensions:**\
   The financial dimensions of the vendor can be merged with the financial dimensions of the main accounts, for both the account and the offset account.
2. **Account Type Default to Ledger:**\
   When adding new lines in the Invoice Journal, the account type is automatically set to "Ledger." It's important to note that the first line must be of type "Ledger" before you can create additional lines.
3. **Filter Default Main Accounts:**\
   The dropdown menu for main accounts is filtered based on the selected vendor, for both the account and the offset account. The filtered dropdown identifies the first account of type "Vendor" to list all applicable default accounts.

#### Info parts <a href="#imported-invoices-info-parts" id="imported-invoices-info-parts"></a>

**Purchase Invoice Totals:**\
This section validates the matching between an imported invoice and the corresponding ledger journal or pending vendor invoice. Posting an imported invoice is only possible if there are no discrepancies.

* If the invoice has not been posted, the amounts displayed come from the ledger journal or pending vendor invoice.
* Once the invoice is posted, the amounts are sourced from the Vendor Invoice Journal.

<figure><img src="https://docs.raptor.9altitudes.com/~gitbook/image?url=https%3A%2F%2F3857075213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKfypi8e8luNHtfjQhy6p%252Fuploads%252FwnQgssfn4TSeUPojjGCP%252Fimage.png%3Falt%3Dmedia%26token%3Da817f3cc-f506-4190-a808-6d528ae7400c&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=feba68ca&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Purchase Invoice References:**\
Displays all linked purchase orders associated with an imported invoice.

<figure><img src="https://docs.raptor.9altitudes.com/~gitbook/image?url=https%3A%2F%2F3857075213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKfypi8e8luNHtfjQhy6p%252Fuploads%252FP3zDCBsl8HliqXgGYS7z%252Fimage.png%3Falt%3Dmedia%26token%3D15c15491-7c20-4178-800e-ec4e38a8ed47&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=797103ad&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### **Purchase Orders** <a href="#imported-invoices-purchase-orders" id="imported-invoices-purchase-orders"></a>

The following fields support imported invoices linked to purchase orders:

1. **Is a Purchase Order (EXAPurchInvoiceImported.IsPurchaseOrder):**\
   This field is used to execute specific rules when the imported invoice is linked to a purchase order. Ephesoft or Kofax sets it to *true* for a purchase-order invoice.
2. **Is a Prepayment Invoice (EXAPurchInvoiceImported.IsPrepaymentInvoice):**\
   This field enables the execution of specific rules when the imported invoice is linked to a prepayment for a particular purchase order. Ephesoft or Kofax sets it to *true* for a prepayment invoice.

## Invoice totals matching <a href="#invoice-totals-matching" id="invoice-totals-matching"></a>

You can filter imported invoices by whether their totals match. Use the following menu items:

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-418ab0215efeec5fe252e072955832893d9cedde%2Fimage%20(100).png?alt=media" alt=""><figcaption></figcaption></figure>

1. **All unmatched totals invoices:**\
   Displays all imported invoices with the status "Imported" where the totals are not matched.
2. **All matched totals but unposted Invoices:**\
   Displays all imported invoices with the status "Imported" where the totals are matched but the invoices remain unposted.

The **TotalsAreMatched** field from the `EXAPurchInvoiceImported` table indicates whether the totals are matched. Please note that this field must never be used for other purposes, such as validation or posting. It is populated exclusively through the batch job **Match Imported Invoice Totals** found under **9A Raptor DWH > Periodic Tasks > Input Management**. This batch job can be scheduled according to customer priorities—for example, once or three times per day should generally suffice.

For backward compatibility, the **TotalsAreMatched** field of older, existing imported invoices can also be updated. This requires modifying the query used by the batch job to remove the invoice status filter. After running the batch job, you can reset and, if needed, extend the query.

## Invoice tag methods <a href="#invoice-tag-methods" id="invoice-tag-methods"></a>

You can add tags to an imported invoice in Document Warehouse when it is posted by defining tag methods based on the `VendInvoiceJour` table.

To implement this feature, consult a technical consultant to determine which methods are available and what type of return values should be used. It is important to note that the entities corresponding to the returned records must be included in the entity configuration within Document Warehouse.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-3e85487c0327026b8bfc8a0ee6dbe45f2cbb3d90%2Fimage%20(101).png?alt=media" alt=""><figcaption></figcaption></figure>

***

There are two possible return types for tag methods:

1. **Record:**\
   The method returns a single record as an object. This is useful for retrieving the linked vendor transaction associated with your posted vendor invoice.
2. **Query:**\
   The method returns a query as an object. This is useful for retrieving multiple linked purchase orders associated with your posted vendor invoice.

Below is a list of the available table methods. Additionally, custom methods can be created to return other records for tagging in your imported invoice.

**Root Table: VendInvoiceJour**

**1. vendTrans**

* **Purpose:** Returns the vendor transaction voucher.
* **Return Type:** Record (records from the `VendTrans` table).
* **Requirement:** The entity for the `VendTrans` table must be configured in Document Warehouse (e.g. EXAVENDTRANSENTITY).

**2. exaQueryVendInvoicePurchLink**

* **Purpose:** Returns linked purchase orders. This allows you tag posted invoices with their linked purchase orders.
* **Return Type:** Query (records from the `VendInvoicePurchLink` table).
  * **Requirement 1:** The entity for the `PurchTable` table must be configured in the [Entity Configuration](https://docs.dynalogic.com/birds-document-warehouse-product-overview/setup-and-configuration/entity-configuration.md) (e.g. PURCHPURCHASEORDERHEADERV2ENTITY).
  * **Requirement 2:** A [Document Management](https://docs.dynalogic.com/birds-document-warehouse-product-overview/d365-finance-and-operations/document-management.md#relation-setup) must be configured to link the PurchTable with the VendInvoicePurchLink table:\ <br>

    <figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-d106f4fe04be16811097cd69a82d7ade8da35a32%2Fimage%20(189).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dynalogic.com/birds-document-warehouse-product-overview/d365-finance-and-operations/input-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
