Skip to content

Xero Accounting Integration

Xero Logo

The Xero Accounting Integration module in Mythradon enables seamless data synchronisation between Mythradon and your Xero account. This integration supports one-way data flow for the following record types:

  • Contacts / Accounts
  • Invoices / Line Items
  • Payments
  • Credit Notes

Each record type is mastered in either Mythradon or Xero—not both. Data flows in one direction only, as detailed below.

Info

The Mythradon Xero Accounting Integration app is an optional add-on and requires a separate license. Once licensed, Mythradon will install the Xero Accounting Integration app in your environment.


Contact Handling in Xero

Unlike traditional CRM systems that distinguish between Accounts (organisations) and Contacts (individual people), Xero uses a single "Contact" entity to represent both customers and suppliers. This unified model means that a contact in Xero can act as a customer, a supplier, or both, depending on the transactions associated with it.

When integrating with Xero via Mythradon, this distinction is important to understand:

  • Customer and supplier roles are inferred from the presence of invoices or bills linked to a contact.
  • There is no structural separation between organisations and individuals-Xero treats both under the same "Contact" record.

As a result, Mythradon maps your CRM's Accounts and Contacts into Xero's flat contact structure, preserving necessary details while ensuring consistency in financial transactions.

This design choice in Xero simplifies accounting workflows but differs significantly from how data is typically modeled in CRM platforms. Your Mythradon integration takes care of these differences behind the scenes so you can work seamlessly across systems.


Synchronisation Rules

  • Contacts and Accounts: These records are mastered in Mythradon. Any changes made in Xero will be overwritten during the next sync from Mythradon. Xero should not be used to update these records.

  • Invoices, Line Items, Payments: Can be pushed from Mythradon to Xero, or pulled from Xero into Mythradon, depending on your configuration. However, each record type can only be synced in one direction.

  • Credit Notes: Credit Notes created in Xero will only be imported into Mythradon if they are applied as payments against an invoice that is already being imported from Xero.

Refunds

Refunds created in Mythradon are never sent to Xero. These must be manually managed in Xero.

Credit Notes

Credit Notes are only imported from Xero if they are applied as a payment to an invoice being synchronised from Xero.

Deletions

Deleting records in either Mythradon or Xero will not trigger a deletion in the other system. Deletions are not synchronised.

Info

The Mythradon Xero Accounting Integration app is available as a separate add-on and requires a separate license. Once licensed, Mythradon will install the Xero Accounting Integration app in your environment.


Setting Up Xero Account Integration

To enable the Xero Accounting Integration with Mythradon, you'll first need to create a connected application within your Xero Developer Account.

Step 1: Create a Xero App

  1. Log in to your Xero Developer portal at Xero Developer Account.
  2. Click "New App" to begin the setup process.

New Xero Application

Step 2: Complete App Details

Fill in the required fields as follows:

Field Description
App Name A name of your choice to identify the integration (e.g., Mythradon Integration)
Integration Type Select Web app
Company URL Enter your company or organisation's website URL
Redirect URI Enter your Mythradon OAuth callback URL: https://MY-DOMAIN/oauth-callback.php. Replace MY-DOMAIN with the actual domain of your Mythradon environment.

Once all fields are complete, and you have read and agreed to the Xero Developer Platform Terms and Conditions click Create App.

Step 3: Configure Your App Credentials

  1. In the Xero Developer portal, navigate to the Configuration section of your newly created app.

Xero App Connection Keys

  1. Click Generate a secret to create your Client Secret.
  2. Copy both the Client ID and Client Secret, and store them in a secure location. These credentials will be required when configuring the Xero integration within Mythradon.
  3. Click Save to complete the app configuration.

Note

You will need to enter both the Client ID and Client Secret into the Xero Account Application Settings in Mythradon.
⚠️ The Client Secret is shown only once-if you lose it, you will need to regenerate it in the Xero Developer portal.

If you are only sending data from Mythradon to Xero, no further configuration is needed in the Xero Developer portal.

However, if you also want to receive data from Xero into Mythradon (such as Contacts or Invoices):

  1. Navigate to the Webhooks section of your Xero app.

