Sage 50 CA Purchase Quote XML
The following tasks use the Sage 50 CA Purchase Quote XML format.
Tasks
XML Overview
Any Sage fields not documented below are not supported with our imports/exports. Examples of where in the XML the fields should appear are shown in the samples below.
Minimal Purchase Quote File
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<Vendor>
<Name>Zynk Software</Name>
</Vendor>
<LineItems>
<LineItem>
<Quantity>2</Quantity>
<Description>Computer Repair - No Warranty</Description>
<Price>5</Price>
</LineItem>
</LineItems>
</PurchaseQuote>
</PurchaseQuotes>
Complete Purchase Quote File
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<ExternalId>5230</ExternalId>
<PurchaseQuoteNumber>5230</PurchaseQuoteNumber>
<Vendor>
<ExternalId>124</ExternalId>
<Name>Zynk Software</Name>
<CurrencyCode>CAD</CurrencyCode>
<Contact>John Smith</Contact>
<Street1>i6</Street1>
<Street2>6-8 Charlotte Square</Street2>
<City>Newcastle</City>
<Province>Tyne & Wear</Province>
<PostalCode>NE1 4XF</PostalCode>
<Country>Great Britain</Country>
<Phone1>0191 820 1484</Phone1>
<Phone2>0191 820 1484</Phone2>
<Fax>0191 820 1484</Fax>
<Email>[email protected]</Email>
<Website>www.zynk.com</Website>
</Vendor>
<Date>2023-07-27</Date>
<ShippingDate>2023-07-28</ShippingDate>
<ItemsStoredAt>Ontario</ItemsStoredAt>
<VendorAddress>
<Address1>Teresa Green</Address1>
<Address2>i6</Address2>
<Address3>6-8 Charlotte Square</Address3>
<Address4>Newcastle, Tyne & Wear NE1 4XF</Address4>
<Address5>Great Britain</Address5>
</VendorAddress>
<ShippingAddress>
<AddressName><Mailing Address></AddressName>
<Address1>Zynk Software</Address1>
<Address2>John Smith</Address2>
<Address3>i6</Address3>
<Address4>6-8 Charlotte Square</Address4>
<Address5>Newcastle, Tyne & Wear NE1 4XF</Address5>
<Address6>Great Britain</Address6>
</ShippingAddress>
<LineItems>
<LineItem>
<ItemNumber>CR-10</ItemNumber>
<ItemExternalId>1234</ItemExternalId>
<Quantity>2</Quantity>
<Unit>Each</Unit>
<Description>Computer Repair - No Warranty</Description>
<BasePrice>5</BasePrice>
<DiscountPercentage>0</DiscountPercentage>
<Price>5</Price>
<Amount>10</Amount>
<TaxCode>GP</TaxCode>
<Account>42200</Account>
</LineItem>
</LineItems>
<Freight>
<Amount>2.00</Amount>
<TaxCode>GP</TaxCode>
<Tax1Amount>0.10</Tax1Amount>
<Tax2Amount>0.14</Tax2Amount>
</Freight>
<Terms>
<DiscountPercentage>2</DiscountPercentage>
<DiscountDays>30</DiscountDays>
<NetDays>60</NetDays>
</Terms>
</PurchaseQuote>
</PurchaseQuotes>
In each of the following sections most of the XML has been omitted to make the samples easier to read. The whole structure of the PurchaseQuotes schema is used below as a reference of where fields should be in the object model.
Header Information
The following fields can be populated at the header level of the purchase quote record.
When importing purchase quotes into Sage, we recommend that the ExternalId
field be populated by the unique id of the purchase quote from the external system. Zynk uses this field to track purchase quotes already imported into Sage, and it can be used in conjunction with the Prevent Reprocessing task setting to prevent duplicate purchase quotes being created in Sage.
The vendor name field acts as the unique identifier for vendors in Sage. The vendor can be specified by any of the following methods:
- Provide the vendor name via the Vendor/Name
element in the XML. If a vendor exists in Sage with this name, it will be selected. If not, a one-time vendor will be used with the name specified. Alternatively, you can explicitly set the name to <One-time vendor>
to use a one-time vendor.
- If the vendor has been imported into Sage by Zynk before, and an ExternalId
value was provided at the time, providing the same Vendor/ExternalId
value again will allow Zynk to determine the name via our truth table.
- Use the Vendor Match Fields task setting to search Sage for a matching vendor based on the value of one or more fields (such as email address or postal code).
| Sage Field | XML Field | Field Type | Input | Notes |
| --- | --- | --- | --- | --- | --- | --- |
| - | ExternalId | string(255) | Optional | Provide the ID of the purchase quote from the source system |
| Quote No | PurchaseQuoteNumber | string(20) | Dependant | If auto numbering is not enabled in Sage, you must provide this value |
| Vendor | Vendor/Id | string(255) | Optional | Used to looked up the vendor name in Zynk's truth table |
| Vendor | Vendor/Name | string(52) | Required | The value can be looked up in Zynk's truth table via the Vendor/ExternalId
, or the 'Vendor Match Fields' task setting |
| Date | Date | datetime | Optional | Will default to the current date if not specified |
| Shipping Date | ShippingDate | datetime | Optional | |
| Items stored at | ItemsStoredAt | string(35) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<ExternalId>5230</ExternalId>
<PurchaseQuoteNumber>5230</PurchaseQuoteNumber>
<Vendor>
<ExternalId>124</ExternalId>
<Name>Zynk Software</Name>
</Vendor>
<Date>2023-07-27</Date>
<ShippingDate>2023-07-28</ShippingDate>
<ItemsStoredAt>Ontario</ItemsStoredAt>
</PurchaseQuote>
</PurchaseQuotes>
Auto Creating Vendors
Zynk can automatically create new vendors in Sage where they don't already exist. To do this, you must enable the Auto Create Vendors task setting, and provide the vendor information described below in the XML.
| Sage Field | XML Field | Field Type | Input | Notes | | --- | --- | --- | --- | --- | --- | --- | | - | Vendor/ExternalId | string(255) | Optional | Provide the ID of the vendor from the source system | | Vendor | Vendor/Name | string(52) | Required | | | Currency | Vendor/CurrencyCode | string(3) | Optional | Specify the 3 letter currency ISO code | | Contact | Vendor/Contact | string(30) | Optional | | | Street1 | Vendor/Street1 | string(50) | Optional | | | Street2 | Vendor/Street2 | string(50) | Optional | | | City | Vendor/City | string(35) | Optional | | | Province | Vendor/Province | string(20) | Optional | | | PostalCode | Vendor/PostalCode | string(9) | Optional | | | Country | Vendor/Country | string(30) | Optional | | | Phone1 | Vendor/Phone1 | string(25) | Optional | | | Phone2 | Vendor/Phone2 | string(25) | Optional | | | Fax | Vendor/Fax | string(25) | Optional | | | Email | Vendor/Email | string(50) | Optional | | | Website | Vendor/Website | string(50) | Optional | | | Price List | Vendor/PriceList | string(25) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<Vendor>
<ExternalId>123</ExternalId>
<Name>Zynk Software</Name>
<CurrencyCode>CAD</CurrencyCode>
<Contact>John Smith</Contact>
<Street1>i6</Street1>
<Street2>6-8 Charlotte Square</Street2>
<City>Newcastle</City>
<Province>Tyne & Wear</Province>
<PostalCode>NE1 4XF</PostalCode>
<Country>Great Britain</Country>
<Phone1>0191 820 1484</Phone1>
<Phone2>0191 820 1484</Phone2>
<Fax>0191 820 1484</Fax>
<Email>[email protected]</Email>
<Website>www.zynk.com</Website>
<PriceList>Preferred</PriceList>
</Vendor>
</PurchaseQuote>
</PurchaseQuotes>
Address Information
The following fields can be populated in the vendor address and shipping address sections of the purchase quote record.
If a vendor was selected, and you haven't provided a vendor address, the address will be picked up automatically from the vendor.
If a vendor was selected, and you haven't provided a shipping address, the default shipping address will be picked up automatically from the vendor's account.
| Sage Field | XML Field | Field Type | Input | Notes | | --- | --- | --- | --- | --- | --- | | Vendor Address > Line 1 | VendorAddress/Address1 | string(75) | Optional | | | Vendor Address > Line 2 | VendorAddress/Address2 | string(75) | Optional | | | Vendor Address > Line 3 | VendorAddress/Address3 | string(75) | Optional | | | Vendor Address > Line 4 | VendorAddress/Address4 | string(75) | Optional | | | Vendor Address > Line 5 | VendorAddress/Address5 | string(75) | Optional | | | Shipping Address | ShippingAddress/AddressName | string(25) | Optional | Used to select an existing shipping address from the vendor account. Don't specify this if you want to provide the address via the fields below. | | Shipping Address > Line 1 | ShippingAddress/Address1 | string(75) | Optional | | | Shipping Address > Line 2 | ShippingAddress/Address2 | string(75) | Optional | | | Shipping Address > Line 3 | ShippingAddress/Address3 | string(75) | Optional | | | Shipping Address > Line 4 | ShippingAddress/Address4 | string(75) | Optional | | | Shipping Address > Line 5 | ShippingAddress/Address5 | string(75) | Optional | | | Shipping Address > Line 6 | ShippingAddress/Address6 | string(75) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<VendorAddress>
<Address1>Teresa Green</Address1>
<Address2>i6</Address2>
<Address3>6-8 Charlotte Square</Address3>
<Address4>Newcastle, Tyne & Wear NE1 4XF</Address4>
<Address5>Great Britain</Address5>
</VendorAddress>
<ShippingAddress>
<AddressName><Mailing Address></AddressName>
<Address1>Zynk Software</Address1>
<Address2>John Smith</Address2>
<Address3>i6</Address3>
<Address4>6-8 Charlotte Square</Address4>
<Address5>Newcastle, Tyne & Wear NE1 4XF</Address5>
<Address6>Great Britain</Address6>
</ShippingAddress>
</PurchaseQuote>
</PurchaseQuotes>
Line Items
The following fields can be populated at the line level of the purchase quote record.
| Sage Field | XML Field | Field Type | Input | Notes |
| --- | --- | --- | --- | --- | --- | --- |
| Item Number | ItemNumber | string(52) | Optional | |
| - | ItemExternalId | string(255) | Optional | Can be used to look up the ItemNumber
, if the item was created via the Import Items task, and an ExternalId
was specified. |
| Quantity | Quantity | double | Dependant | At least one of the following must be provided: Quantity
, Ordered
or BackOrdered
|
| Order | Ordered | double | Dependant | At least one of the following must be provided: Quantity
, Ordered
or BackOrdered
|
| Back Order | BackOrdered | double | Dependant | At least one of the following must be provided: Quantity
, Ordered
or BackOrdered
|
| Unit | Unit | string(15) | Optional | |
| Item Description | Description | string(75) | Optional | If not specified, will default to the description from the item |
| Base Price | BasePrice | double | Optional | |
| Discount | DiscountPercentage | double | Optional | |
| Price | Price | double | Optional | If not specified, will default to the price from the item |
| Amount | Amount | double | Optional | If not specified, will default to the price times the quantity |
| Tax | TaxCode | string(12) | Optional | |
| Account | Account | string(8) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<LineItems>
<LineItem>
<ItemNumber>CR-10</ItemNumber>
<ItemExternalId>1234</ItemExternalId>
<Quantity>2</Quantity>
<Ordered>2</Ordered>
<BackOrdered>2</BackOrdered>
<Unit>Each</Unit>
<Description>Computer Repair - No Warranty</Description>
<BasePrice>5</BasePrice>
<DiscountPercentage>0</DiscountPercentage>
<Price>5</Price>
<Amount>10</Amount>
<TaxCode>GP</TaxCode>
<Account>42200</Account>
</LineItem>
</LineItems>
</PurchaseQuote>
</PurchaseQuotes>
Footer Information
The following fields can be populated at the footer level of the purchase quote record.
| Sage Field | XML Field | Field Type | Input | Notes | | --- | --- | --- | --- | --- | --- | | Freight | Freight/Amount | double | Optional | | | Freight | Freight/TaxCode | string(12) | Optional | | | Freight | Freight/Tax1Amount | double | Optional | | | Freight | Freight/Tax2Amount | double | Optional | | | Early Payment Terms > % | Terms/DiscountPercentage | double | Optional | | | Early Payment Terms > Days | Terms/DiscountDays | int | Optional | | | Early Payment Terms > Net Days | Terms/NetDays | int | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<PurchaseQuotes>
<PurchaseQuote>
<Freight>
<Amount>2.00</Amount>
<TaxCode>GP</TaxCode>
<Tax1Amount>0.10</Tax1Amount>
<Tax2Amount>0.14</Tax2Amount>
</Freight>
<Terms>
<DiscountPercentage>2</DiscountPercentage>
<DiscountDays>30</DiscountDays>
<NetDays>60</NetDays>
</Terms>
</PurchaseQuote>
</PurchaseQuotes>