Menu

Transaction

PostTrans XML API for Sage 50 - Transactions

The PostTrans XML API for Sage 50 will import many kinds of transactions using a common format for all Sage 50 Transaction types, which is we hope easy to understand.   The PostTrans XML API will lookup and missing data, such default nominals, Prices, etc if not given similar to entering a transaction in Sage 50.

For example, each transaction has a <THTransType> tag which denoted the type of transaction.   “SI” is a Sales invoice, “PO” Purchase Order, “SO” Sales Order, “SIAT” is an Sales Invoice which posts to Sage 50 Audit Trail.   Thus any of the examples below can be simply edited from say a Sales invoice, to a Purchase invoice.  Note some fields are applicable to Sales and Purchase orders (and Sales Invoice module) these are listed in the table at the bottom of the page.

List of Tags/Entities for mapping are at bottom of page.

Click here for an overview of the XML API for Sage 50

Demo Video of Transaction Import

 
 
   PostTrans XML API for Sage 50 Import Sales Invoice
  0:00 Where everything is
  0:45 Explanation of XML
  3:30 If they Fail to Import
 
 
Transaction Types:
  • SQ,Sales Quote
  • SO,Sales Order
  • SI,Sales Invoice
  • SSC,Sales Service Credit Note,
  • SA,Payment on Account
  • PO,Purchase Order
  • PIA,Purchase Inv + Adj IN
  • PC,Purchase Credit
  • CP,Cash Payment
  • CR,Cash Receipt
  • SIAT,Sales Invoice Audit Trail
  • SCAT,Sales Credit Audit Trail
  • SSI,Sales Service Invoice,
  • SC,Sales Credit Note
  • PI,Purchase Batch Inv
  • PR,Purchase Receipt
  • BP,Bank Payment
  • BR,Bank Receipt
  • VP,Visa Credit Payment
  • VR,Visa Credit Receipts

Sage 50 API Validation

After creating a Sage 50 Transaction, the XML file is moved to a processed folder.   Or it could have been downloaded from an SFTP site or IMAPI e-mail address.   If the process fails validation, then the error/errors are appended to the top of the file, and the file is moved to a Failed folder.  A user can then easily edit the Transaction XML file and resubmit to PostTrans XML API for Sage 50.

Rounding

Rounding can often be a problem with importing from an external system, since the external system may not be rounding up the VAT the same as Sage 50.   Below are a few examples of how you can either import a Net figure plus VAT amount from the external system or using Inclusive of VAT.   Inclusive of VAT does not currently work with Sales/Purchase Orders and the Invoice Module.  

 

List of Examples

 

