Overview
This guide explains how to connect Focus — RT, 9, Cloud and MRP — to TrustBill, a UAE FTA-accredited service provider (ASP). Invoices posted in Focus are submitted as PINT-AE compliant e-invoices to the FTA without replacing your ERP.
Focus already manages UAE VAT, customer TRNs, item masters, inventory and financials. What it does not ship natively is PINT-AE XML generation and delivery through an FTA-accredited ASP over the Peppol network. TrustBill bridges that gap.
What this integration delivers
- Submit sales invoices and credit notes from Focus to the FTA
- Cloud path for Focus Cloud via REST API / SData
- On-premise path for Focus RT and Focus 9 via SData, web services or the TrustBill Desktop Agent
- PINT-AE XML generated, validated and delivered by TrustBill
- FTA acknowledgement, UUID and QR written back to Focus custom fields
- Bulk migration path for historical invoices via CSV
What is Focus?
Focus (Focus Softnet) is a UAE-headquartered ERP and business management suite. The product lines most used for e-invoicing are:
- Focus RT — real-time ERP with a web layer and SData / REST endpoints
- Focus 9 — desktop + web hybrid ERP with SData and web-service integration
- Focus Cloud — SaaS ERP with a public REST API and webhooks
- Focus MRP — manufacturing-focused ERP based on the Focus stack
Supported Versions
| Product | Supported Versions | Primary API |
|---|---|---|
| Focus RT | 2021, 2022, 2023, 2024 releases | SData / REST |
| Focus 9 | 9.0, 9.1, 9.2, 9.3 | SData / Web services |
| Focus Cloud | 2023, 2024 releases | REST API / Webhooks |
| Focus MRP | 2023, 2024 releases | SData / REST |
Prerequisites
- Focus company with UAE VAT, TRN and customer tax IDs configured
- Customer records with 15-digit UAE TRN for B2B invoices
- User / service account with permission to read posted invoices and customers
- Active TrustBill SME account with API credentials
- Network egress from the Focus host or middleware to TrustBill API endpoints
- For on-premise editions: the SData servlet or web services endpoint must be enabled
Integration Architecture
Focus stays the source of record. A middleware agent or scheduled job reads invoices and pushes them to TrustBill.
- Invoice posted in Focus.
- Connector / agent reads the invoice via REST, SData or database.
- Payload normalised into TrustBill's PINT-AE JSON.
- POST to TrustBill
/api/v1/invoiceswith API key authentication. - TrustBill validates, renders PINT-AE XML and delivers over Peppol.
- Acknowledgement written back to Focus custom fields.
Connection Methods
1. Focus Cloud REST API (Recommended for cloud)
Use the Focus Cloud REST API to fetch invoices, contacts and products with OAuth 2.0 authentication.
2. Focus RT / 9 SData
Query SData feeds for sales invoices, customers and items. Transform to TrustBill JSON and POST.
3. TrustBill Desktop Agent
For on-premise Focus 9 or RT, install the Windows agent on the application server. It reads the invoice register and forwards to TrustBill.
4. CSV / Excel Export
Export invoice data from Focus reports and upload to TrustBill bulk import as a fallback.
Authentication
TrustBill API uses Bearer tokens. Focus-side authentication depends on the edition.
POST https://trustbill.ae/api/v1/invoices
Authorization: Bearer tb_your_api_key_here
Content-Type: application/jsonFocus product auth:
- Focus Cloud: OAuth 2.0 client credentials or authorization code from the Focus admin portal
- Focus RT / 9: SData user credentials or Windows service account for the Desktop Agent
- Focus MRP: Same SData / REST credentials as the core Focus application
Focus RT
Focus RT exposes SData and REST endpoints. The standard pattern is to query the sales invoice feed, transform the payload and post to TrustBill.
GET https://focusrtserver/sdata/FOCUS/{company}/salesInvoices
?startIndex=1&count=50
&where=status%20eq%20'Posted'For a deeper Focus RT guide, see the Focus RT integration page.
Focus 9
Focus 9 ships with SData and SOAP web services. Enable the web services layer in the Focus 9 application manager, then generate an invoice query service for TrustBill.
POST https://focus9server/Focus9WS/InvoiceService.asmx
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://focussoftnet.com/GetPostedInvoices"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope ...>
<soap:Body>
<GetPostedInvoices xmlns="http://focussoftnet.com/">
<CompanyCode>UAE01</CompanyCode>
<FromDate>2026-09-01</FromDate>
<ToDate>2026-09-08</ToDate>
</GetPostedInvoices>
</soap:Body>
</soap:Envelope>Focus Cloud
Focus Cloud provides a JSON REST API. Register a developer app, obtain an OAuth token and poll the sales invoice endpoint.
GET https://api.focuscloud.ae/v1/sales_invoices
?status=posted&from=2026-09-01&to=2026-09-08
Authorization: Bearer {focus_cloud_token}Webhooks are also available: configure Focus Cloud to call your middleware when a new invoice is posted, and the middleware pushes to TrustBill.
Focus → TrustBill Field Mapping
| Focus Field | TrustBill JSON | Notes |
|---|---|---|
Invoice No | invoiceNumber | Unique per seller |
Invoice Date | issueDate | ISO-8601 |
Company TRN | seller.trn | 15-digit UAE TRN |
Customer TRN | buyer.trn | Required for B2B |
Item Description | items[].name | English + Arabic if available |
Quantity | items[].quantity | Positive numeric |
Unit Price | items[].unitPrice | After line discount |
Total with VAT | totals.grossAmount | VAT inclusive |
UAE VAT / Tax Mapping
Map Focus tax codes to FTA tax category codes.
| Focus Tax Code | TrustBill taxCategory | Rate |
|---|---|---|
| VAT 5% | STANDARD | 5% |
| VAT 0% | ZERO_RATE | 0% |
| Exempt | EXEMPT | — |
| Reverse Charge | REVERSE_CHARGE | 5% |
| Out of Scope | OUT_OF_SCOPE | — |
Credit Notes
Focus credit notes are mapped to the TrustBill credit-note endpoint. Include the original invoice number.
POST https://trustbill.ae/api/v1/credit-notes
{
"originalInvoiceNumber": "SI-001",
"issueDate": "2026-09-08",
"creditNoteNumber": "CN-001",
"reason": "Product return",
"totals": {
"grossAmount": -1050.00
}
}Status Tracking
TrustBill posts status updates to a webhook URL. The middleware writes the values back to Focus custom fields or a status table.
POST https://your-middleware.example.com/webhook/trustbill
Content-Type: application/json
{
"invoiceNumber": "SI-001",
"status": "Acknowledged",
"ackRef": "FDA-ACK-123456789",
"uuid": "a1b2c3d4-...",
"reason": null
}Bulk Migration
Export historical invoices from Focus reports or SData with the columns from the field mapping table, then upload to TrustBill.
POST https://trustbill.ae/api/v1/invoices/bulk
Authorization: Bearer tb_your_api_key
Content-Type: multipart/form-data
file: focus_invoices.csv
options: {"mode":"sandbox","skipErrors":true}Sandbox & Live Modes
Test the full flow without touching the FTA. Switch to live once FTA registration and ASP assignment are complete.
| Mode | Endpoint / Option | What it does |
|---|---|---|
| Sandbox | ?mode=sandbox or bulk import sandbox | Validates PINT-AE, no FTA delivery |
| Live | ?mode=live | Submits to FTA via ASP over Peppol |
Multi-Company & Multi-Currency
Focus RT, Focus 9 and Focus Cloud all support multiple companies under one install or subscription — common for UAE groups running a mainland trading entity alongside a free-zone entity. TrustBill treats each Focus company as an independent seller with its own TRN.
Company → TrustBill profile mapping
Maintain a lookup table that maps each Focus company code to a TrustBill API key and TRN in the Desktop Agent config or middleware. Never route two companies' invoices through one shared TrustBill profile.
Multi-currency invoices
When a Focus invoice is raised in a foreign currency, include both the trade currency amount and the AED-converted total (using the exchange rate recorded on the invoice) in the TrustBill payload — PINT-AE always requires an AED figure for FTA reporting.
Multiple branches
Where Focus branches represent different Emirates or outlets, tag the branch code in your internal reconciliation log alongside the TrustBill invoice ID — useful during an FTA audit even though PINT-AE itself has no branch field.
Error Handling & API Errors
Handle every non-2xx TrustBill response deterministically in the Desktop Agent or middleware — separate retryable errors from permanent validation errors.
| HTTP Status | Meaning | Action |
|---|---|---|
| 400 | Malformed JSON or missing required field | Fix the payload mapping; do not retry unchanged |
| 401 | Invalid or expired API key | Rotate the key in the Desktop Agent / Focus Cloud app config |
| 403 | TRN on invoice does not match the API key's registered TRN | Fix company → TRN mapping |
| 409 | Duplicate invoice number for this seller | Check idempotency key / Focus invoice number reuse |
| 422 | PINT-AE validation failure (tax, TRN format, totals mismatch) | Inspect errors[] array; fix mapping |
| 429 / 5xx | Rate limited or TrustBill/FTA temporarily unavailable | Retry with exponential backoff (max ~5 attempts) |
Setup Checklist
- UAE TRN configured for every Focus company
- Customer records populated with TRNs for B2B customers
- SData / REST / Desktop Agent access enabled and credentials secured
- Company → TrustBill API key mapping table created
- Tax code → PINT-AE tax category mapping reviewed with finance
- Credit note flow mapped to TrustBill credit notes
- Webhook or polling job configured for status write-back
- Sandbox invoices tested for standard, zero-rated, exempt and reverse-charge cases
- Bulk migration CSV template validated against historical invoice data
- Go-live date agreed and live mode switched only after sandbox sign-off
Troubleshooting
- 422 validation error: Confirm customer TRN is 15 digits and seller TRN is set.
- SData 401: Check the SData user credentials and that the company is enabled for web access.
- Focus Cloud token expired: Refresh the OAuth token before the one-hour expiry.
- Desktop agent not seeing invoices: Verify the agent is running under a user with Focus company access and that the DSN is correct.
- Missing Arabic names: Use a custom field for the Arabic legal name and include it in the mapping.
Support
Need help with the Focus integration? Our team can review your SData setup, Focus Cloud app, Desktop Agent configuration or CSV mapping.