> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use a data set to improve detection for receipts

> Shows how to enable the vendor data set in a Receipts project to detect vendors more reliably and assign custom expense types during verification.

Sometimes, vendors can be more reliably detected if you accumulate and use a data set of possible vendors. Such a data set will also allow users to specify custom expense types for certain vendors. For example, if company employees usually buy office supplies and stationery from a particular vendor, you can specify “Office Supplies” as the expense type for this vendor. Now for all captured receipts from this vendor, the expense type will be automatically changed to “Office Supplies.”

## Set up the vendor data set

The fields and rules for data set checks are disabled by default. To enable them, complete the following steps.

<Steps>
  <Step title="Enable the data set fields">
    In the Document Definition Editor, enable the following fields by clicking **Show on verification** on the **General** tab of the field properties dialog box: **VendorID\_Dataset**, **VendorName\_Dataset**, **VendorExpenseType\_Dataset**, and **FinalExpenseType**.
  </Step>

  <Step title="Enable the data set rules">
    In the **Document Definition Properties** dialog box, enable the following rules: **Vendor Database Check**, **Copy Expense Type**, and **Copy Company Name**.
  </Step>

  <Step title="Add a database lookup button">
    To look up vendors during verification, add a button onto the data form:

    <Steps>
      <Step title="Insert a button">
        Right-click the form and select **Insert Button** on the shortcut menu, or click **Form → Insert Control → Button**.
      </Step>

      <Step title="Set the button to a database lookup">
        In the dialog box that opens, click the **Format** tab, specify **Database Lookup** as the type of action, and then select the **Vendor Database Check** rule.
      </Step>
    </Steps>
  </Step>

  <Step title="Save and publish the Document Definition">
    Save and publish your Document Definition.
  </Step>
</Steps>

The names of vendors are automatically added to the data set each time the program detects a new name on a receipt. As your data set of vendors grows, the program can detect vendors more reliably.

## Edit and look up vendors

To edit the vendor data set or find a particular vendor during verification:

<Steps>
  <Step title="Open the data set from the data form">
    Click the button that you added onto the data form.
  </Step>

  <Step title="Choose an action">
    Click the **Edit record**, **Add record**, **Reset data**, or **Select** button, depending on the action you want to perform.
  </Step>
</Steps>

When adding or editing a record, you can specify an expense type typical of the given vendor. Next time a user captures a receipt from this vendor, this expense type appears in the **Expense type (Final)** field.

For more information, see [Looking up vendors and business units in the database](/flexi-capture/invoice-reader/ir-data-set-using).
