Menu

Supplier Account

PostTrans XML API for Sage 50 - Supplier Account

The PostTrans XML API for Sage 50 provides to ability to update, or create Customer details in Sage 50 , from a simple to understand XML file, which can be combined to update account details before importing and Sales Order, Invoice, Credit etc.   See Transaction examples.

The following XML file if submitted to import directory or IMAP e-mail account.  At the top of the XML file, we can optionally set the Sage 50 Company for the Sage 50 API to import or update Customer details and override settings which can also be set in XML_API_mappings.xml (“View >> Mapping Settings” menu)  more info

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

List of Examples

 

Example - 50 Simple Supplier Account update.xml

 

<?xml version="1.0" ?>
<sage50Data>

   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings 50_XML_API_mappings.xml
         
         CuCreditLimit,onlyOnCreate  //Do not set if account already exisits
         CuTaxCode,onlyOnCreate
         CuCurrency,onlyOnCreate
         cuDateOpened,onlyOnCreate
      </mappings>
   </settings>
   
     <Supplier>  
         <SuCode>TEST03</SuCode>
         <SuName>Comtek Accounts</SuName>
         <SuAdd1>Venture House</SuAdd1>
         <SuAdd2>Venture Court</SuAdd2>
         <SuAdd3>Bolness Rd.</SuAdd3>
         <SuAdd4>Wisbech</SuAdd4>
         <SuPostcode>PE13 2QL</SuPostcode>
         
         <SuContactName>Mr Sam Smith</SuContactName>     <!-- Contact can only be updated on creation -->
         <SuPhone>+44 945 463523</SuPhone>
         <Sue-mail1>ss@ss.com</Sue-mail1>
         
         <SuCreditLimit>1000</SuCreditLimit>
         <SuCurrency>1</SuCurrency>   <!-- 1,GBP,2,USD -->

         <SuTaxCode>1</SuTaxCode>  <!-- Sage 50 0=0%,1=Standard Rate, etc.-->
         <SuVATRegNo>612 5749 32</SuVATRegNo>   

         <SuDateOpened>2020-02-20</SuDateOpened>
         <SuTermsAgreed>True</SuTermsAgreed>
         
         <SuSettDays>30</SuSettDays>     <!-- 30 Days payment term -->
         <SuAnal1>Midlands</SuAnal1>
         <SuAnal2>CVR Coverings</SuAnal2>
         <SuAnal3>B</SuAnal3> 
     </Supplier>
</sage50Data>

Results in new or updated Sage 50 Supplier:

XML API Tags for Sage 50 Entity 'Supplier'

Tag Name

Data Type

Description

Important Fields:

SuCode

Text 8

Account Reference

SuName

Text 60

Account Name

SuInactive

Yes/No-

Inactive Flag - yes/No
    Sage V21 2015 onwards

Registered Address:

SuAdd1

Text 60

Account Address Line 1

SuAdd2

Text 60

Account Address Line 2

SuAdd3

Text 60

Account Address Line 3

SuAdd4

Text 60

Account Address Line 4

SuPostcode^

Text 60

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

SuCountryCode^

Text 2

Country Code
    In Cell Searching values in table CountryCode

SuVATRegNo

Text 20

VAT Registration Number

Contact Information:

SuContactName

Text 30

Contact Name

SuTradeContact

Text 30

Name of Trade Contact

SuPhone

Text 30

Telephone Number

SuPhone2

Text 30

Second Telephone Number

SuFax

Text 30

Fax Number

SuWWW

Text 255

WWW Address

e-mail Settings:

Sue-mail1

Text 255

EMail Address

Sue-mail2

Text 255

EMail Address 2
    Sage V19 2013 onwards

Sue-mail3

Text 255

EMail Address 3
    Sage V19 2013 onwards

Sue-mail4

Text 255

e-mail4
    Sage V23 2017 onwards

Sue-mail5

Text 255

e-mail5
    Sage V23 2017 onwards

Sue-mail6

Text 255

e-mail6
    Sage V23 2017 onwards

SuSendInvEmail

Yes/No-

Send Invoices To This Account via Email

SuSendLettersEmail

Yes/No-

Send Letters To This Account via Email

Defaults - Custom Fields:

SuAnal1

Text 30

Analysis 1

SuAnal2

Text 30

Analysis 2

SuAnal3

Text 30

Analysis 3

SuAnal4

Text 30

Anal4
    Sage V23 2017 onwards

SuAnal5

Text 30

Anal5
    Sage V23 2017 onwards

SuAnal6

Text 30

Anal6
    Sage V23 2017 onwards

Defaults - Pricing and Discounting:

SuDiscRate

Double

Discount Rate %

SuDiscType^

Integer

Discount Type
        In Cell Searching values:Discount Type
                  0, None
                  1, Invoice Value
                  2, Band A
                  3, Band B
                  4, Band C
                  5, Band D
                  6, Band E

