Menu

Customer Account

PostTrans XML API for Sage 50 - Customer 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) 

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

List of Examples

 

Example - 10 Simple Customer 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>
   
     <Customer>  
         <CuCode>TEST03</CuCode>
         <CuName>Comtek Accounts</CuName>
         <CuAdd1>Venture House</CuAdd1>
         <CuAdd2>Venture Court</CuAdd2>
         <CuAdd3>Bolness Rd.</CuAdd3>
         <CuAdd4>Wisbech</CuAdd4>
         <CuPostcode>PE13 2QL</CuPostcode>
         
         <CuContactName>Mr Sam Smith</CuContactName>     <!-- Contact can only be updated on creation -->
         <CuPhone>+44 945 463523</CuPhone>
         <Cue-mail1>ss@ss.com</Cue-mail1>
         
         <CuCreditLimit>1000</CuCreditLimit>
         <CuCurrency>1</CuCurrency>   <!-- 1,GBP,2,USD -->

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

         <cuDateOpened>2020-02-20</cuDateOpened>
         <CuTermsAgreed>True</CuTermsAgreed>
         
         <CuSettDays>30</CuSettDays>     <!-- 30 Days payment term -->
         <CuAnal1>Midlands</CuAnal1>
         <CuAnal2>CVR Coverings</CuAnal2>
         <CuAnal3>B</CuAnal3> 
     </Customer>
</sage50Data>

 

Results in new or updated Sage 50 Customer:

XML API Tags for Sage 50 Entity 'Customer'

Tag Name

Data Type

Description

Important Fields:

CuCode

Text 8

Account Reference

Account Details:

CuName

Text 60

Account Name

CuInactive

Yes/No-

Inactive Flag - yes/No
    Sage V21 2015 onwards

Registered Address:

CuAdd1

Text 60

Account Address Line 1

CuAdd2

Text 60

Account Address Line 2

CuAdd3

Text 60

Account Address Line 3

CuAdd4

Text 60

Account Address Line 4

CuPostcode^

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

CuCountryCode^

Text 2

Country Code.
    In Cell Searching values in table CountryCode

CuVATRegNo

Text 20

VAT Registration Number

Contact Information:

CuContactName

Text 30

Contact Name

CuTradeContact

Text 30

Name of Trade Contact

CuPhone

Text 30

Telephone Number

CuPhone2

Text 30

Second Telephone Number

CuFax

Text 30

Fax Number

CuWWW

Text 255

WWW Address

e-mail Settings:

Cue-mail1

Text 255

EMail Address

Cue-mail2

Text 255

EMail Address 2
    Sage V19 2013 onwards

Cue-mail3

Text 255

EMail Address 3
    Sage V19 2013 onwards

Cue-mail4

Text 255

e-mail4
    Sage V23 2017 onwards

Cue-mail5

Text 255

e-mail5
    Sage V23 2017 onwards

Cue-mail6

Text 255

e-mail6
    Sage V23 2017 onwards

CuSendInvEmail

Yes/No-

Send Invoices To This Account via Email

CuSendLettersEmail

Yes/No-

Send Letters To This Account via Email

Defaults - Custom Fields:

CuAnal1

Text 30

Analysis 1

CuAnal2

Text 30

Analysis 2

CuAnal3

Text 30

Analysis 3

CuAnal4

Text 30

Anal4
    Sage V23 2017 onwards

CuAnal5

Text 30

Anal5
    Sage V23 2017 onwards

CuAnal6

Text 30

Anal6
    Sage V23 2017 onwards

Defaults - Pricing and Discounting:

CuDiscRate

Double

Discount Rate %

CuDiscType^

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

CuPriceList^

Text 8

Price List Reference
    In Cell Searching values in table PriceListCode

Defaults - Misc Defaults:

CuNomCode^

Text 8

Default Nominal Code
    In Cell Searching values in table NomCode

CuOverideProductNom

Yes/No-

Override Product Nominal Code in Invoicing

CuTaxCode^

Integer

Default Tax Code
    In Cell Searching values in table TaxCode

CuOverideProductTax

Yes/No-

Override the products own Tax Code.

CuCurrency^

Integer

Currency
    In Cell Searching values in table CurrencyCode

CuDepartment^

Text 2

Department Number
    In Cell Searching values in table DeptCode

Credit Control - Terms:

CuCreditLimit

Currency

Credit Limit

CuSettDays

Integer

Settlement Due Days

CuSettDiscount

Double

Settlement Discount Rate

CuPaymentDueDays