Xero App Webhook Key

  1. Enable the relevant webhook event types - typically Contacts and/or Invoices, depending on your sync requirements.
  2. Set the Delivery URL to: https://MY-DOMAIN/api/v1/XeroWebhookMyth/receive. Replace MY-DOMAIN with the domain of your Mythradon environment.
  3. Copy the Webhook Key and store it securely. This key will be used in the Xero integration settings in Mythradon.

Attention

DO NOT click the Send 'Intent to receive' button yet. The webhook must first be configured within Mythradon. Once that is complete, you can return here and send the intent.

Step 4: Configure Xero Integration in Mythradon

  1. In Mythradon - go to Administration → Integrations | Xero from the Menu Button.
  2. Check the Enabled box to display the Xero Accounting Integration Settings.

Xero Integration Setting - Light Xero Integration Setting - Dark

  1. Enter the Client Id and Client Secret from Xero into the corresponding fields.
  2. If you configured webhooks in Xero, enter the Webhook Key into the appropriate field.
  3. Review and configure the remaining settings according to your organisation's integration needs.
  4. Click Save to apply the settings.

Xero Account Integration Properties

Property Description
Enabled Enables the Xero integration module in Mythradon.
Client ID Xero app Client ID (from your Xero app).
Client Secret Xero app Client Secret (from your Xero app).
Contact and Accounts Controls how Contact and Account records are synchronised. Options include:
  • Don't Sync Contacts/Accounts
  • Sync All Contacts/Accounts from Mythradon to Xero
  • Sync Contacts/Accounts from Mythradon to Xero on Invoice Sync
  • Sync All Contacts/Accounts from Xero to Mythradon
Do not Sync Contact Email Prevents the contact email address from being synced.
Do not Sync Contact Phone Prevents the contact phone number from being synced.
Do not Sync Contact Address Prevents the contact address from being synced.
Xero Inbound Contacts are Accounts When Condition under which incoming Xero contacts should be treated as Accounts in Mythradon. Options include:
  • Account or Tax Number is Set
  • Account Number is Set
  • Tax Number is Set
Receivable Invoices Options for handling invoices being received from Xero. Options include:
  • Don't Sync Receivable Invoices
  • Sync All Receivable Invoices from Mythradon to Xero
  • All Receivable Invoices from Xero to Mythradon
Xero Inbound Client Invoices Assigned to Username Specifies the username to assign to client invoices pulled from Xero.
Xero Webhooks Key The webhook key copied from your Xero app.
Log API Request and Responses for Debugging Enables logging of Xero API communication for troubleshooting.
Email to Send Error Alerts to Address to receive error notifications from the integration module.

Important

If the user specified in the Xero Inbound Client Invoices Assigned to Username setting leaves your organisation or is deactivated, you must update this setting to assign inbound invoices to an active user. Failure to update this field may result in errors or unassigned invoice records during Xero synchronisation.

Step 5: Connect Mythradon to Xero

Once the Client Id and Client Secret have been entered. A Connect button is diplayed in the side panel.

Click the Connect button to establish the connection from Mythradon to Xero.

Xero Integration Setting Connect - Light Xero Integration Setting Connect - Dark

Once connected successfully the status of the connection will change to Connected.

If you have setup webhooks go back to Xero and click the Send 'Intent to receive' button.


Sync Bank Accounts from Xero

Bank accounts are mastered in Xero and can be imported into Mythradon using the Xero Accounting Integration. Any additions or changes to bank accounts must be made in Xero, not in Mythradon.

Once changes are made in Xero, follow these steps to sync the latest bank account data:

Pre-requisite

Ensure your Xero Accounting integration is fully connected and authorized before proceeding.

How to Sync Bank Accounts

  1. In Mythradon, navigate to: Administration → Integrations → Xero from the Menu Button.

  2. In the right-side panel, click: Get/Update Bank Accounts From Xero

This action will pull in the latest list of bank accounts from Xero and update the corresponding records in Mythradon.

Tip

Only active bank accounts in Xero will be retrieved. Make sure the accounts you want to sync are not archived or marked inactive in Xero.


Job Schedule

Data synchronisation between Mythradon and Xero occurs automatically once every hour.

Refer to the Scheduled Job - Sync with Xero for details on the CRON schedule.

Synchronisation Limits

  • Up to 200 records can be sent to Xero during each sync cycle.
  • Up to 20 records can be retrieved from Xero during each sync cycle.