Example - 100 SI Net Value.xml

 

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_TLReadStockDescriptionFromXML=1  //If off all descriptions relating to stock come from stock record
         SW_UpdateLedgerOnInvoices=0  // Post to ledger automatically (If update cannot be edited)
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>SI</THTransType>  
      <!-- Sage 50 Sales Invoice, SO would give Sales Order, SC Credit note, SIAT invoice to audit trail -->
                  <!-- Could also be PI, PO, PC  -->
      <THAccCode>TEST02</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- ===== Header Delivery ==== -->
      <THDelName>My House</THDelName>   <!-- Text 60 - Delivery Address Name.  Double click to change delivery address -->
      <THDelAdd1>23 Long Rd</THDelAdd1>   <!-- Text 60 - Delivery Address Line 1.  Double click to change delivery address -->
      <THDelAdd2>Top of the hill</THDelAdd2>   <!-- Text 60 - Delivery Address Line 2.  Double click to change delivery address -->
      <THDelAdd3>Willberry</THDelAdd3>   <!-- Text 60 - Delivery Address Line 3.  Double click to change delivery address -->
      <THDelAdd4></THDelAdd4>   <!-- Text 60 - Delivery Address Line 4.  Double click to change delivery address -->
      <THDelPostcode>PE13 2TY</THDelPostcode> 
   
     <THNotes1>More instructions</THNotes1>   <!-- Text 60 - Notes 1 -->
      <THNotes2></THNotes2>   <!-- Text 60 - Notes 2 -->
      <THNotes3></THNotes3>
   
      <!-- Sage 50 allows the follwoing line types for Sales Orders and Invoice sent to Invoice module -->
      <!-- manual VAT and Nominal overides not allowed for these types -->       
      <TransactionLine>  <!-- Comment Line -->
         <TLDesc>Please find invoice for 3 items and work done.  Thanks :</TLDesc>
      </TransactionLine>   
      <TransactionLine>
         <!-- Sage 50 Product Line -->
         <TLProduct>CALC001</TLProduct>
         <TLQty>1</TLQty>
         <TLUnitPrice>250</TLUnitPrice>  <!-- Tax will be added to this based on account defaults -->
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLQty>7</TLQty>
         <TLUnitPrice>60</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLProduct>CARRIAGE</TLProduct>
         <TLDesc>Delivery to your door</TLDesc>
         <TLUnitPrice>14.95</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>  <!-- Sage 50 Comment Line -->
         <TLDesc>Please pay soon!!!</TLDesc>
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example - 105 SC Credit note.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_TLReadStockDescriptionFromXML=1  //If off all descriptions relating to stock come from stock record
         SW_UpdateLedgerOnInvoices=0  // Post to ledger automatically
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>SC</THTransType>  
      <!-- Sage 50 Sales Invoice, SO would give Sales Order, SC Credit note, SIAT invoice to audit trail -->
                  <!-- Could also be PI, PO, PC  -->
      <THAccCode>TEST02</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- ===== Header Delivery ==== -->
      <THDelName>My House</THDelName>   <!-- Text 60 - Delivery Address Name.  Double click to change delivery address -->
      <THDelAdd1>23 Long Rd</THDelAdd1>   <!-- Text 60 - Delivery Address Line 1.  Double click to change delivery address -->
      <THDelAdd2>Top of the hill</THDelAdd2>   <!-- Text 60 - Delivery Address Line 2.  Double click to change delivery address -->
      <THDelAdd3>Willberry</THDelAdd3>   <!-- Text 60 - Delivery Address Line 3.  Double click to change delivery address -->
      <THDelAdd4></THDelAdd4>   <!-- Text 60 - Delivery Address Line 4.  Double click to change delivery address -->
      <THDelPostcode>PE13 2TY</THDelPostcode> 
   
     <THNotes1>More instructions</THNotes1>   <!-- Text 60 - Notes 1 -->
      <THNotes2></THNotes2>   <!-- Text 60 - Notes 2 -->
      <THNotes3></THNotes3>
   
   
      <!-- Sage 50 allows the follwoing line types for Sales Orders and Invoice sent to Invoice module -->
      <!-- manual VAT and Nominal overides not allowed for these types -->       
      <TransactionLine>  <!-- Comment Line -->
         <TLDesc>Please a Credit for the goods returned</TLDesc>
      </TransactionLine>   
      <TransactionLine>
         <!-- Sage 50 Product Line -->
         <TLProduct>CALC001</TLProduct>
         <TLQty>1</TLQty>
         <TLUnitPrice>250</TLUnitPrice>  <!-- Tax will be added to this based on account defaults -->
      </TransactionLine>
   
      <TransactionLine>  <!-- Sage 50 Comment Line -->
         <TLDesc>Thanks for your custom</TLDesc>
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example - 110 SI Inclusive of VAT.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_TLReadStockDescriptionFromXML=1  //If off all descriptions relating to stock come from stock record
         SW_UpdateLedgerOnInvoices=0  // Post to ledger automatically
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>SI</THTransType>  
      <!-- Sage 50 Sales Invoice, SO would give Sales Order, SC Credit note, SIAT invoice to audit trail -->
                  <!-- Could also be PI, PO, PC  -->
      <THAccCode>TEST02</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- ===== Header Delivery ==== -->
      <THDelName>My House</THDelName>   <!-- Text 60 - Delivery Address Name.  Double click to change delivery address -->
      <THDelAdd1>23 Long Rd</THDelAdd1>   <!-- Text 60 - Delivery Address Line 1.  Double click to change delivery address -->
      <THDelAdd2>Top of the hill</THDelAdd2>   <!-- Text 60 - Delivery Address Line 2.  Double click to change delivery address -->
      <THDelAdd3>Willberry</THDelAdd3>   <!-- Text 60 - Delivery Address Line 3.  Double click to change delivery address -->
      <THDelAdd4></THDelAdd4>   <!-- Text 60 - Delivery Address Line 4.  Double click to change delivery address -->
      <THDelPostcode>PE13 2TY</THDelPostcode> 
   
     <THNotes1>More instructions</THNotes1>   <!-- Text 60 - Notes 1 -->
      <THNotes2></THNotes2>   <!-- Text 60 - Notes 2 -->
      <THNotes3></THNotes3>
   
   
      <!-- Sage 50 allows the follwoing line types for Sales Orders and Invoice sent to Invoice module -->
      <!-- manual VAT and Nominal overides not allowed for these types -->       
      <TransactionLine>  <!-- Comment Line -->
         <TLDesc>Please find invoice for 3 items and work done.  Thanks :</TLDesc>
      </TransactionLine>   
      <TransactionLine>
         <!-- Sage 50 Product Line -->
         <TLProduct>CALC001</TLProduct>
         <TLQty>1</TLQty>
         <TLTotIncluOfTax>300</TLTotIncluOfTax>  <!-- Tax will be added to this based on account defaults -->
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLQty>7</TLQty>
         <TLTotIncluOfTax>60</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLProduct>CARRIAGE</TLProduct>
         <TLDesc>Delivery to your door</TLDesc>
         <TLTotIncluOfTax>14.95</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>  <!-- Sage 50 Comment Line -->
         <TLDesc>Please pay soon!!!</TLDesc>
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example - 160 SIAT Audit Trial Net.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>SIAT</THTransType>  
      <!-- Sage 50 Sales Invoice to Audit Trail -->
      
      <THAccCode>ABS001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- Sage 50 Purchase Invoice to Audit Trail, these are quite simple and do note
         have qty or products      -->
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLUnitPrice>60</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLDesc>Delivery to your door</TLDesc>
         <TLUnitPrice>10</TLUnitPrice>  
         <TLOrdRefTxt>sam</TLOrdRefTxt>    <!-- External Ref on each line -->   
      </TransactionLine>   

     </TransactionHeader>
