Xero tenant & contacts
Purpose
Section titled “Purpose”Complement Xero integration with data-model context: tenants, contacts, and application linkage.
Scope in codebase
Section titled “Scope in codebase”leekimerp/api/xero.py— OAuth, webhooks,sync_contact_with_tenant,create_contact,update_sync_statusleekimerp/tasks.py—update_new_xero_contact(commented inhooks.pyfor Applicationon_update)- DocTypes under
lee_kim_alliance_erp/doctype/matchingXero*(e.g. Xero Contact, Xero Tenants — verify exact names in repo)
flowchart LR APP[Application] -. optional .-> XC[Xero Contact] XT[Xero Tenant / settings] --> API[xero.py sync] API --> XERO[Xero Cloud]Entry points
Section titled “Entry points”- Whitelisted methods in
api/xero.py(see API inventory) - Webhook:
xero_webhook_connection
Dependencies
Section titled “Dependencies”- Stored OAuth tokens (
obtain_xero_oauth2_token,store_xero_oauth2_token) - ERPNext Customer, Item, Sales Invoice when syncing into native ERP flow
Configuration
Section titled “Configuration”- Per-tenant Xero credentials and webhook signing secret (
get_app_webhook_secret)
Operational notes
Section titled “Operational notes”update_new_xero_contacton Applicationon_updateis commented out inhooks.py— confirm with product before re-enabling.