These limits help maintain performance and API stability. If your integration requires higher volumes, the limits can be adjusted by the Mythradon support team upon request.


Fields Added by Xero Accounting Integration

The installation of the Xero Accounting Integration module introduces additional fields to various entities (Account, Contact, Invoice, etc.). These fields are not added to the user interface by default but can be manually included if required.

Entity Field Name UI Visibility Purpose / Notes
Account doNotSendToXero Not added by default Use to exclude specific Accounts from being sent to Xero.
taxNumberMyth Added in Mythradon Base Standard base field for storing tax number.
referenceNumberMyth Added in Mythradon Base Standard base field for storing reference numbers.
Contact doNotSendToXero Not added by default Use to exclude specific Contacts from being sent to Xero.
referenceNumberMyth Added in Mythradon Base Standard base field for storing reference numbers.
Invoice doNotSendToXero Not added by default Use to exclude specific Sales Invoices from being sent to Xero.
xeroExternalReference Not added by default Overrides default invoice number in Xero. Must be unique to avoid overwriting existing records in Xero. Cannot be indexed uniquely due to conflict with duplication functionality.
Line Item xeroAccountCode (foreign key) Used internally only Used for mapping line items to Xero accounts.
Tax Class xeroAccountCode Not required by default Used to map line items (via tax class) to Xero account codes. Defaults to 200 if not set. Strongly recommended to keep consistent once configured.
Payment xeroBankAccountXeroId (foreign) Used internally only Internal reference for Xero bank accounts.
xeroBankAccount Not added by default Used to map payments to a Xero bank account. Add manually to UI if needed.


Tax Classes and Xero Integration

When sending invoices from Mythradon to Xero, each Tax Class must have an Account Code specified. This field is an enumeration (enum) and, by default, contains only the value 200, which corresponds to Xero's default revenue account.

To ensure proper mapping of line items to the correct account in Xero:

  • Update the Account Code enum values to reflect the specific account codes used in your Xero chart of accounts.
  • Assign the appropriate Account Code to each Tax Class used in Mythradon.

Tax Class Accoun Codes

If a Tax Class does not have an Account Code set, Xero will default to using 200, which may result in incorrect account allocations. It is strongly recommended to configure this field correctly and avoid changing it after it has been applied to existing data.


Contacts and Accounts

In Xero, all customer and supplier records are stored as Contacts. Mythradon, however, distinguishes between Contacts and Accounts.

The Xero Accounting Integration provides flexible configuration options to control how Mythradon synchronises Contact and Account data with Xero.

Synchronisation Settings

Use the following properties in the Xero Accounting Integration settings to manage what data is included when syncing Contacts/Accounts to Xero:

Setting Description
Do not Sync Contact Email Excludes the email address from being synced to Xero. Useful for privacy or partial sync scenarios.
Do not Sync Contact Phone Prevents the contact's phone number from being sent to Xero.
Do not Sync Contact Address Prevents the contact's address from being included in the sync.

These options can help you control data visibility and reduce unnecessary updates in Xero, especially when managing large or sensitive datasets.


Mythradon to Xero: Contact and Account Sync

When synchronising data from Mythradon to Xero, fields from both Contacts and Accounts in Mythradon are mapped to Xero's unified Contact record format. Below are the important details about how data is handled and which values are transferred.

Phone, Email, and Address Handling

  • Phone Number: Mythradon's Primary Phone Number is sent to Xero as a phone record of type DEFAULT. Only the main phone number is transferred. Area and country codes are not included, as Mythradon does not currently capture this information.

  • Email Address: The Primary Email in Mythradon is sent to Xero.

  • Address: The Contact Address or Account Billing Address in Mythradon is mapped to a Xero address record of type POBOX. This ensures a consistent structure for address fields in Xero.

Opt-Out Flags

Both Account and Contact entities in Mythradon include a Do Not Send to Xero flag to exclude specific records from being synchronised.

  • Account.doNotSendToXero
  • Contact.doNotSendToXero

These fields can be used to exclude specific records from being synced with Xero. They are not added to the UI by default, but can be made visible if needed.


Contact Field Mapping

The following table outlines how fields in Mythradon map to the corresponding Xero API fields when syncing:

