Sage Business Cloud Accounting Contact Payment XML
Tasks
- Export Contact Payments from Sage Business Cloud Accounting
- Import Contact Payments to Sage Business Cloud Accounting
XML
Any Sage Business Cloud Accounting fields not documented below are not supported with our import.
A complete example of the XML is shown below. This represents the minimum information required to create a contact payment record in Sage Business Cloud Accounting:
<?xml version="1.0" encoding="utf-8"?>
<sage_one_company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<contact_payments>
<contact_payment>
<transaction_type>
<id>CUSTOMER_RECEIPT</id>
</transaction_type>
<contact>
<reference>ZYNK0001</reference>
</contact>
<bank_account>
<displayed_as>Bank Account (1200)</displayed_as>
</bank_account>
<total_amount>6.00</total_amount>
</contact_payment>
</contact_payments>
</sage_one_company>
Contact Payment Identification
The following fields are use to identify the contact payment to create/update. If neither are provided, a new contact payment will always be created.
Sage Field | XML Field | Example | Field Type | Input | Notes |
---|---|---|---|---|---|
- | id | be4eca91e41411e7aa730a57719b2edb | GUID | Optional | Sage's unique contact payment ID. |
- | external_id | receipt-12345 | string | Optional | The ID of this record from the source data. Will be stored in Zynk's truth table. |
<?xml version="1.0" encoding="utf-8"?>
<sage_one_company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<contact_payments>
<contact_payment>
<id>be4eca91e41411e7aa730a57719b2edb</id>
<external_id>receipt-12345</external_id>
</contact_payment>
</contact_payments>
</sage_one_company>
Customer/Supplier Selection
Each contact payment must be assigned to an existing customer or supplier in Sage (depending on the transaction type of the contact payment). At least one of following fields must be provided to identify the contact to assign the payment to. If more than one is provided, Zynk will look for a match based on each field in turn, in the order they are listed below.
Sage Field | XML Field | Example | Field Type | Input | Notes |
---|---|---|---|---|---|
Reference | contact/reference | ZYNK0001 | string | Optional | |
- | contact/id | 8a9b4b1f174c11e691e20a5d7cf84c3e | GUID | Optional | Sage's unique customer ID. |
- | contact/external_id | 1234567 | string | Optional | The ID of the customer from the source data. Will only work if the customer was imported into Sage via Zynk, and the same external_id was provided. |
Company / Name | contact/name | Zynk Software | string | Optional | |
Main Contact > Email | contact/email | [email protected] | string | Optional |
<?xml version="1.0" encoding="utf-8"?>
<sage_one_company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<contact_payments>
<contact_payment>
<contact>
<reference>ZYNK0001</reference>
<id>8a9b4b1f174c11e691e20a5d7cf84c3e</id>
<external_id>1234567</external_id>
<name>Zynk Software</name>
<email>[email protected]</email>
</contact>
</contact_payment>
</contact_payments>
</sage_one_company>
Contact Payment Details
The information below is in relation to the main contact payment details.
Sage Field | XML Field | Example | Field Type | Input | Notes |
---|---|---|---|---|---|
- | transaction_type/id | CUSTOMER_RECEIPT | string | Required | Valid values: CUSTOMER_RECEIPT, CUSTOMER_REFUND, VENDOR_PAYMENT, VENDOR_REFUND |
Payment Method | payment_method/id | CREDIT_DEBIT | string | Dependant | Either the payment method ID or display name must be specified |
Payment Method | payment_method/displayed_as | Credit/Debit Card | string | Dependant | Either the payment method ID or display name must be specified |
Bank Account | bank_account/id | 565541926ee74ad3948d339765fb496b | string | Dependant | Either the bank account ID, display name or nominal code must be specified |
Bank Account | bank_account/displayed_as | Bank Account (1200) | string | Dependant | Either the bank account ID, display name or nominal code must be specified |
Bank Account | bank_account/nominal_code | 1200 | string | Dependant | Either the bank account ID, display name or nominal code must be specified |
Date | date | 2021-10-06 | Date | Optional | Will be set to today's date if not specified |
Reference | reference | TXN123456 | string | Optional | |
Amount | total_amount | 6.00 | double | Required | |
- | currency/id | GBP | string | Optional | Will default to the contact's currency if not specified |
<?xml version="1.0" encoding="utf-8"?>
<sage_one_company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<contact_payments>
<contact_payment>
<transaction_type>
<id>CUSTOMER_RECEIPT</id>
</transaction_type>
<payment_method>
<id>CREDIT_DEBIT</id>
<displayed_as>Credit/Debit Card</displayed_as>
</payment_method>
<bank_account>
<id>565541926ee74ad3948d339765fb496b</id>
<displayed_as>Bank Account (1200)</displayed_as>
<nominal_code>1200</nominal_code>
</bank_account>
<date>2021-10-06</date>
<reference>TXN123456</reference>
<total_amount>6.00</total_amount>
<currency>
<id>GBP</id>
</currency>
</contact_payment>
</contact_payments>
</sage_one_company>
Allocation
The information below is in relation to allocating the contact payment to sales invoice(s) or purchase invoice(s). The type of invoice to allocate the payment to will depend on the transaction type. Customer receipts would be allocated to sales invoices, whereas vendor payments would be allocated to purchase invoices.
Sage Field | XML Field | Example | Field Type | Input | Notes |
---|---|---|---|---|---|
- | artefact/sales_invoice/id | 668189cba5074fafbdd585c03a79fa30 | string | Dependant | Either the sales invoice ID, invoice number or reference must be provided |
- | artefact/sales_invoice/invoice_number | SI-2 | string | Dependant | Either the sales invoice ID, invoice number or reference must be provided |
- | artefact/sales_invoice/reference | SI-2 | string | Dependant | Either the sales invoice ID, invoice number or reference must be provided |
- | artefact/purchase_invoice/id | 668189cba5074fafbdd585c03a79fa30 | string | Dependant | Either the purchase invoice ID, invoice number or reference must be provided |
- | artefact/purchase_invoice/invoice_number | PI-2 | string | Dependant | Either the purchase invoice ID, invoice number or reference must be provided |
- | artefact/purchase_invoice/reference | PI-2 | string | Dependant | Either the purchase invoice ID, invoice number or reference must be provided |
Amount | amount | 6.00 | double | Required | The amount to allocate to the sales/purchase invoice specified |
Discount | discount | 0.00 | double | Optional |
<?xml version="1.0" encoding="utf-8"?>
<sage_one_company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<contact_payments>
<contact_payment>
<allocated_artefacts>
<!-- Sales invoice allocation -->
<allocated_artefact>
<artefact>
<sales_invoice>
<id>668189cba5074fafbdd585c03a79fa30</id>
<invoice_number>SI-2</invoice_number>
<reference>SI-2</reference>
</sales_invoice>
</artefact>
<amount>6.00</amount>
<discount>0.00</discount>
</allocated_artefact>
<!-- Purchase invoice allocation -->
<allocated_artefact>
<artefact>
<purchase_invoice>
<id>668189cba5074fafbdd585c03a79fa30</id>
<invoice_number>PI-2</invoice_number>
<reference>PI-2</reference>
</purchase_invoice>
</artefact>
<amount>6.00</amount>
<discount>0.00</discount>
</allocated_artefact>
</allocated_artefacts>
</contact_payment>
</contact_payments>
</sage_one_company>