</sage50Data>

Example - 165 SIAT Audit Trial Inclusive of VAT.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>SIAT</THTransType>  
      <!-- Sage 50 Sales Invoice to Audit Trail, these are quite simple and do note
         have qty or products      -->
      
      <THAccCode>ABS001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>
      <THOrderNo>888347</THOrderNo>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Something</TLDesc>
         <TLTotIncluOfTax>300</TLTotIncluOfTax>  <!-- Tax will be added to this based on account defaults -->
         <TLOrdRefTxt>sam</TLOrdRefTxt>    <!-- Exteranle Ref on each line -->   
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLTotIncluOfTax>60</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLDesc>Delivery to your door</TLDesc>
         <TLTotIncluOfTax>14.95</TLTotIncluOfTax>   
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example – 170 PI Inclusive of VAT.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>PIA</THTransType>  
      <!-- Sage 50 Purchase Invoice to Audit Trail -->
      
      <THAccCode>MCN001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- Sage 50 Purchase Invoice to Audit Trail, these are quite simple and do note
         have qty or products      -->
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLUnitPrice>60</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLDesc>Delivery to your door</TLDesc>
         <TLUnitPrice>10</TLUnitPrice>  
         <TLOrdRefTxt>sam</TLOrdRefTxt>    <!-- External Ref on each line -->   
      </TransactionLine>   

     </TransactionHeader>
</sage50Data>

 

Example – 173 PIA Audit Trial Net.xml

 

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>PIA</THTransType>  
      <!-- Sage 50 Purchase Invoice to Audit Trail -->
      
      <THAccCode>MCN001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- Sage 50 Purchase Invoice to Audit Trail, these are quite simple and do note
         have qty or products      -->
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLUnitPrice>60</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLDesc>Delivery to your door</TLDesc>
         <TLUnitPrice>10</TLUnitPrice>  
         <TLOrdRefTxt>sam</TLOrdRefTxt>    <!-- External Ref on each line -->   
      </TransactionLine>   

     </TransactionHeader>
</sage50Data>