Mythradon Field Xero API Field Description / Notes
Contact.id ContactNumber Used as a unique identifier in Xero.
Contact.referenceNumberMyth AccountNumber Maps to Xero's Account Number field.
Contact.name Name Full display name in Xero.
Contact.firstName FirstName First name field.
Contact.lastName LastName Last name field.
Contact.phoneNumber (Primary) PhoneNumber (Type: DEFAULT) Area and country codes are not populated.
Contact.emailAddress (Primary) EmailAddress Email used in Xero communications.
Contact.addressStreet AddressLine1 (Type: POBOX) Street line of the contact or billing address.
Contact.addressCity City (Type: POBOX) City portion of the address.
Contact.addressState Region (Type: POBOX) State or province.
Contact.addressCountry Country (Type: POBOX) Country name.
Contact.addressPostalCode PostalCode (Type: POBOX) ZIP or postal code.

Account Field Mapping

Mythradon Field Xero API Field Description / Notes
Account.id ContactNumber Unique identifier in Xero.
Account.referenceNumberMyth AccountNumber Xero account number.
Account.name Name Full display name.
Account.taxNumberMyth TaxNumber Tax number associated with the account.
Account.phoneNumber (Primary) PhoneNumber (Type: DEFAULT) Area and country codes not included.
Account.emailAddress (Primary) EmailAddress Primary email address.
Account.billingAddressStreet AddressLine1 (Type: POBOX) Billing street address.
Account.billingAddressCity City (Type: POBOX) City portion of the billing address.
Account.billingAddressState Region (Type: POBOX) State or province.
Account.billingAddressCountry Country (Type: POBOX) Country name.
Account.billingAddressPostalCode PostalCode (Type: POBOX) Postal or ZIP code.


Xero to Mythradon

When Xero sends a Contact to Mythradon for the first time, it is classified as either an Account or a Contact in Mythradon. Once assigned, this classification remains fixed—regardless of any changes made to the record in Xero afterward.

The logic that determines whether a Xero Contact becomes an Account or Contact is defined by a configurable setting in the Xero Accounting Integration.

Inbound Contact Classification Setting

Setting Description
Xero Inbound Contacts are Accounts When Determines when an inbound Xero Contact should be created as an Account in Mythradon. Options:
  • Account or Tax Number is Set
  • Account Number is Set
  • Tax Number is Set

General Field Handling

  • Phone Numbers: Only phone numbers of type DEFAULT are read from Xero and mapped to the Primary Phone Number in Mythradon. Format: PhoneCountryCode + PhoneAreaCode + PhoneNumber

  • Email Address: The email address from Xero is mapped to the Primary Email Address field in Mythradon.

  • Address: The POBOX-type address from Xero is used to populate address fields in Mythradon for both Contacts and Accounts.

Note

Xero supports multiple address lines, but only AddressLine1 is used. The value is truncated at 255 characters. Postal codes are limited to 40 characters.


Name Parsing Logic

If First Name and Last Name are not explicitly set in the Xero record, Mythradon will attempt to infer them from the Name field:

  • Common titles (e.g., Mr, Mrs, Ms, Dr) are stripped.
  • The remaining value is split by spaces.

  • The first word becomes the First Name.

  • The second word becomes the Last Name.

Contact Field Mapping

Mythradon Field Xero API Field Description / Notes
Contact.referenceNumberMyth AccountNumber Used to match unique contacts.
Contact.firstName FirstName Parsed from Name if not explicitly provided.
Contact.lastName LastName Parsed from Name if not explicitly provided.
Contact.name Name Used for full name and fallback parsing.
Contact.phoneNumber (Primary) Phone (Type: DEFAULT) Combined country/area/number, no formatting.
Contact.emailAddress EmailAddress Primary email.
Contact.addressStreet AddressLine1 (POBOX) Additional lines in Xero are ignored. Max length: 255 chars.
Contact.addressCity City (POBOX)
Contact.addressState Region (POBOX)
Contact.addressCountry Country (POBOX)
Contact.addressPostalCode PostalCode (POBOX) Max length: 40 chars.

Account Field Mapping

