ERP Integration
Connect Lease102 to your accounting system to automatically post FRS 102 journal entries. Once configured, you can sync lease accounting journals directly from the Reports page.
Supported ERP Systems
Lease102 supports direct integration with the following accounting systems:
| System | Connection Type | Features |
|---|---|---|
| Xero | OAuth 2.0 | Manual Journals, Fixed Assets, Tracking Categories |
| Dynamics 365 Business Central | OAuth 2.0 (Azure AD) | General Journals, Dimensions, Fixed Assets |
| Sage 50 | Via Codat middleware | Nominal Journals, Departments, Fixed Assets |
| Sage 200 Standard | OAuth 2.0 | Nominal Journals, Analysis Types, Ledger Accounts |
How ERP Integration Works
The integration follows a four-step process:
Step 0: IT Setup (One-Time)
Your IT administrator must register Lease102 as an OAuth application with each ERP provider and configure the credentials in your Lease102 deployment. This is a one-time setup per ERP system. If you see 'Not Configured' on a system, this step is pending.
Step 1: Connect
Once IT has configured credentials, the Connect button becomes active. Click it to authorize Lease102 to access your ERP. You'll be redirected to the ERP's login page to grant permission via OAuth.
Step 2: Configure GL Mappings
After connecting, click 'GL Mappings' to map FRS 102 account types to your chart of accounts. This tells Lease102 which GL codes to use when posting journals.
Step 3: Sync Journals
Go to Reports → Journal Entry Export, select a date range, then click 'Sync to ERP'. Entries can be posted as draft (recommended) for review in your ERP before finalizing.
GL Account Mappings
You must map each FRS 102 account type to your chart of accounts before syncing. These mappings determine which GL codes appear in the posted journals.
Tracking Categories
| FRS 102 Account Type | Description | Typical Code |
|---|---|---|
| Right-of-Use Asset | Initial recognition of lease asset | 0030 (Fixed Assets) |
| Accumulated Depreciation - ROU | Contra account for ROU asset depreciation | 0031 |
| Lease Liability (Current) | Portion due within 12 months | 2109 (Creditors) |
| Lease Liability (Non-Current) | Portion due after 12 months | 2300 (Long-term Liabilities) |
| Depreciation Expense | ROU asset depreciation charge | 8004 (Admin Expenses) |
| Interest Expense | Lease liability interest charge (Finance Costs) | 7903 |
| Lease Clearing Account | For payment reconciliation (optional) | 2110 |
IT Administrator Setup Guide
Before users can connect, an IT administrator must configure OAuth credentials for each ERP system.
Environment Restart Required
Xero Setup
1. Go to developer.xero.com/app/manage and click 'New app'. 2. Select 'Web app' as the integration type. 3. Set OAuth 2.0 redirect URI to: https://your-domain.com/api/v1/erp/oauth/callback. 4. Copy Client ID and generate a Client Secret. 5. Add XERO_CLIENT_ID and XERO_CLIENT_SECRET to your Lease102 backend environment variables.
D365 Business Central Setup
1. Go to Azure Portal → App registrations and click 'New registration'. 2. Name the app 'Lease102' with single-tenant support. 3. Set redirect URI to: https://your-domain.com/api/v1/erp/oauth/callback. 4. Add API permission: Dynamics 365 Business Central → Financials.ReadWrite.All. 5. Grant admin consent. 6. Create a client secret (24-month expiry recommended). 7. Add D365BC_CLIENT_ID, D365BC_CLIENT_SECRET, and D365BC_TENANT_ID to environment.
Sage 50 Setup (via Codat)
Sage 50 is a desktop application that requires Codat as an intermediary. 1. Create an account at codat.io. 2. Enable the Sage 50 integration in your Codat portal. 3. Go to Developers → API keys and create an API key. 4. Add CODAT_API_KEY to your Lease102 backend environment.
Sage 200 Setup
1. Go to developer.sage.com and create a developer account. 2. Register a new app and select Sage 200 as the product. 3. Set callback URL to: https://your-domain.com/api/v1/erp/oauth/callback. 4. Copy Client ID and Client Secret. 5. Add SAGE_200_CLIENT_ID and SAGE_200_CLIENT_SECRET to environment.
Connecting to Your ERP
Once IT setup is complete, any user with Owner or Accountant role can connect:
Navigate to Integrations
Go to Settings → Integrations tab.
Click Connect
Click the 'Connect' button on your ERP system. You'll be redirected to the ERP's authorization page.
Grant Permission
Log in to your ERP and authorize Lease102 to access your accounting data. You'll be redirected back to Lease102.
Verify Connection
The system should now show 'Connected' with your organization name. Click 'Test' to verify the connection is working.
Syncing Journal Entries
To post journal entries to your ERP:
1. Generate Journals
Go to Reports → Journal Entry Export. Select the date range for journal entries.
2. Review Entries
Preview the journal entries before posting. Ensure GL mappings are correctly configured.
3. Sync to ERP
Click 'Sync to ERP'. Choose whether to post as Draft (recommended) or Final. Draft entries can be reviewed in your ERP before posting.
4. Check Sync History
View sync history from Settings → Integrations. Each sync shows records sent, succeeded, and any errors.
Troubleshooting
Common issues and solutions:
| Issue | Cause | Solution |
|---|---|---|
| 'Not Configured' shown | OAuth credentials not set up | Contact IT administrator to configure environment variables |
| 'Token Expired' status | OAuth token has expired (typically 30-60 days) | Click 'Refresh' to renew the token, or disconnect and reconnect |
| 'Error' status | Connection issue with ERP | Check ERP availability, then disconnect and reconnect |
| Sync fails with 'No GL mapping' | Account type not mapped | Go to GL Mappings and map all required account types |
| Journals not appearing in ERP | Posted as draft | Check draft journals in your ERP and approve them |
Permissions
Only users with Owner or Accountant roles can manage ERP integrations. Viewers can see connection status but cannot connect, disconnect, or modify mappings.
Disconnect Carefully