# Upload Vendor Credit

A Vendor Credit is a credit issued to the vendor. Occasionally, goods purchased from a Vendor need to be returned due to reasons such as wrong item, faulty product, etc. In such cases, a Vendor Credit can be created. This credit can then be applied to future bills from that vendor or it can be refunded.

You can use the upload option to batch import vendor credits into the system using the steps mentioned below:

* Download the latest CSV template from the “Upload Vendor Credits” module.
* Copy the credit information into the CSV template.
* Upload the CSV template into Xoro.

### Downloading the CSV template

* Go to the **Upload Vendor Credits** module using the search menu.
* Click on “**Download Template**“.

  <figure><img src="/files/GfuWujqrKAseFNC9JMiT" alt=""><figcaption></figcaption></figure>

### Copying the information into the template

Once you’ve downloaded the template file, you can copy your data using any spreadsheet software. There are columns that you must complete and others that are optional. Mandatory fields are marked with a double asterisk (\*\*) prefix.

* The file must be a CSV (Comma-separated values) file. The name of your file must end with csv.
* Make sure you don’t change any of the column headings from row 1 in the template, as these are needed for the file to import correctly.
* All date fields will accept the MM-DD-YYYY format.
* Be mindful of any leading zeros in your data, some spreadsheet software will trim them automatically without notifying you. This can be resolved by ensuring your columns have correct formatting.
* Sometimes long numbers (UPC, etc.) are formatted as scientific notation. Be sure to change the formatting on this data to display these long numbers correctly.

If you’re importing more than 5,000 records, we recommend you split up the file.

#### Upload Vendor Credits File Fields

<table><thead><tr><th width="181">Column Name</th><th width="119.33333333333331">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>**StoreCode</td><td>Text</td><td><p>Enter the store code for the vendor credit which has to match exactly with the store code in Xoro.</p><p><strong>Note:</strong> If this field is blank it will be picked up from the upload default values.</p></td></tr><tr><td>**VendorName</td><td>Text</td><td>Enter the vendor name for the credit. This has to match exactly with the vendor’s name in Xoro.</td></tr><tr><td>**TxnDate</td><td>Date</td><td>Enter the transaction date of the vendor credit in MM-DD-YYYY format.</td></tr><tr><td>ExchangeRate</td><td>Text</td><td>If the credit is for a foreign customer, enter the exchange rate here. If your order currency is the same as your system home currency, then put “1” here.</td></tr><tr><td>RefNo</td><td>Text</td><td>Enter the reference number to be associated with the vendor credit.</td></tr><tr><td>Memo</td><td>Text</td><td>This field allows you to provide any notes or any additional information related to the vendor credit.</td></tr><tr><td>**TotalAmt</td><td>Numeric</td><td>The amount of the vendor credit in decimal format (example: 3245.12).</td></tr><tr><td>ImportError</td><td>Text</td><td>If there are any errors from an upload, they will be listed in this column.</td></tr><tr><td>Account Expense Name</td><td>Text</td><td>Enter the expense account to which the vendor credit amount should be posted. If left blank, the system will use the <strong>vendor’s default expense account</strong> (if configured).</td></tr></tbody></table>

### Uploading the template

Once you have filled the CSV file with your data, you can follow the steps below to upload it into Xoro:

* The **Default values** for required columns can be configured before the upload.
* If the data in the template is blank or incorrect, then the uploader will fall back and use these specified default values.
* Click **Browse** to select the saved CSV template file.
* After the file has been selected, click **Verify & Upload** to start importing.
* While the import is in progress, the summary of the progress will be displayed at the bottom of the screen with the progress bar.
* After the import has been completed, the result will be displayed with the message for success or error (if any).
* Vendor credits will only get uploaded into the system if there are no errors in the file.
* If there are errors in the file, you can download the error file, fix the errors in the **original file** and upload it back into Xoro.

#### Creating Expense Lines via Upload

The Vendor Credit upload now supports creating expense lines directly from the upload file. Follow the steps below to create expense lines while uploading vendor credits:

1. Download the CSV template and populate the required fields, including **Account Expense Name**.

<figure><img src="/files/rd6NKkFFYnAYjGu8aHM2" alt=""><figcaption></figcaption></figure>

2. Select the **“Add Expense Line”** checkbox on the **Upload Vendor Credit** page.

<figure><img src="/files/6s4thpPL6pHODBfh3lza" alt=""><figcaption></figcaption></figure>

3. Click **Verify & Upload** to review and modify the data if required.

<figure><img src="/files/IXOOrnK7Mo3h3ab4gjhV" alt=""><figcaption></figcaption></figure>

4. Click **Upload Vendor Credits** to finalize the upload and create the vendor credits.

<figure><img src="/files/yobtwvAjpIz4SwXELMqY" alt=""><figcaption></figcaption></figure>

5. If an amount is entered in the **TotalAmt** field, a *Miscellaneous Charges* item line is created (existing behavior).                                                                                                                                                         &#x20;

<figure><img src="/files/AR1lqJptohCZVVTLb1DS" alt=""><figcaption></figcaption></figure>

If the **"Add Expense Line"** checkbox is selected and the **Account Expense Name** is provided in the uploaded file, an expense line is also created.

<figure><img src="/files/LNqUIcuJ7xm7ShhOm6LP" alt=""><figcaption></figcaption></figure>

**Validation Rules**

* If **“Add Expense Line”** is selected and the **TotalAmt** field in the uploaded file is blank, the system displays the error message: **“No amount provided for the vendor credit.”**
* If the **Account Expense Name** is blank and no default expense account exists for the vendor,\
  the record will not be created.
* If **StoreCode** or **VendorName** does not exist in the system, the record will not be created.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xorosoft.com/xoroerp-1/utilities/data-imports/upload-vendor-credit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