Example – 175 PIA Audit Trial Inclusive of VAT.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>PIA</THTransType>  
      <!-- Sage 50 Purchase Invoice to Audit Trail, these are quite simple and do note
         have qty or products      -->
      
      <THAccCode>MCN001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>
      <THOrderNo>888347</THOrderNo>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Something</TLDesc>
         <TLTotIncluOfTax>300</TLTotIncluOfTax>  <!-- Tax will be added to this based on account defaults -->
         <TLOrdRefTxt>sam</TLOrdRefTxt>    <!-- External Ref on each line -->   
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLTotIncluOfTax>60</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLDesc>Delivery to your door</TLDesc>
         <TLTotIncluOfTax>14.95</TLTotIncluOfTax>   
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example – 180 PO Net Value.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_TLReadStockDescriptionFromXML=1  //If off all descriptions relating to stock come from stock record
         SW_UpdateLedgerOnInvoices=0  // Post to ledger automatically
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>PO</THTransType>  
      <!-- Sage 50 Purcahse Order, SO would give Sales Order, SC Credit note, SIAT invoice to audit trail -->
                  <!-- Could also be PI, PO, PC  -->
      <THAccCode>MCN001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- ===== Header Delivery ==== -->
      <THDelName>My House</THDelName>   <!-- Text 60 - Delivery Address Name.  Double click to change delivery address -->
      <THDelAdd1>23 Long Rd</THDelAdd1>   <!-- Text 60 - Delivery Address Line 1.  Double click to change delivery address -->
      <THDelAdd2>Top of the hill</THDelAdd2>   <!-- Text 60 - Delivery Address Line 2.  Double click to change delivery address -->
      <THDelAdd3>Willberry</THDelAdd3>   <!-- Text 60 - Delivery Address Line 3.  Double click to change delivery address -->
      <THDelAdd4></THDelAdd4>   <!-- Text 60 - Delivery Address Line 4.  Double click to change delivery address -->
      <THDelPostcode>PE13 2TY</THDelPostcode> 
   
     <THNotes1>More instructions</THNotes1>   <!-- Text 60 - Notes 1 -->
      <THNotes2></THNotes2>   <!-- Text 60 - Notes 2 -->
      <THNotes3></THNotes3>
   
   
      <!-- Sage 50 allows the follwoing line types for Sales Orders and Invoice sent to Invoice module -->
      <!-- manual VAT and Nominal overides not allowed for these types -->       
      <TransactionLine>  <!-- Comment Line -->
         <TLDesc>Please find invoice for 3 items and work done.  Thanks :</TLDesc>
      </TransactionLine>   
      <TransactionLine>
         <!-- Sage 50 Product Line -->
         <TLProduct>CALC001</TLProduct>
         <TLQty>1</TLQty>
         <TLUnitPrice>250</TLUnitPrice>  <!-- Tax will be added to this based on account defaults -->
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLQty>7</TLQty>
         <TLUnitPrice>60</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLProduct>CARRIAGE</TLProduct>
         <TLDesc>Delivery to your door</TLDesc>
         <TLUnitPrice>14.95</TLUnitPrice>   
      </TransactionLine>   
      <TransactionLine>  <!-- Sage 50 Comment Line -->
         <TLDesc>Please pay soon!!!</TLDesc>
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

Example – 185 PO Inclusive of VAT.xml