Mythradon Field Xero API Field Description / Notes
Account.referenceNumberMyth AccountNumber Used to map or identify the account in Xero.
Account.name Name Full name of the account.
Account.taxNumberMyth TaxNumber Tax number field from the Xero contact.
Account.phoneNumber (Primary) Phone (Type: DEFAULT) Same logic as for contacts.
Account.emailAddress EmailAddress Email address for the account.
Account.billingAddressStreet AddressLine1 (POBOX) Max 255 characters.
Account.billingAddressCity City (POBOX)
Account.billingAddressState Region (POBOX)
Account.billingAddressCountry Country (POBOX)
Account.billingAddressPostalCode PostalCode (POBOX) Max 40 characters.


Invoices

Mythradon to Xero

Sales Invoices created in Mythradon can be automatically synced to Xero, subject to specific conditions and integration rules.

Sync Control

  • Each invoice includes a hidden flag: Do Not Send To Xero. This prevents the invoice from being sent to Xero and is not visible on the UI by default.

Important Sync Conditions

⚠️ The following conditions must be met for an invoice to be successfully sent from Mythradon to Xero:

Condition Effect
Invoice is a Draft 🚫 Not sent to Xero.
Billing Contact or Account not set 🚫 Invoice will not sync.
Billing Contact or Account not in Xero 🚫 Invoice will not sync.
Invoice has no line items 🚫 Invoice will not sync.
Invoice type is not a Sales Invoice 🚫 Mythradon only supports Sales Invoices (Accounts Receivable).

Invoice Field Mapping

Mythradon Field Xero API Field Description / Notes
Invoice.status Status Cancelled maps to VOIDED; all others map to AUTHORISED.
Invoice.xeroExternalReference (if set)
otherwise Invoice.name
InvoiceNumber If xeroExternalReference is populated, it overrides the invoice name.
Invoice.id Reference Used as an internal reference in Xero.
Invoice.invoiceDate Date Date of the invoice.
Invoice.dueDate DueDate Payment due date.
Invoice.totalCurrency CurrencyCode 3-letter ISO currency code.
Invoice.accountId (if set)
otherwise Invoice.contactId
Contact.ContactID Links the invoice to the appropriate contact or account in Xero.
Invoice.taxType LineAmountTypes If taxType is "Tax Free", maps to NoTax; otherwise, Exclusive.

Line Item Mapping

Mythradon Field Xero API Field Description / Notes
LineItem.customItem LineItems.Description Line description.
LineItem.qty LineItems.Quantity Quantity of items.
LineItem.xeroAccountCode
(from related TaxClassMyth.xeroAccountCode)
LineItems.AccountCode Used to categorize the item in Xero.
LineItem.listPrice LineItems.UnitAmount Unit price for the item.
LineItem.listPrice * LineItem.qty LineItems.LineAmount Total before discounts or tax.
LineItem.discount LineItems.DiscountAmount Applied discount, in currency value.


Xero to Mythradon

Sales invoices from Xero (of type ACCREC) can be imported into Mythradon, with important considerations and limitations outlined below.

Unsupported Invoice Types and Conditions

Condition Result
Xero invoice status is DRAFT or SUBMITTED Invoice will not be imported into Mythradon.
Invoice type is ACCPAY Not supported. Only ACCREC invoices (Sales) are supported.
Invoice is VOIDED or DELETED on first import Will be ignored.
Invoice is VOIDED or DELETED after being synced Will be updated in Mythradon with status Cancelled.
Prepayments and Overpayments Not processed.
Line items with tax rate different from related account Will cause sync error. Tax mismatch is not supported.
Line item is 100% discounted GL Account not provided by Xero API. Defaults to Tax Class mapped to Account Code 200.
More than 1,000 active Tax Classes Sync will fail. You must reduce the number of active Tax Classes to below 1,000.

Sync Behaviour Notes

  • Contact Mapping: Xero only supports a single contact on an invoice.

  • If both a billing Contact and Account are set in Mythradon, only the Account will be used as the Xero Contact.

  • If Sync Contact Only is enabled, the contact will not be sent, unless linked directly to the invoice in Xero.

  • Discount Handling: Discounts in Xero are applied to the full line item total. In Mythradon, discounts are applied per item, which may cause rounding issues. To avoid this:

  • Line items with quantity > 1 and discounts will be split into multiple line items with qty = 1.

  • The item description will be updated to reflect the quantity, e.g., "6x Widget".

  • Line Items:

  • All line items will be imported as custom line items.

  • Each line item must successfully match a Tax Class via the AccountCode from Xero.
  • If a match cannot be made, the invoice will fail and the import will roll back.

