XML eGateway Examples XML:
The following examples are included to show/test XML import. See XML eGateway Test Program
Create/Update account using external ID
- Example 0 Import a SOR
- Example 1 Create/Update Account using external ID, and then import SOR (Sales Order)
- Example 2 Create/Update Account using external ID, and then import SOR with long descriptions
- Example 3 Create/Update Account using external ID, and then import SOR with description pulled from Stock record in Exchequer
- Example 4 Create/Update Account using external ID, and then import SIN (sales invoice) with manual VAT
- Example 5 Create/Update Account using external ID, and then import SRI (sales invoice with payment) with manual VAT
- Example 6 Create/Update Account using external ID, and then import PPI (purchase invoice with payment) with manual VAT
- Example 7 Create/Update Account using external ID, and then import POR (purchase order)
Create/Update account using account code
Test all field mappings
- Example 20 Create account and then POR for all fields
- Example 21 Create JOB for all fields
- Example 22 Create Stock record for all fields
These files are simply for testing every mapped field for our internal testing, thus are not listed below.
Other types of transactions
Example 0 Import SOR (Sales Order)
![]() |
<?xml version="1.0" ?> <ExchequerData> <TransactionHeader> <thLocation>AAA</thLocation> <TransactionLine> <!-- This line specifies Stock code and Price and VAT --> <tlStockCode>ALARMSYS-DOM-1</tlStockCode> <tlQty>1</tlQty> <tlDescr>Alaram system</tlDescr> <tlNetValue>57.45</tlNetValue> <tlVATCode>Standard</tlVATCode> <!-- Standard is converted to S by conversion list --> <tlGLCode>52010</tlGLCode> </TransactionLine> <TransactionLine> <!-- All price, VAT will be automatically calculated --> <tlStockCode>CAMERA-BRACKET</tlStockCode> <tlQty>5</tlQty> <!-- Price has not been expressed so will use IRIS price --> </TransactionLine> <TransactionLine> <!-- Comment line --> <tlStockCode></tlStockCode> <tlQty>1</tlQty> <tlDescr>A comment line</tlDescr> <!-- Price has not been expressed so will use IRIS price --> </TransactionLine> </TransactionHeader> </ExchequerData>
|
more about Account entity
more about Transaction entity
Example 1 Create/Update Account using external ID, and then import SOR (Sales Order)
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post an SOR (Sales Order).
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 2 Create/Update Account using external ID, and then import SOR with long descriptions
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post an SOR with long descriptions which are word wrapped.
In this example the <tlDescr> has a very long description in it. This is word wrapped when importing into the transaction. "|" forces new lines.
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine> <tlLocation>AAA</tlLocation>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 3 Create/Update Account using external ID, and then import SOR with description pulled from Stock record in Exchequer
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post an SOR (Sales Order), using the stock description held in the stock record.
No <tlDescr> tag, makes XML eGateway, look up stock description. If 6 lines of description are defined then they are carried over to the transaction.
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine> <tlLocation>AAA</tlLocation>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 4 Create/Update Account using external ID, and then import SIN with manual VAT
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post an SIN (sales invoice) with manual VAT.
Manual VAT makes sure there are no rounding differences between the total in the external transaction and the transaction. If Manual VAT is used then the VAT must be stated correctly in the XML as it will by pass any validation by Exchequer.
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader> <TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 5 Create/Update Account using external ID, and then import SRI with manual VAT
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post an SRI (sales invoice with payment)with manual VAT.
Manual VAT makes sure there are no rounding differences between the total in the external transaction and the transaction. If Manual VAT is used then the VAT must be stated correctly in the XML as it will by pass any validation by Exchequer.
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 6 Create/Update Account using external ID, and then import PPI with manual VAT
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post a PPI (purchase invoice with payment).
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 7 Create/Update Account using external ID, and then import POR (purchase order)
Create or update account with "Alt Ref" = "TEST_Ref_ID", in company TEST01. Then post a POR.
Note the use of acMatchByExternalRef and thMatchByExternalRef = true, which instructs XML eGateway to lookup the account code based on the Account record, Alt Ref field.
If the account is new, then the account code for the account will be created automatically based on the acCompany field and the format as defined in the system settings. more info about account format
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 10 Create/Update Account using external ID, and then import SOR (Sales Order)
Create or update account TEST001, in company TEST01. Then post a SOR
![]() |
<?xml version="1.0" ?>
<ExchequerData> </Account>
<TransactionHeader>
<TransactionLine>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Account entity
more about Transaction entity
Example 40 TSH (timesheet)
Post a Timesheet into company TEST01
![]() |
<?xml version="1.0" ?>
<ExchequerData>
<TransactionLine>
<TransactionLine>
</ExchequerData> |
more about Transaction entity
Example 50 NOM (nominal journal)
Post a nominal journal into company TEST01
![]() |
<?xml version="1.0" ?>
<ExchequerData> <TransactionLine>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Transaction entity
Example 60 ADJ (stock adjustment)
Post a simple stock adjustment, into company TEST01
![]() |
<?xml version="1.0" ?>
<ExchequerData>
<TransactionLine>
<TransactionLine>
</TransactionHeader>
</ExchequerData> |
more about Transaction entity
Example 61 ADJ (stock adjustment) and build BOM
This example ticks the "Build" tick box on the ADJ line, to instruct Exchequer to build the BOM item.
![]() |
<ExchequerData>
<TransactionLine>
</TransactionHeader>
</ExchequerData>
|
more about Transaction entity