<?xml version="1.0" ?>
<sage50Data>
   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings XML_API_mappings.xml
         SW_TLReadStockDescriptionFromXML=1  //If off all descriptions relating to stock come from stock record
         SW_UpdateLedgerOnInvoices=0  // Post to ledger automatically
         SW_UseSystemExhangeRate=1   //Transaction will be un account currancy
      </mappings>
   </settings>
   
  <TransactionHeader>  
      <THTransType>PO</THTransType>  
      <!-- Sage 50 Purcahse Order, SO would give Sales Order, SC Credit note, SIAT invoice to audit trail -->
                  <!-- Could also be PI, PO, PC  -->
      <THAccCode>MCN001</THAccCode>   <!-- Currency and Tax will be set by account -->
      <THTransDate>2017-02-20</THTransDate> <!-- Due date will be set automatically -->
      <THCustRef>8888</THCustRef>

      <!-- ===== Header Delivery ==== -->
      <THDelName>My House</THDelName>   <!-- Text 60 - Delivery Address Name.  Double click to change delivery address -->
      <THDelAdd1>23 Long Rd</THDelAdd1>   <!-- Text 60 - Delivery Address Line 1.  Double click to change delivery address -->
      <THDelAdd2>Top of the hill</THDelAdd2>   <!-- Text 60 - Delivery Address Line 2.  Double click to change delivery address -->
      <THDelAdd3>Willberry</THDelAdd3>   <!-- Text 60 - Delivery Address Line 3.  Double click to change delivery address -->
      <THDelAdd4></THDelAdd4>   <!-- Text 60 - Delivery Address Line 4.  Double click to change delivery address -->
      <THDelPostcode>PE13 2TY</THDelPostcode> 
   
     <THNotes1>More instructions</THNotes1>   <!-- Text 60 - Notes 1 -->
      <THNotes2></THNotes2>   <!-- Text 60 - Notes 2 -->
      <THNotes3></THNotes3>
   
   
      <!-- Sage 50 allows the follwoing line types for Sales Orders and Invoice sent to Invoice module -->
      <!-- manual VAT and Nominal overides not allowed for these types -->       
      <TransactionLine>  <!-- Comment Line -->
         <TLDesc>Please find invoice for 3 items and work done.  Thanks :</TLDesc>
      </TransactionLine>   
      <TransactionLine>
         <!-- Sage 50 Product Line -->
         <TLProduct>CALC001</TLProduct>
         <TLQty>1</TLQty>
         <TLTotIncluOfTax>300</TLTotIncluOfTax>  <!-- Tax will be added to this based on account defaults -->
      </TransactionLine>
   
      <TransactionLine>
         <!-- Sage 50 Service Line -->
         <TLDesc>Reading 7hrs</TLDesc>
         <TLNomCode>4001</TLNomCode>  <!-- Nominal Account, defult overidden -->
         <TLQty>7</TLQty>
         <TLTotIncluOfTax>60</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>
         <!-- Apply an additional charge -->
         <TLProduct>CARRIAGE</TLProduct>
         <TLDesc>Delivery to your door</TLDesc>
         <TLTotIncluOfTax>14.95</TLTotIncluOfTax>   
      </TransactionLine>   
      <TransactionLine>  <!-- Sage 50 Comment Line -->
         <TLDesc>Please pay soon!!!</TLDesc>
      </TransactionLine>   
     </TransactionHeader>
</sage50Data>

XML API Tags for Sage 50 Entity 'TransactionHeader'

Tag Name

Data Type

Description

Important Fields:

TLProduct^

Text 30

Product code. Not used on Service Type Transactions.
    In Cell Searching values in table ProdCodeNoDesc

TLDesc

Text 60

Product Description. PostTrans stops importing after finding 5 consecutive blank cells.

TLQty^

Double

Quantity, if Service Transaction then can be omitted, and lines with TLNett will have Qty 1. PRO – For Product Transactions - If switch 'ignore ZERO qty' ignores any lines with zero qty. This allows a long product list to be listed, and user simply edit a qty to book IN/OUT
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

TLUnitPrice^

Currency

Unit Price for each item. If cell is blank then PostTrans will lookup customer price on change of Qty, or adding a product. If option is on to override the price, in System setup >> Lookups >> Switches, then the customers price will overwrite any value already in cell, on change of Qty. Price will be after customer discount. PRO - If multi-currency is ON will be in account currency.
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

TLDueDate

Date

Due Date for Invoice, Delivery Date on Order, Expire Date on Quote. Overides the date set on Header in THDueDate

TLNomCode^

Text 8

Nominal Code, if not specified then uses default
    In Cell Searching values in table NomCode

TLDepartment^

Integer

Department, if not specified then uses default. Make sure the format of the cell is “General” else search may not work properly
    In Cell Searching values in table DeptCode

TLDiscValue^

Double

Sales:Additional Discount Value to be applied to TLUnitPrice, Value should be specified in TLDiscValue OR TLDiscTotValue OR TLDiscPerc but not both cells. Note TLUnitPrice has already had any system discount applied on account record.
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

TLDiscTotValue^

Double

Sales:Additional Discount Value to be applied to Line, Value should be specified in TLDiscValue OR TLDiscTotValue OR TLDiscPerc but not both cells. Note TLUnitPrice has already had any system discount applied on account record.
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

TLDiscPerc^

Double

Sales:Additional Discount Percent to be applied to TLUnitPrice, Value should be specified in TLDiscValue OR TLDiscTotValue OR TLDiscPerc but not both cells. Note TLUnitPrice has already had any system discount applied on account record.
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

TLTotIncluOfTax

Currency

