← Back to Documentation
Focus RT logo

Focus RT ERP Integration for UAE E-Invoicing

Connect Focus RT (Focus Softnet) to TrustBill for FTA PINT-AE e-invoicing · Version 1.0 · September 2026

Overview

This guide describes how Focus RT (Focus Softnet's real-time ERP for trading, retail and distribution) connects to TrustBill, a UAE FTA-accredited service provider (ASP), so Focus RT users can issue PINT-AE compliant e-invoices without replacing their ERP.

Focus RT stores your sales, purchases, VAT, inventory and receivables. TrustBill sits between Focus RT and the UAE Federal Tax Authority (FTA): invoice data is transferred from Focus RT through the TrustBill connector, converted to PINT-AE XML, validated in real time, delivered over Peppol via a certified ASP (Tron-Stride or Storecove), and the FTA acknowledgement is returned as a status update.

What this integration delivers

  • Zero-code path from Focus RT invoices to FTA-compliant PINT-AE XML
  • Live FTA status (delivered / acknowledged / rejected) surfaced back next to each Focus RT invoice
  • Support for tax invoices, credit notes and debit notes issued from Focus RT
  • Bulk migration path for historical Focus RT invoices via CSV
  • Preserves the Focus RT invoice number as the FTA-visible document ID
  • Free-zone, designated-zone, reverse-charge and margin-scheme flags mapped end to end

Focus RT Product Scope

TrustBill's Focus RT connector supports these editions and deployment models:

ProductDeploymentSupport
Focus RTOn-premise / Windows ServerFull (recommended)
Focus RTFocus Cloud / private hostedFull via TrustBill Cloud Bridge
Focus iERPCloudFull — see the Focus integration overview
Focus 9 / Focus 8On-premiseSupported via CSV export + TrustBill connector
Custom Focus deploymentsVariesContact TrustBill — custom mappers available

Prerequisites

On the Focus RT side

  • A Focus RT installation with sales, purchase and VAT modules enabled
  • Database access (SQL Server / MySQL / PostgreSQL depending on your Focus edition) or export-file access for the CSV path
  • Company master with valid 15-digit UAE TRN saved on the seller record
  • Customer master records populated with buyer name, TRN (for B2B), country code and address
  • Tax masters mapped to VAT rates that align with UAE FTA categories (Standard 5%, Zero-rated, Exempt, Out-of-scope)
  • Windows account with Read permission on the Focus RT database (for the direct-connect path)

On the TrustBill side

  • A TrustBill SME account (one account = one TRN)
  • Completed KYB (business verification) — your company logo, trade licence and TRN certificate uploaded
  • Active submission mode set to test or sandbox during onboarding, live when going into production
  • Per-tenant API credential (issued by TrustBill support) for headless server-to-server calls

Integration Architecture

The Focus RT ↔ TrustBill integration follows a request/response outbound, polling inbound pattern today (an outbound webhook is on the roadmap).

Outbound flow (Focus RT → TrustBill → FTA)

  1. An invoice is posted in Focus RT. The connector detects the new row (polling the Focus RT DB / watching an export folder).
  2. Connector maps the Focus RT invoice header + lines into TrustBill's InvoiceCreateInput shape.
  3. Connector calls POST /v1/invoices — the invoice is stored in TrustBill as draft. Nothing has reached the FTA yet.
  4. Connector calls POST /v1/invoices/submit with the draft's UUID — status flips to queued.
  5. TrustBill's pipeline runs: queued → transformed → validated → delivered (PINT-AE XML built, Schematron-validated, and handed to the ASP).
  6. ASP (Tron-Stride / Storecove) forwards the XML to the FTA over Peppol.

Inbound flow (FTA → TrustBill → Focus RT)

  1. The ASP posts an inbound webhook to TrustBill when the FTA acknowledges or rejects the invoice.
  2. TrustBill verifies the ASP's HMAC signature + timestamp and updates the invoice status to acknowledged or rejected.
  3. The Focus RT connector polls GET /v1/invoices/{id} (or the batch list endpoint) at 2–5 minute intervals for invoices still in a non-terminal status.
  4. On acknowledged, the connector writes the FTA acknowledgement reference back into a custom field on the Focus RT invoice; on rejected, it writes the rejection reason and (optionally) unposts the invoice for the user to correct.

Connection Methods

Pick the option that matches your Focus RT deployment:

1. TrustBill Windows Connector (recommended)

A signed Windows service installed on the Focus RT database server. Talks to the Focus RT DB read-only, batches invoices, and calls the TrustBill API over TLS 1.3.

  • Best for on-premise Focus RT installations
  • No changes to Focus RT source code required
  • Automatic retry, offline queue, tamper-evident audit log
  • Configuration file names the connection string, TrustBill API key and mode

2. CSV / XLSX drop folder

Focus RT is scheduled to export invoices (daily or hourly) to a shared folder using the built-in Report Writer. TrustBill's watcher picks up the file, validates it, and calls POST /v1/invoices/bulk.

  • Best for low-volume trading / retail businesses
  • Zero database access needed
  • Uses the standard TrustBill CSV schema (see Bulk Migration)

3. Direct HTTP integration (custom)

If your Focus RT deployment is customised or you already have middleware, call the TrustBill REST API directly.

  • Best when Focus RT posts documents via a message bus or a custom .NET plug-in
  • Use the same endpoints documented in the ERP Partner API guide
  • You are responsible for retries, idempotency keys and status polling

Which method should I use?

If your Focus RT runs on-premise on a Windows server you control, use the Windows Connector. If you use Focus Cloud or a hosted deployment, use the CSV drop or the direct HTTP path with your own middleware.

Authentication

TrustBill's API uses Bearer JWT authentication. The Focus RT connector authenticates once per tenant with a per-tenant API credential and refreshes the token on expiry.

Required request headers

Authorization: Bearer {jwt_token}
Content-Type: application/json
Idempotency-Key: {unique_key_per_request}
X-TrustBill-Source: focus-rt-connector/1.0

Idempotency-Key is mandatory

Every write endpoint (POST /v1/invoices, POST /v1/invoices/bulk, POST /v1/invoices/{id}/retry) requires an Idempotency-Key header (1–128 characters). We recommend deriving it from the Focus RT invoice's primary key, e.g. focus-rt::<company_id>::<voucher_id>. Re-sending the same key + body returns the cached response — a Focus RT retry cannot create a duplicate FTA submission.

Focus RT → PINT-AE Field Mapping

The connector translates Focus RT columns into TrustBill's InvoiceCreateInput shape, which is then rendered into PINT-AE XML by TrustBill.

Header-level mapping

Focus RT fieldTrustBill fieldNotes
VoucherNo / InvoiceNonumber1–64 chars, unique per tenant + mode
VoucherDateissueDateConverted to ISO YYYY-MM-DD
DueDatedueDateOptional, ISO YYYY-MM-DD
CurrencycurrencyMust be AED; multi-currency Focus RT invoices are converted at the Focus RT posting rate
VoucherTypeinvoiceTypeSales Invoice → sale, Purchase Invoice → purchase, Credit Note → credit_note, Debit Note → debit_note
CompanyMaster.TRNseller.trn15-digit UAE TRN
CustomerMaster.TRNbuyer.trn15-digit UAE TRN; leave empty for B2C invoices
CustomerMaster.Countrybuyer.countryISO 3166-1 alpha-2 (Focus RT stores the country name; the connector normalises)
CustomerMaster.Address1..3buyer.address.{line1,line2,city}Line 1 required; city usually held in Address3 in Focus RT
RefVoucherNoreferencedInvoiceNumberRequired for credit / debit notes — original invoice ID
Remarks / NarrationnotesPreserved verbatim; visible in FTA-facing XML

Line-level mapping

Focus RT columnTrustBill fieldNotes
ItemMaster.Descriptionlines[].descriptionNon-empty; supports Arabic characters
Qtylines[].quantityMust be > 0; negative Qty in Focus RT signals a credit note
Ratelines[].unitPriceVAT-exclusive; the connector removes VAT if Focus RT is configured as VAT-inclusive
TaxCode / VATCodelines[].vatRate + lines[].taxCategoryvatRate is a decimal fraction (0.05 for 5%); see mapping below
DiscountAmtlines[].discountAmountAbsolute discount per line — applied before VAT
ItemMaster.ItemCodelines[].sellerItemIdPreserved for traceability
ItemMaster.UOMlines[].unitFocus RT UOM code is mapped to UN/ECE Rec 20 (e.g. NOSC62, KGSKGM)

Totals are computed server-side

Do not send subtotal, vat_amount or total. TrustBill re-computes totals from lines[] and returns them in the response so Focus RT can reconcile against them. If Focus RT's total does not match ±0.01 AED, the connector logs a variance and blocks submission until you correct the Focus RT posting.

Create Invoice (draft)

Endpoint: POST /v1/invoices

Below is a real Focus RT sales invoice mapped into the TrustBill payload. The Focus RT invoice is SI/2026/1042 — Sale of two laptops to a Dubai reseller at 5% VAT.

Request body

{ "number": "SI/2026/1042", "issueDate": "2026-09-07", "dueDate": "2026-10-07", "currency": "AED", "invoiceType": "sale", "buyer": { "name": "Al Reef Reseller LLC", "trn": "100234567800003", "country": "AE", "email": "ap@alreef.example", "address": { "line1": "Warehouse 7, Al Quoz Industrial 3", "city": "Dubai", "country": "AE" } }, "seller": { "name": "Focus RT Trading LLC", "trn": "100100100100003", "country": "AE" }, "lines": [ { "description": "ThinkPad X1 Carbon Gen 12", "sellerItemId": "LP-X1C-G12", "quantity": 2, "unit": "C62", "unitPrice": 5500.00, "vatRate": 0.05, "taxCategory": "standard_5" } ], "sellerInvoiceReference": "Focus RT voucher #F-88421", "notes": "Payment: 30 days net" }

Response (201 Created) — abbreviated:

{ "id": "b1a2c3d4-....-uuid", "number": "SI/2026/1042", "status": "draft", "invoiceType": "sale", "totals": { "subtotal": 11000, "tax": 550, "total": 11550, "currency": "AED" }, "pipeline": [], "errors": [], "submissionMode": "sandbox", "source": "focus-rt-connector" }

Credit & Debit Notes

Focus RT posts credit notes (sales return) and debit notes (purchase return / additional charge) as separate voucher types. The connector maps them accordingly.

Focus RT voucherinvoiceTypeRequired extra fields
Sales Return / Credit Notecredit_notereferencedInvoiceNumber (original SI number), reasonCode (e.g. ReturnOfGoods)
Purchase Return / Debit Notedebit_notereferencedInvoiceNumber (original PI number), reasonCode

Sign convention: send positive quantities and positive unit prices on credit / debit notes. The invoiceType tells TrustBill and the FTA that the document reverses the reference invoice; PINT-AE handles the sign in the XML.

Submit Invoice(s) for Delivery

Creating a draft does not deliver the invoice to the FTA. Submission is an explicit second call so you can review or auto-approve before sending.

Endpoint: POST /v1/invoices/submit

{ "ids": ["b1a2c3d4-....-uuid"] }

Accepts 1–200 invoice UUIDs per call. Non-draft invoices in the list are silently skipped, so retry is safe.

Response (200):

{ "submitted": 1, "ids": ["b1a2c3d4-....-uuid"] }

Focus RT tip: most Focus RT users configure the connector to auto-submit any draft older than N minutes (default: 10). This gives users a window to void an invoice from Focus RT before it reaches the FTA.

Status Tracking

Statuses are forward-only. A retry starts a new pipeline run.

StatusMeaningTerminal?
draftCreated in TrustBill, not submittedNo
queuedSubmitted, waiting for pipeline workerNo
transformedPINT-AE XML generatedNo
validatedPassed schema + SchematronNo
blocked_no_creditInsufficient TrustBill credit — top up to releaseYes
deliveredSent to FTA via ASP; waiting for ackYes (pending ack)
acknowledgedFTA confirmed receipt / validity — safe to mark as filed in Focus RTYes
rejectedFTA or ASP rejected the invoiceYes — retry after fix

Polling recommendation: the Focus RT connector polls GET /v1/invoices/{id} every 2 minutes for non-terminal invoices, then stops once a terminal status is reached. A batch endpoint (GET /v1/invoices?status=queued&status=delivered) is available for consultancies that manage many tenants.

Bulk Migration from Focus RT

Historical Focus RT invoices (up to 12 months back) can be imported into TrustBill as either "archive only" or "submit to FTA" depending on your compliance requirement.

Endpoint: POST /v1/invoices/bulkmultipart/form-data, one CSV part, max 5 MB, Idempotency-Key header required.

CSV column headers (in order)

number,issueDate,dueDate,invoiceType,currency,sellerTrn,sellerName,buyerTrn,buyerName,buyerCountry,buyerAddressLine1,buyerCity,lineDescription,lineQty,lineUnit,lineUnitPrice,lineVatRate,lineTaxCategory,referencedInvoiceNumber,notes
LimitValue
Max rows per file1,000 invoices
Multiple lines per invoiceRepeat the number column — the importer groups lines automatically
Partial successYes — bad rows are reported without rolling back the batch
Duplicate invoice numberDraft rows are upserted; already-submitted rows are rejected

Recommended workflow: export Focus RT invoices to CSV via Report Writer → run the TrustBill "focus-rt-csv-normalizer" script to remap headers to the schema above → upload in test mode → review the summary → repeat in sandbox, then live.

Test / Sandbox / Live Modes

Every TrustBill tenant has one active submission mode. Invoices are hard-partitioned per mode — a live invoice cannot be viewed from sandbox, and vice-versa.

ModePurposeReaches FTA?
testLocal integration testing — no ASP callNo
sandboxEnd-to-end dry run against the ASP sandboxFTA sandbox only
liveReal, legally binding e-invoicingYes — the FTA production network

Focus RT best practice: keep the Focus RT connector in sandbox mode for the full first invoicing week. Compare the FTA-acknowledged totals against Focus RT's VAT report before switching to live.

VAT & Tax Categories

Focus RT stores UAE VAT as a rate + code on the Item / Customer master. Map each Focus RT tax code to a TrustBill taxCategory once, at connector setup:

Typical Focus RT codevatRatetaxCategoryWhen to use
VAT50.05standard_5Most B2B / B2C sales inside UAE mainland
VAT0-EXP0zero_rated_exportExports outside the GCC
VAT0-HC0zero_rated_healthcareQualifying healthcare goods / services
VAT0-EDU0zero_rated_educationQualifying education goods / services
EX-FIN0exempt_financialMargin-based financial services
EX-RES0exempt_residential_rentResidential rent
RC-DZ0reverse_charge_designated_zoneSale to a UAE designated zone customer
OOS0out_of_scopeOut-of-scope items (e.g. some inter-branch flows)

UAE-Specific Scenarios

Free Zone / Designated Zone sellers

Set the Focus RT company profile flag DesignatedZone = Y. The connector propagates it as seller.designatedZone: true so PINT-AE emits the correct free-zone declaration.

Margin scheme (used cars, antiques, second-hand goods)

Focus RT items configured with the "profit margin" flag are mapped to lines[].marginScheme: true. The connector sends the margin, not the sale value, as the VAT base — matching FTA rules for second-hand-goods traders.

Reverse charge on imports

Purchase invoices from non-UAE suppliers with reverse-charge VAT are mapped to invoiceType: "purchase" + taxCategory: "reverse_charge_designated_zone". TrustBill emits the required ReverseCharge markers.

B2C invoices (no buyer TRN)

Leave buyer.trn empty. Focus RT retail POS invoices are simplified tax invoices under the FTA rules; TrustBill emits the correct PINT-AE profile automatically based on the missing TRN + total < 10,000 AED.

Error Handling

All TrustBill errors follow the shape { code, humanMessage, meta? }. The Focus RT connector logs the code against the source voucher and either retries (transient) or surfaces it in the Focus RT log window (permanent).

HTTPTypical codeFocus RT root causeAction
400invalid_bodyBad TRN, buyer=seller, missing VAT code on a lineFix Focus RT master data and retry
400totals_mismatchFocus RT posted totals differ from line-based totalsReconcile in Focus RT; connector will re-emit
401missing_authorization_headerJWT expired between pollsRefresh token — automatic in the Windows connector
403kyb_requiredTenant not yet approved by TrustBill complianceContact TrustBill support
409invoice_mode_mismatchFocus RT is posting live invoices but tenant is still in sandboxSwitch mode in TrustBill dashboard
409invoice_number_duplicateSame Focus RT voucher number posted twiceDelete the second Focus RT voucher or renumber it
413bulk_payload_too_largeCSV export > 1,000 rows or 5 MBSplit by date range and re-upload
422idempotency_requiredCustom middleware missed the headerAlways send a unique Idempotency-Key

Setup Checklist

  1. Create your TrustBill SME account and complete KYB (upload trade licence + TRN certificate)
  2. Request a per-tenant API credential from TrustBill support
  3. Install the TrustBill Windows Connector on your Focus RT database server (or configure CSV drop / direct HTTP)
  4. Map Focus RT tax codes to TrustBill taxCategory values (one-time)
  5. Enable sandbox mode in the TrustBill dashboard
  6. Post a test sales invoice in Focus RT — confirm it reaches acknowledged in TrustBill within 3 minutes
  7. Reconcile Focus RT's VAT report against TrustBill's "Delivered invoices" report
  8. Switch to live mode when the FTA registration is complete
  9. Turn on the Focus RT write-back plug-in so acknowledged references appear next to invoices in Focus RT

Suggested test cases before go-live

  • B2B sale, single line, 5% VAT — expect acknowledged
  • B2C sale under 10,000 AED with no buyer TRN — expect PINT-AE "simplified" profile
  • Sales return (credit note) referencing an earlier invoice — expect matching pair
  • Export sale outside GCC, zero-rated — expect taxCategory: zero_rated_export
  • Sale to a designated-zone customer — expect reverse-charge markers
  • Duplicate voucher number — expect invoice_number_duplicate
  • Bulk upload of 500 historical invoices — expect partial success reported per row

Troubleshooting

SymptomLikely causeFix
Focus RT invoice never appears in TrustBillConnector service stopped, or DB user has no read grantCheck Windows Services → restart TrustBillFocusRT; verify SQL login
Invoice stuck in queuedInsufficient credit or KYB rejectedCheck the TrustBill dashboard for a red banner; top up credit
Invoice reaches rejected with "buyer_trn_invalid"Focus RT customer TRN is 14 digits or has spacesCorrect the TRN in Focus RT Customer Master → connector will re-emit
Totals variance errorFocus RT posted VAT-inclusive but connector expected exclusiveToggle pricesIncludeVat in connector.yaml
Arabic descriptions appear as ??? in PINT-AE XMLFocus RT DB is not UTF-8 / connector is on ANSI code pageSet connectionString.CharSet = utf8 and restart connector
Duplicate FTA submissions after a network blipMissing / non-unique Idempotency-KeyConfirm the key formula is focus-rt::<company_id>::<voucher_id>

Support & Contact

Technical Support

Escalation

For go-live escalations, include your TrustBill tenant ID, the Focus RT voucher number and the timestamp of the failed pipeline run. TrustBill support responds to Focus RT-tagged tickets within one business hour during UAE working days.