Invoice Field Mapping

Xero API Field Mythradon Field Notes
CurrencyCode Invoice.totalCurrency 3-letter ISO currency code.
DateString Invoice.invoiceDate Invoice date.
DueDateString Invoice.dueDate Due date for payment.
InvoiceNumber Invoice.xeroExternalReference Used as the invoice number in Mythradon.
Xero Contact Invoice.contactId Used if linked contact is a Mythradon Contact.
Xero Contact Invoice.accountId Used if linked contact is a Mythradon Account.

Line Item Mapping

Xero API Field Mythradon Field Description / Notes
- LineItems.recordType Set to Custom for all line items.
AccountCode LineItems.taxClassMythId Looked up by matching Xero's Account Code to a Tax Class. Required.
UnitAmount LineItems.itemPrice Adjusted based on discount logic.
Quantity LineItems.qty Total quantity for the line item.
First 80 chars of Description LineItems.customItem If discount is applied, text updated to reflect quantity (e.g. "3x Widget").
DiscountAmount Used to calculate itemPrice adjustments if applicable.

Payments

Payments are synchronised as part of an invoice when Xero is the master system. This means any payments associated with invoices in Xero will be automatically imported into Mythradon during the invoice sync process.

Important

  • Default Payment Method: The Method field in Mythradon will default to the system-defined value for new payments, as Xero does not specify a payment method.

  • Deletion Not Supported: If a payment is removed in Xero, it will not be automatically removed from Mythradon. Manual cleanup is required if payments are deleted in Xero.


Payment Field Mapping
Xero API Field Mythradon Field Description / Notes
Payments.Date Payment.paidAt The date the payment was made. Xero does not include a time component; set to 00:00 UTC.
CurrencyCode Payment.amountPaidCurrency Must match the currency of the related invoice.
Payments.Amount Payment.amountPaid The payment amount as recorded in Xero.

Credit Notes

Credit Notes are synchronised as part of the invoice when Xero is the master system. This means credit notes applied to invoices in Xero will be automatically imported into Mythradon as payments during the invoice sync.

Important

  • Default Payment Method: Since Xero does not provide a payment method for credit notes, the Method field in Mythradon will default to the system-defined payment method.

  • Deletion Not Supported: If a credit note is removed or deleted in Xero, it will not be automatically removed from Mythradon. Manual intervention is required to maintain data consistency.


Credit Note Field Mapping
Xero API Field Mythradon Field Description / Notes
CreditNotes.Date Payment.paidAt The date the credit note was applied. Xero does not provide a time component; set to 00:00 UTC.
CurrencyCode Payment.amountPaidCurrency Must match the currency of the associated invoice.
CreditNotes.Amount Payment.amountPaid The credited amount, treated as a payment in Mythradon.

Note

Credit Notes are a critical part of financial reconciliation. Ensure all tax, account, and contact mappings are correctly configured to avoid sync errors.


Mythradon to Xero: Payments Sync

When payments are created in Mythradon and invoices are being sent to Xero, associated payment records can also be pushed to Xero. This ensures Xero remains up to date with the actual payment status of invoices managed in Mythradon.

Note

  • Only Processed Payments Are Sent: Payments are only sent to Xero when their status is set to Processed in Mythradon.

  • No Sync on Status Update: If a payment's status changes after being sent (e.g. from Draft to Processed or Processed to Cancelled), that change will not be reflected in Xero automatically.

  • Bank Account Required: The field Payment.xeroBankAccount is required for sending payments to Xero. It is used to map the payment to the correct Xero bank account.

  • This field is not shown in the UI by default and must be added manually if needed.

  • If your business primarily uses one bank account, you can set a default value for the field on payment creation to simplify data entry.

Payment Field Mapping

Mythradon Field Xero API Field Description / Notes
Payment.Invoice.xeroExternalReference Invoice.InvoiceID Matches the related invoice in Xero via the external reference number from Mythradon.
Payment.xeroBankAccountXeroId Account.AccountID The Xero identifier for the target bank account.
Payment.paidAt (date only) Date Date the payment was made (time component is not sent).
Payment.amountPaid Amount The monetary amount of the payment.
Payment.id Reference Unique identifier for the payment, sent to Xero as the reference.