Line Total inclusive of Tax. PostTrans will calculate Tax and Unit Price back from Inclusive Tax Total for Line given Qty and overcome rounding problems. Use THNetDiscount to account for discount. Best choice when importing data as reduces rounding problems

Text:

TLComment1

Text 60

Comment1 on line. If system settings ‘Large Product Description word wrap in Comment1/2’ is ON and ‘Read Product description from spreadsheet’ then will word wrap Description into these fields

TLComment2

Text 60

Comment2

TLJobRef

Text 60

Project Ref

TLOrdRefTxt

Text 30

Line Order Ref Text (only visible on SI/SO), ExtRef on PI/PC/SIAT/SA/SR/PR

TLLineInfo

Text 60

Line Information, N/A for PI/PC

TLOrdRefNo

Integer

Line Order Ref Number (only visible on SI/SO)

Tax:

TLTaxManAmount

Currency

TTax Amount, per item, if calculated manually. Use with Caution as you are responsible for calculating Tax correctly.

TLTaxManTotAmount

Currency

Tax Amount if calculated manually. Use with Caution as you are responsible for calculating Tax correctly.

TLTaxCode^

Integer

Tax Code. Will fill in default if blank. Make sure the format of the cell is “General” else search may not work properly
    In Cell Searching values in table TaxCode

Transaction Header:

THTransType^

Text 2 Head

Transaction Type. Make sure the format of the cell is “General” else search may not work properly. Must be specified on each line.
        In Cell Searching values:Transaction Type
                  SQ, Sales Quote
                  SO, Sales Order
                  SI, Sales Invoice
                  SIAT, Sales Invoice Audit Trail
                  SCAT, Sales Credit Audit Trail
                  SSC, Sales Service Credit Note
                  SSI, Sales Service Invoice
                  SC, Sales Credit Note
                  SR, Sales Reciept
                  SA, Payment on Account
                  PO, Purchase Order
                  PI, Purchase Batch Inv
                  PR, Purchase Receipt
                  PA, Payment on Account
                  PIA, Purchase Inv + Adj IN
                  PC, Purchase Credit
                  BP, Bank Payment
                  BR, Bank Receipt
                  CP, Cash Payment
                  CR, Cash Receipt
                  VP, Visa Credit Payment
                  VR, Visa Credit Receipts

THAccCode^

Text 8 Head

Transaction Account Code. Customer or Supplier depending on Transaction Type.
    In Cell Searching values in table THAccCode

THTransDate

Date Head

Transaction Date

THDueDate

Date Head

Due Date for Delivery Date on Order, Expire Date on Quote. SO/PO only

THAccName

Text 60 Head

Customer Account Name

THAdd1

Text 60 Head

Customer Address 1

THAdd2

Text 60 Head

Customer Address 2

THAdd3

Text 60 Head

Customer Address 3

THAdd4

Text 60 Head

Customer Address 4

THAddPostcode^

Text 60 Head

Customer Postcode. If Postcode Search is enabled in ‘Setup >> Lookup >> Address Lookup’ then enter Space or Space + Postcode to search for an address.
    In Cell Searching values in table SimplyPostcode

THContact

Text 30 Head

Customer Contact Name

THPhone

Text 30 Head

Customer/Supplier Telephone Number SO/PO only

Currency:

THCurrency^

Integer Head

Currency, will be set after selecting an account, any prices then altered will be in that currency.
    In Cell Searching values in table CurrencyCode

THCurExch

Double Head

Use System Exchange Rate, unless option changed in PostTrans system settins

Carriage:

THCarrCourierNo^

Integer HeadOnly

Carriage Courier Number. Make sure the format of the cell is “General” else search may not work properly
    In Cell Searching values in table CourierCode

THCarrConsNo

Text 30 HeadOnly

Consign Number

THCarrNet^

Currency HeadOnly

Carriage Net Amount, else value in Sage Line 50 SOP Settings
    Changes in this cell will recalc other cells. Delete ^ to disable this calculation.

THCarrTaxCode^

Integer HeadOnly

Carriage Tax Code, else uses Account Default. Make sure the format of the cell is “General” else search may not work properly
    In Cell Searching values in table TaxCode

THCarrDepartment^

Integer HeadOnly

Carriage Department, else value in Sage Line 50 SOP Settingst. Make sure the format of the cell is “General” else search may not work properly
    In Cell Searching values in table DeptCode

