# Customer-specific Prices

## Short description

Price agreements for specific articles that supersede the price as specified in the customers pricelist can be defined via the ERP Cache CustomerPrices interface. The import file can contain multiple prices for multiple customers.\
\
Prices can be defined in multiple currencies. If no currency is specified then the price will be imported in Euro.

## Delivery method

**Update Frequency**: Batch at least once a day\
**Incremental or complete set:** Incremental

**Filetype:** Zipped XML

**Filename: \[SHOPNAME]\_ErpCache\_CustomerPrices**\_**\[INDEXNUMBER]**.xml\
**Transport:** over FTPS, FTPS Vendisto server hosted by INTEGRACE, file will be placed on FTPS server by ERP party.

**Location within FTP root:** \ErpCache\\

## Structure XML

### Changes from ErpCache\_CustomerPrices XML 1.0 to 1.1

* An optional currency attribute was added to NettoPricePerItemExclVat and DiscountAmountPerItemExclVat.&#x20;

### Changes from ErpCache\_CustomerPrices XML 1.1 to 1.2

* Added VatCode, BaseUnit and PriceUnit to the customer price import. This was necessary if you only want to use Customer Prices. Without those values, customer prices only will not work since the product table will have no matching records.

```markup
<?xml version="1.0" encoding="utf-8"?>
<Import>
    <ImportSettings>
        <Importer>ErpCache_CustomerPrices</Importer>
        <Version>1.1</Version>
    </ImportSettings>
    <CustomerPrices>
        <CustomerPrice>
            <AccountNumber></AccountNumber>
            <ProductNumber></ProductNumber>
            <VatCode></VatCode>
            <BaseUnit></BaseUnit>
            <PriceUnit></PriceUnit>
            <QuantityDiscountPrices>
                <QuantityDiscountPrice>
                    <FromQuantity></FromQuantity>
                    <ToQuantity></ToQuantity>
                    <NettoPricePerItemExclVat Currrency=""></NettoPricePerItemExclVat>
                    <DiscountAmountPerItemExclVat Currrency=""></DiscountAmountPerItemExclVat>
                    <DiscountPercentagePerItem></DiscountPercentagePerItem>
                </QuantityDiscountPrice>
            </QuantityDiscountPrices>
        </CustomerPrice>
    </CustomerPrices>
</Import>

```

## Fields XML

**Import element:**

<table data-header-hidden><thead><tr><th width="184">Name</th><th>Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>ImportSettings</td><td>Container element for importsettings</td><td>Element</td><td>Required</td></tr><tr><td>CustomerPrices</td><td>Container element for CustomerPrice data</td><td>Element</td><td>Required</td></tr></tbody></table>

**ImportSettings element:**

<table data-header-hidden><thead><tr><th width="178">Name</th><th>Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>Importer</td><td>Name of the importer.<br>Must be ErpCache_CustomerPrices.</td><td>Text</td><td>Required</td></tr><tr><td>Version</td><td>Version of the import xml. To be used for backward compatibility issues.</td><td>Text,<br>must be 1.1</td><td>Required</td></tr></tbody></table>

**CustomerPrice element:**

<table data-header-hidden><thead><tr><th>Name</th><th width="187">Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>AccountNumber</td><td>Account number (debtor number) of the customer</td><td>Text</td><td>Required</td></tr><tr><td>ProductNumber</td><td>The identifier of a product</td><td>Text</td><td>Required</td></tr><tr><td>VatCode</td><td><p>HIGH = 21 % LOW = 6%</p><p>ZERO = 0%</p></td><td>Text</td><td>Required</td></tr><tr><td>BaseUnit</td><td>The base unit of the product, eg pce or meter.</td><td>Text</td><td>Required</td></tr><tr><td>PriceUnit</td><td>The quantity on which price is based</td><td>Positive integer</td><td>Required</td></tr><tr><td>QuantityDiscountPrices</td><td>Container element for QuantityDiscountPrice data</td><td>Element</td><td>Required</td></tr></tbody></table>

**QuantityDiscountPrice element:**

Prices can optionally be defined in multiple currencies. The NettoPricePerItemExclVat and DiscountAmountPerItemExclVat elements may therefore occur more then once within a QuantityDiscountPrice element.

<table data-header-hidden><thead><tr><th>Name</th><th width="187">Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>FromQuantity</td><td>The from quantity where the discount price is valid from</td><td>Positive integer</td><td>Required</td></tr><tr><td>ToQuantity</td><td>The to quantity where the discount price is valid to</td><td>Positive integer</td><td>Optional</td></tr><tr><td>NettoPricePerItemExclVat</td><td>The calculated netto price per item.  This is the price including discounts.</td><td>Decimal</td><td>Required</td></tr><tr><td>DiscountAmountPerItemExclVat</td><td>Discount amount on the default net price. This field can be used to give the calculated Discount Amount using a discount percentage. Or just give a discount amount when no discount percentage is used for the calculation.</td><td>Decimal</td><td>Optional</td></tr><tr><td>DiscountPercentagePerItem</td><td>A percentage of the give discount on the default net price per item excluding VAT. When this field is set, the field DiscountAmountPerItemExclVat is required.</td><td>Decimal</td><td>Optional</td></tr><tr><td>Currency</td><td>Attribute on NettoPricePerItemExclVat or DiscountAmountPerItemExclVat. Must contain the ISO 4217 3-letter currency code. Default is EUR.</td><td>Char[3]</td><td>Optional</td></tr></tbody></table>

| Type    | Values                                                                                 |
| ------- | -------------------------------------------------------------------------------------- |
| Decimal | Number with point (.) as decimal separator character. Oher separators are not allowed. |
