Sage 50 CA Sales Quote XML
The following tasks use the Sage 50 CA Sales 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 Sales Quote File
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes>
<SalesQuote>
<Customer>
<Name>Zynk Software</Name>
</Customer>
<LineItems>
<LineItem>
<Quantity>2</Quantity>
<Description>Computer Repair - No Warranty</Description>
<Price>5</Price>
</LineItem>
</LineItems>
</SalesQuote>
</SalesQuotes>
Complete Sales Quote File
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes>
<SalesQuote>
<ExternalId>5230</ExternalId>
<SalesQuoteNumber>5230</SalesQuoteNumber>
<Customer>
<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>
</Customer>
<Date>2023-07-27</Date>
<ShippingDate>2023-07-28</ShippingDate>
<Salesperson>Zan, Yao</Salesperson>
<ShipFrom>Ontario</ShipFrom>
<JobSite>Askew Shopping Centre</JobSite>
<CustomerAddress>
<Address1>Teresa Green</Address1>
<Address2>i6</Address2>
<Address3>6-8 Charlotte Square</Address3>
<Address4>Newcastle, Tyne & Wear NE1 4XF</Address4>
<Address5>Great Britain</Address5>
</CustomerAddress>
<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>
<Message>Thank you for your business!</Message>
</SalesQuote>
</SalesQuotes>
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 SalesQuotes 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 sales quote record.
When importing sales quotes into Sage, we recommend that the ExternalId
field be populated by the unique id of the sales quote from the external system. Zynk uses this field to track sales quotes already imported into Sage, and it can be used in conjunction with the Prevent Reprocessing task setting to prevent duplicate sales quotes being created in Sage.
The customer name field acts as the unique identifier for customers in Sage. The customer can be specified by any of the following methods:
- Provide the customer name via the Customer/Name
element in the XML. If a customer exists in Sage with this name, it will be selected. If not, a one-time customer will be used with the name specified. Alternatively, you can explicitly set the name to <One-time customer>
to use a one-time customer.
- If the customer has been imported into Sage by Zynk before, and an ExternalId
value was provided at the time, providing the same Customer/ExternalId
value again will allow Zynk to determine the name via our truth table.
- Use the Customer Match Fields task setting to search Sage for a matching customer 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 sales quote from the source system |
| Quote No | SalesQuoteNumber | string(20) | Dependant | If auto numbering is not enabled in Sage, you must provide this value |
| Customer | Customer/Id | string(255) | Optional | Used to looked up the customer name in Zynk's truth table |
| Customer | Customer/Name | string(52) | Required | The value can be looked up in Zynk's truth table via the Customer/ExternalId
, or the 'Customer Match Fields' task setting |
| Date | Date | datetime | Optional | Will default to the current date if not specified |
| Shipping Date | ShippingDate | datetime | Optional | |
| Salesperson | Salesperson | string(52) | Optional | |
| Ship from | ShipFrom | string(35) | Optional | |
| Job Site | JobSite | string(52) | Optional | If specified, you can't set job information at the line level |
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes>
<SalesQuote>
<ExternalId>5230</ExternalId>
<SalesQuoteNumber>5230</SalesQuoteNumber>
<Customer>
<ExternalId>124</ExternalId>
<Name>Zynk Software</Name>
</Customer>
<Date>2023-07-27</Date>
<ShippingDate>2023-07-28</ShippingDate>
<Salesperson>Zan, Yao</Salesperson>
<ShipFrom>Ontario</ShipFrom>
<JobSite>Askew Shopping Centre</JobSite>
</SalesQuote>
</SalesQuotes>
Auto Creating Customers
Zynk can automatically create new customers in Sage where they don't already exist. To do this, you must enable the Auto Create Customers task setting, and provide the customer information described below in the XML.
| Sage Field | XML Field | Field Type | Input | Notes | | --- | --- | --- | --- | --- | --- | --- | | - | Customer/ExternalId | string(255) | Optional | Provide the ID of the customer from the source system | | Customer | Customer/Name | string(52) | Required | | | Currency | Customer/CurrencyCode | string(3) | Optional | Specify the 3 letter currency ISO code | | Contact | Customer/Contact | string(30) | Optional | | | Street1 | Customer/Street1 | string(50) | Optional | | | Street2 | Customer/Street2 | string(50) | Optional | | | City | Customer/City | string(35) | Optional | | | Province | Customer/Province | string(20) | Optional | | | PostalCode | Customer/PostalCode | string(9) | Optional | | | Country | Customer/Country | string(30) | Optional | | | Phone1 | Customer/Phone1 | string(25) | Optional | | | Phone2 | Customer/Phone2 | string(25) | Optional | | | Fax | Customer/Fax | string(25) | Optional | | | Email | Customer/Email | string(50) | Optional | | | Website | Customer/Website | string(50) | Optional | | | Price List | Customer/PriceList | string(25) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes>
<SalesQuote>
<Customer>
<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>
</Customer>
</SalesQuote>
</SalesQuotes>
Address Information
The following fields can be populated in the customer address and shipping address sections of the sales quote record.
If a customer was selected, the customer address will always be set to the address shown on the customers account, and can't be overridden. You can only set the customer address when the quote is being raised against a one-time customer.
If a customer was selected, and you haven't provided a shipping address, the default shipping address will be picked up automatically from the customer's account. The shipping address can always be overridden.
| Sage Field | XML Field | Field Type | Input | Notes | | --- | --- | --- | --- | --- | --- | | Customer Address > Line 1 | CustomerAddress/Address1 | string(75) | Optional | Can only be populated when the customer is a one-time customer | | Customer Address > Line 2 | CustomerAddress/Address2 | string(75) | Optional | Can only be populated when the customer is a one-time customer | | Customer Address > Line 3 | CustomerAddress/Address3 | string(75) | Optional | Can only be populated when the customer is a one-time customer | | Customer Address > Line 4 | CustomerAddress/Address4 | string(75) | Optional | Can only be populated when the customer is a one-time customer | | Customer Address > Line 5 | CustomerAddress/Address5 | string(75) | Optional | Can only be populated when the customer is a one-time customer | | Shipping Address | ShippingAddress/AddressName | string(25) | Optional | Used to select an existing shipping address from the customer 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"?>
<SalesQuotes>
<SalesQuote>
<CustomerAddress>
<Address1>Teresa Green</Address1>
<Address2>i6</Address2>
<Address3>6-8 Charlotte Square</Address3>
<Address4>Newcastle, Tyne & Wear NE1 4XF</Address4>
<Address5>Great Britain</Address5>
</CustomerAddress>
<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>
</SalesQuote>
</SalesQuotes>
Line Items
The following fields can be populated at the line level of the sales 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"?>
<SalesQuotes>
<SalesQuote>
<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>
</SalesQuote>
</SalesQuotes>
Footer Information
The following fields can be populated at the footer level of the sales 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 | | | Message | Message | string(75) | Optional | |
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes>
<SalesQuote>
<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>
<Message>Thank you for your business!</Message>
</SalesQuote>
</SalesQuotes>