Skip to content

Sage 50 UK Price List XML

Import Price Lists allows you to create and update price lists in Sage 50, using the XML data format described here.

Any fields not documented below are not directly supported with our imports.

Tasks

XML

Sample import file showing the minimum information required to create a customer price list:

<?xml version="1.0" encoding="utf-8"?>
<Company>
  <PriceLists>
    <PriceList>
      <Reference>TRADE</Reference>
      <Name>Trade Customer Price List</Name>
      <Type>PriceList</Type>
      <Prices>
        <Price>
          <DiscountType>DecreasePercent</DiscountType>
          <StockCode>PROD001</StockCode>
          <Value>10</Value>
        </Price>
        <Price>
          <DiscountType>Fixed</DiscountType>
          <StockCode>PROD002</StockCode>
          <Value>8.99</Value>
        </Price>
      </Prices>
    </PriceList>
  </PriceLists>
</Company>

In each of the following sections most of the XML has been omitted to make the samples easier to read, you will need to provide the above as a minimum to create or update a price list. The whole structure of the Company schema is used below as a reference of where fields should be in the object model.

Price List

The following information can be specified for the price list header.

The reference and type fields are used together to form the unique identifier for each price list. They will be used to determine whether the price list already exists in Sage, and therefore whether to create or update a price list.

Sage Field XML Field  Example  Field Type  Field Length  Input 
Id*  24365  string  255 Optional 
Name Reference*  TRADE  string  Required 
Description Name*  Trade Customer Price List  string  60  Optional 
Type Type*  PriceList  enum  Required 
Currency Currency*  GBP  string  Optional 
  • Id* - The Id provided will be stored in Zynk's [Truth Database](../../documentation/overview/working-with-the-databases.md#truth-database, and will appear in the XML when price lists are exported from Sage.
  • Reference* - When dealing with price lists of the type 'Special' or 'Supplier', the reference must correspond to a customer or supplier account code respectively.
  • Name* - A name can only be set for price lists of type 'PriceList'. For price lists of the type 'Special' or 'Supplier', the name will always be set to the name of the customer or supplier account respectively.
  • Type* - The type of a price list can't be changed after it has been created. Possible values:
  • PriceList - Represents a customer price list
  • Special - Represents customer special prices
  • Supplier - Represents a supplier price list
  • Currency* - The 3 letter currency ISO code. The currency of a price list can't be changed after it has been created. When creating a price list of type 'PriceList', it will default to the base currency if not specified. When creating a price list of the type 'Special' or 'Supplier', it will default to the currency of the customer or supplier account respectively if not provided.
<?xml version="1.0" encoding="utf-8"?>
<Company>
  <PriceLists>
    <PriceList>
      <Id>24365</Id>
      <Reference>TRADE</Reference>
      <Name>Trade Customer Price List</Name>
      <Type>PriceList</Type>
      <Currency>GBP</Currency>
    </PriceList>
  </PriceLists>
</Company>

Prices

The following information can be specified for each product on the price list. If the product does not already appear on the price list it will be added, otherwise the existing price will be updated. Our import does not support the removal of products from price lists.

Sage Field XML Field  Example  Field Type  Field Length  Input 
Product Code StockCode* PROD001  string 30  Required 
Calculation Method DiscountType* DecreasePercent  enum  - Required 
Value Value*  10.00  double  Required 
List Price StoredPrice*  90.00  double  Optional
  • StockCode* - Must be a valid product code that exists within Sage.
  • DiscountType* - DiscountType and Value are used in conjunction to determine the list price for each product. Possible values for DiscountType:
  • Fixed - A fixed price
  • Standard - The product's sale price (as is)
  • DecreasePercent - The product's sale price minus a percentage
  • DecreaseValue - The product's sale price minus a fixed amount
  • MarkupCost - The product's last cost price plus a percentage
  • MarkupSales - The product's sale price plus a percentage
  • MarkupValue - The product's last cost price plus a fixed amount
  • Value* - The value to use when calculating the price. Depending on the DiscountType, this should either be a fixed monetary amount or a percentage. When DiscountType is 'Standard', the value provided will have no effect.
  • StoredPrice* - Providing this value will set the list price directly, overriding the calculation based on the DiscountType and Value. DiscountType and Value must always be provided, even when providing StoredPrice.
<?xml version="1.0" encoding="utf-8"?>
<Company>
  <PriceLists>
    <PriceList>
      <Prices>
        <Price>
          <StockCode>PROD001</StockCode>
          <DiscountType>DecreasePercent</DiscountType>
          <Value>10.00</Value>
          <StoredPrice>90.00</StoredPrice>
        </Price>
      </Prices>
    </PriceList>
  </PriceLists>
</Company>