THCarrNomCode^

Text 8 HeadOnly

Carriage Nominal Code, else value in Sage Line 50 SOP Settings
    In Cell Searching values in table NomCode

Footer:

THGlobalNomCode^

Text 8 Head

Footer - Global Overide Nominal Code
    In Cell Searching values in table NomCode

THGlobalDep^

Integer Head

Footer - Overide Department
    In Cell Searching values in table DeptCode

THGlobalDetails

Text 60 Head

Footer - Overide Details

THGlobalTaxCode^

Integer Head

Footer - Overide Tax Code.
    In Cell Searching values in table TaxCode

Header Delivery:

THDelName

Text 60 Head

Delivery Address Name. Double click to change delivery address

THDelAdd1

Text 60 Head

Delivery Address Line 1. Double click to change delivery address

THDelAdd2

Text 60 Head

Delivery Address Line 2. Double click to change delivery address

THDelAdd3

Text 60 Head

Delivery Address Line 3. Double click to change delivery address

THDelAdd4

Text 60 Head

Delivery Address Line 4. Double click to change delivery address

THDelPostcode^

Text 60 Head

Delivery Postcode. PRO -If Postcode Search is enabled in ‘Setup >> Lookup >> Address Lookup’ then enter Space or Space + Postcode to search for an address.
    In Cell Searching values in table SimplyPostcode

Project (Pro):

TLProject^

Text 12

Project code where appropriate
    In Cell Searching values in table ProjectCode

THProject^

Text 12 HeadOnly

Project code where appropriate
    In Cell Searching values in table ProjectCode

TLCostCode^

Text 8

Cost Code on Transaction line
    In Cell Searching values in table ProjectCostCode

THCostCode^

Text 8 HeadOnly

Cost Code on Transaction line, but default can be set on header for greater flexability, where appropriate
    In Cell Searching values in table ProjectCostCode

Header Text:

THCustRef

Text 30 Head

Customer`s Order Number

THOrderNo

Text 7 Head

Order Number can be set on SI

THDetails

Text 60 Head

Details on PI

THDUNSRef

Text 9 Head

DUNS credit reference number

THNotes1

Text 60 Head

Notes 1

THNotes2

Text 60 Head

Notes 2

THNotes3

Text 60 Head

Notes 3

THPracSolRef

Text 60 Head

Sage Practice Solutions Reference

THTakenBy

Text 60 Head

Order Taken By

Header Discount:

THNetDiscount

Currency Head

Net Discount Value applied to whole transaction, as shown at the bottom of Sage Line 50 Order.

THNetDiscDesc

Text 60 HeadOnly

Net Discount Description. If used in lines then is the sum of values

Header Payment:

THPayAmt

Double Head

Amount Prepaid. Option in 'Setup >> Switches’, can stop posting if UNDER or OVER paid. If used in lines, then posts sum of all lines

THPayRef

Text 30 Head

Payment Reference

THPayType^

Text 2 Head

Payment Type (PAR/SR/SA). SI or SO should be SA, Post as Type SIAT (SI to Audit Trail) fro SR allocation
    Sage V21 2015 onwards
        In Cell Searching values:Payment Type
                  PAR, Payment already received
                  SR, Allocate Payment To Invoice
                  SA, Post as Payment on Accounts

THPayNom^

Integer Head

Payment Bank Nominal
    In Cell Searching values in table NomCodeBank

Analysis:

THAnal1

Text Head

Transaction Analysis 1
    Sage V22 2016 onwards

THAnal2

Text Head

Transaction Analysis 2
    Sage V22 2016 onwards

THAnal3

Text Head

Transaction Analysis 3
    Sage V22 2016 onwards

TLDonFund^

Integer

Charity Fund Number
    In Cell Searching values in table CharityCode


Req = Field is required    EOF = End of file, Stop when no more values    

Head  A header tag can be used in header section, before row 30, of the transaction template.  Or in the rows data of data, below row 30, of the template like a traditional CSV importer.

With data type Yes/No fields, if cell starts with 'y' or 'Y' is taken as TRUE

Where ^ denotes a In Cell Code Search, delete ^ at end of tag, to turn off code search

All Text fields are trimmed (spaces before) by default. Add ' to the end of the tag name to stop this.