SuPriceList^

Text 8

Price List Reference
    In Cell Searching values in table PriceList

Defaults - Misc Defaults:

SuNomCode^

Text 8

Default Nominal Code
    In Cell Searching values in table NomCode

SuOverideProductNom

Yes/No-

Override Product Nominal Code in Invoicing

SuTaxCode^

Integer

Default Tax Code
    In Cell Searching values in table TaxCode

SuOverideProductTax

Yes/No-

Override the products own Tax Code.

SuCurrency^

Integer

Currency
    In Cell Searching values in table CurrencyCode

SuDepartment^

Text 2

Department Number
    In Cell Searching values in table DeptCode

Credit Control - Terms:

SuCreditLimit

Currency

Credit Limit

SuSettDays

Integer

Settlement Due Days

SuSettDiscount

Double

Settlement Discount Rate

SuPaymentDueDays

Integer

Payment Due Days

SuTermsTxt

Text 30

Terms

SuCreditRef

Text 60

Credit Bureau Reference

SuBureau^

Integer

Credit Bureau Used
    In Cell Searching values in table BureauCode

SuPrioritySupp

Yes/No-

Priority Supplier
    Sage V18 2012 onwards

SuCreditPosition^

Integer

Credit Position
    In Cell Searching values in table CreditPosition

SuStatus^

Integer

Account Status
    In Cell Searching values in table StatusCode

SuDonFund^

Text 9

Donation Fund Number
    In Cell Searching values in table CharityCode

Credit Control - Restrictions:

SuApplyCharges

Yes/No-

Can Charge Credit

SuTermsAgreed

Yes/No-

Terms Agreed Flag

SuHoldMail

Yes/No-

Restrict Mail

SuOnHold

Yes/No-

Account On Hold

Credit Control - Credit Review:

cuDateOpened

Date

Date Account Opened

SuLastCreditReview

Date

Date Last Credit Review

SuNextCreditReview

Date

Date Next Credit Review

SuApplicationDate

Yes/No-

Date Credit Applied For

SuCreditAppRecived

Date

Date Credit Application Recieved

SuMemo

Memo

Customer Notes

Bank:

SuBankName

Text 60

Bank Name

SuBankAdd1

Text 60

Bank Address Line 1

SuBankAdd2

Text 60

Bank Address Line 2

SuBankAdd3

Text 60

Bank Address Line 3

SuBankAdd4

Text 60

Bank Address Line 4

SuBankPostcode^

Text 60

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

SuBankAccName

Text 60

Bank Account Name

SuBankSort

Text 10

Bank Sort Code

SuBankNumber

Text 60

Bank Account Number

Payment Details.:

SuBacRef

Text 60

Reference for BACS Transfer

SuBankIBAN

Text 60

Bank IBAN Number

SuBankSwift

Text 60

Bank BIC/Swift

SuBankRollNo

Text 60

Bank Roll Number

SuBankAddRef1

Text 60

Bank Additional Ref 1

SuBankAddRef2

Text 60

Bank Additional Ref 2

SuBankAddRef3

Text 60

Bank Additional Ref 3

SuPaymentMethod^

Text 2

Payment Type. If BACS then sets CuOnlineReceipts=YES, otherwise need to set manually
    Sage V21 2015 onwards
        In Cell Searching values:Payment Method
                  0, None
                  1, BACS/SEPA
                  2, Cash
                  3, Cheque
                  4, Credit Card
                  5, DD/SO
                  6, Other
                  7, User1
                  8, User2
                  9, User3
                  10, User4
                  11, User5

SuOnlineReceipts

Yes/No-

BACS Online Receipts Flag. If CuPaymentMethod=BACS set otherwise needs setting manually

Payment Details:

SuManager

Text 60

Name of Account Manager

Building Society:

SuBankBuildSocRef

Text 60

Reference for Building Society Transfer

SuBankUseBuildingSoc

Yes/No-

Account uses Building Society

Credit Card:

SuCreditAppRecieved

Yes/No-

True if Credit Application Received

SuCCNumber

Text 30

Credit Card Number

Donor:

SuDonorDecFrom

Date

Donor Declaration Valid From

SuDonorForname

Text 35

Donor Forename
    Sage V20 2014 onwards

SuDonorSurname

Text 35

Donor Surname
    Sage V20 2014 onwards

SuDonorTitle

Text 4

Donor Title
    Sage V20 2014 onwards

SuGiftAid

Yes/No-

Gift Aid is enabled

Membership:

SuMemberReminderDays

Integer

Member Reminder Date (days)

SuMemberReminderDate

Date

Member Renewal Date

SuMemberSince

Date

Member Since

Other:

SuSalesRep

Text 60

Name of Sales Representative

SuEcCode

Text 3

EC Member Code


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

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.