Integer

Payment Due Days

CuAvgPayDays

Integer

Average Time To Pay

CuTermsTxt

Text 30

Terms

CuCreditRef

Text 60

Credit Bureau Reference

CuBureau^

Integer

Credit Bureau Used
    In Cell Searching values in table BureauCode

CuPriorityCust

Yes/No-

Priority Customer
    Sage V18 2012 onwards

CuCreditPosition^

Integer

Credit Position
    In Cell Searching values in table CreditPosition

CuStatus^

Integer

Account Status
    In Cell Searching values in table StatusCode

Credit Control - Restrictions:

CuApplyCharges

Yes/No-

Can Charge Credit

CuTermsAgreed

Yes/No-

Terms Agreed Flag

CuHoldMail

Yes/No-

Restrict Mail

CuOnHold

Yes/No-

Account On Hold

Credit Control - Credit Review:

cuDateOpened

Date

Date Account Opened

CuLastCreditReview

Date

Date Last Credit Review

CuNextCreditReview

Date

Date Next Credit Review

CuApplicationDate

Date

Date Credit Applied For

CuCreditAppRecived

Date

Date Credit Application Recieved

CuMemo

Memo

Customer Notes

Sales:

CuFirstINV

Date

First Invoice Date

CuLastInvDate

Date

Last Invoice Date

CuLastReceipt

Date

Last Payment Date

CuYTD

Currency

Turnover Year Date

CuLYTD

Currency

Prior YTD

Bank:

CuBankName

Text 60

Bank Name

CuBankAdd1

Text 60

Bank Address Line 1

CuBankAdd2

Text 60

Bank Address Line 2

CuBankAdd3

Text 60

Bank Address Line 3

CuBankAdd4

Text 60

Bank Address Line 4

CuBankPostcode^

Text 60

Bank Address 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

CuBankAccName

Text 60

Bank Account Name

CuBankSort

Text 10

Bank Sort Code

CuBankNumber

Text 60

Bank Account Number

Payment Details.:

CuBacRef

Text 60

Reference for BACS Transfer

CuBankIBAN

Text 60

Bank IBAN Number

CuBankSwift

Text 60

Bank BIC/Swift

CuBankRollNo

Text 60

Bank Roll Number

CuBankAddRef1

Text 60

Bank Additional Ref 1

CuBankAddRef2

Text 60

Bank Additional Ref 2

CuBankAddRef3

Text 60

Bank Additional Ref 3

CuPaymentMethod^

Text 2

Payment Type. If BACS then sets CuOnlineReceipts=YES, other wise 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

CuOnlineReceipts

Yes/No-

BACS Online Receipts Flag. If CuPaymentMethod=BACS set other wise needs setting manuyally

Payment Details:

CuManager

Text 60

Name of Account Manager

CuCompReg

Text 16

CompReg
    Sage V23 2017 onwards

CuType^

Integer

Account Type
        In Cell Searching values:Account Type
                  0, Normal

Building Society:

CuBankBuildSocRef

Text 60

Reference for Building Society Transfer

CuBankUseBuildingSoc

Yes/No-

Account uses Building Society

Credit Card:

CuCreditAppRecieved

Yes/No-

True if Credit Application Received

CuCCNumber

Text 30

Credit Card Number

Charity Donor:

CuDonTitle

Text 4

Charity Donor Title
    Sage V20 2014 onwards

CuDonForname

Text 35

Charity Donor Forename
    Sage V20 2014 onwards

CuDonSurname

Text 35

Charity Donor Surname
    Sage V20 2014 onwards

CuDonFund^

Integer

Charity Donation Fund Number
    In Cell Searching values in table CharityCode

CuDonGiftAid

Yes/No-

Charity Donor Gift Aid is enabled

CuDonDecFrom

Date

Donor Declaration Valid From

CuDonTyDonor

Yes/No-

Charity Donor Type Donor Flag
    Sage V18 2012 onwards

CuDonTyMember

Yes/No-

Charity Donor Type Member Flag
    Sage V18 2012 onwards

CuDonTyCust

Yes/No-

Charity Donor Type Customer Flag
    Sage V18 2012 onwards

Charity Membership Details:

CuDonMemberSince

Date

Member Since

CuDonReminderDate

Date

Member Renewal Date

CuDonReminderDays

Integer

Member Reminder Date (days)

Other:

CuSalesRep

Text 60

Name of Sales Representative

CuEcCode

Text 3

EC Member Code

CuDUNSno

Text 9

DUNS Number


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.