Note

Ensure bank account mapping and payment statuses are correctly configured to avoid rejected or missing payment records in Xero.


Create Mappings Between Mythradon and Xero

If you already have existing records in either Xero or Mythradon, you'll need to manually create mappings between them. This ensures the integration updates the correct records rather than creating duplicates during sync.

Mappings are managed via the Xero Record Mapping entity (XeroMappingMyth) and act as a link between records in Mythradon and their corresponding records in Xero.

Example

You may have an existing Account in Mythradon and a corresponding Contact in Xero. By mapping their respective IDs, the integration will know to sync updates between them instead of treating them as separate new entries.


Xero Record Mapping Fields

Field in Mythradon Description / Notes
entityType Identifies the type of entity being mapped. Options include:
Contact
Account
Client Invoice
Supplier Invoice
Xero Payment
Xero Credit Payment
entityId The unique identifier (primary key) of the record in Mythradon. This links to the record specified in entityType.
xeroId The unique identifier (primary key) of the matching record in Xero. This is the Xero GUID or ID for the mapped entity.

When to Use Manual Mappings

You should manually create record mappings when:

  • You're integrating with existing data in both systems.
  • You want to ensure existing records are matched accurately.
  • You've migrated data from another platform into Mythradon or Xero.

Note

Proper mapping is essential for reliable synchronisation between Mythradon and Xero-preventing data duplication and ensuring updates flow seamlessly.


Xero Accounting App Roles

The Mythradon Xero Accounting application introduces two dedicated Roles to manage access to Xero-specific features within Mythradon.

These roles provide users with the appropriate permissions for syncing, managing, and viewing Xero-related data and actions.

Role Name Permissions & Access
Xero Administrator – System Managed Full access to Xero integration features within Mythradon. Can view and manage Xero bank accounts, record mappings, and the Xero processing queue.
Xero User – System Managed Read-only access to Xero bank accounts. Required for users who create payments or send invoices from Mythradon to Xero.

System Managed Roles

These roles are System Managed, meaning they are maintained by the system and will be overwritten during future updates to Mythradon or the Xero Accounting integration application.

If you need customised permissions:

  • You can assign these system roles directly to users.
  • Or duplicate a role and tailor it to your needs without risking future update conflicts.

These roles ensure secure and appropriate access control for staff working with the Xero integration, while also streamlining setup and compliance with integration requirements.


Error Handling

All data interactions between Mythradon and Xero-whether sending or retrieving records-are logged in the Xero Queue (XeroQueueMyth) entity. This queue helps track the status of each transaction and makes it easier to monitor and resolve integration issues.

How Errors Are Handled

  • If an error occurs while processing a record, its queue status will be updated to Error.
  • The description field on the queue record will contain detailed information about the issue.
  • You can manually retry a failed queue item by updating its status to Pending. It will then be reprocessed in the next scheduled job run.

Diagnostic Tools

  • Debug Logging: Enable debug mode in the integration settings to log detailed API payloads to LogMyth. This is useful for reviewing request and response data when troubleshooting complex issues.
  • Record ID Mapping: Use the XeroMappingMyth entity to look up corresponding record IDs between Xero and Mythradon. This is especially helpful when you know the record ID in one system but need to find it in the other.

Error Alerts

You can configure an alert email address in the integration settings. When a queue item encounters an error:

  • An email notification will be automatically sent to the configured address.
  • This helps ensure timely awareness and resolution of integration issues.

Note

By leveraging the queue system, logging tools, and error alerts, you can quickly identify, diagnose, and resolve any issues in the Xero integration workflow.


Setting Up a Xero Account for Testing

To test and validate the integration between Mythradon and Xero, you'll need to set up a Xero trial account specifically for testing purposes.

Follow the step-by-step instructions in the guide below to create a suitable Xero account and connect it to the Mythradon Xero Accounting Integration:

👉 Set Up a Xero Account for Testing

This guide covers:

  • Creating a Xero trial account
  • Enabling required permissions
  • Connecting the account to Mythradon
  • Best practices for testing invoice, payment, and contact sync

Important

Use a separate Xero organisation for testing to avoid syncing test data with your production environment.


See also