Skip to main content

How to Integrate SQL Account to tofu

Connect SQL Account to tofu to bring in your accounting settings and publish AP bills, AR invoices, direct expenses, and credit notes directly.

Written by Jess B

Important: SQL Account is currently waitlisted. Contact support team or send an email to [email protected] to get it enabled for your organization.

Once it's enabled, use a dedicated SQL Account user for this integration, not your own login. Generating an API secret key permanently stops that user from signing in to SQL Account.

Before you begin

How you get connected depends on where SQL Account runs:

  • SQL Connect (cloud-hosted): you're ready to go. Just generate a key and connect.

  • On-premise (your own server): ask your IT team to install the SQL API Service, get a dedicated public IP, and forward TCP 443 first. Follow SQL's own setup guide: On-premise setup.

Unlike some other accounting apps, there's no sign-in redirect. You'll generate two strings directly in the SQL Account desktop app and paste them into tofu.


How to connect SQL Account

In SQL Account

  1. Go to Tools → Maintain User…

  2. Click New.

  3. Enter a Code and Name for the dedicated API user, then click Save.

  4. Click More → API Secret Key.

  5. Click Generate API Secret Key.

  6. Copy the Access Key and Secret Key.

For the full walkthrough from SQL, including screenshots of each screen, see their guide: Setting up API access.

Your secret key is shown only once and can't be retrieved again. Copy and save it somewhere safe right away. If you lose it, you'll need to generate a new one.


In tofu

  1. Go to Entity Settings.

  2. Select Integrations.

  3. Click Add New Integration.

  4. Select SQL Account.

  5. Paste your Access Key and Secret Key.

  6. Click Connect.

  7. Review the connected company and base currency.

  8. Click Activate.

There's no company picker to worry about. Your access key already identifies the right company.

Tips:

  • Before clicking Activate, turn on Self Prompt for AP Bills, AR Invoices, and Direct Expenses in the configuration panel. This lets tofie learn from your historical transactions in SQL Account and apply your coding patterns automatically during review. Settings for Bank Statements and Credit Notes aren't available yet.

  • Want to check your data first? Go to Entity Settings → Accounting to review the chart of accounts, customers and suppliers (with tax ID and business registration numbers), items, SST tax codes, projects/areas/agents as tags, locations, currencies, payment methods, and credit terms. A few account types, such as group headings, control accounts, and individual customer/supplier accounts, won't appear since SQL Account doesn't allow postings against them directly.

  • To rotate your key later, generate a fresh one on the same API user in SQL Account and re-enter both values in tofu. Everything else stays as it is.


How to publish to SQL Account

Every document type publishes directly to SQL Account except Bank Statements, which use the export and import workflow below.

Mark the extraction Ready first, then publish it.

  • To publish a single extraction, open it, click Mark Ready, then click Publish.

  • To publish several at once, go to the Extractions panel, set the Extraction Status filter to Ready, select the extractions you want, and use Bulk Publish.

In tofu

In SQL Account

AP Bill

Purchase Invoice

AR Invoice

Invoice

Direct Expense

Payment Voucher

AP Credit Note

Purchase Returned

AR Credit Note

Credit Note

Tip: After publishing, click Open SQL Account on the extraction. It opens SQL Account's transaction list with the document number already copied, so you can paste it straight into the search bar to find it.

Automatic publishing is off by default when you first connect, so nothing reaches your books until you choose to turn it on. Every document tofu creates also has e-Invoice submission switched off; submitting to LHDN MyInvois stays your decision, made directly in SQL Account.

Want to automate more of this?
Turn on Auto-Ready, Auto-Publish, and Auto-Done under Entity Settings → Features → Extraction Types → Document Lifecycle. Learn more: Understanding Extraction Lifecycle in tofu


How to export and import Bank Statements

Bank Statements aren't published directly. Use the export and import workflow instead:

  1. Open the bank statement in tofu.

  2. Review all extraction details and click Mark Ready.

  3. Click Export and select the SQL Accounting export template.

  4. Download the file.

  5. Go to SQL Account and import the file.

  6. Back in tofu, click Mark Done to wrap up the statement. If Auto-Done is on, this happens automatically once it's exported.


Good to know

  • Credit notes arrive unapplied. SQL Account's system doesn't accept the link between a credit note and its invoice, so tofu publishes the note on its own. Apply it to the invoice directly in SQL Account; this is expected, not an error.

  • A document with a recorded payment can't be changed from tofu. Remove the payment in SQL Account first, or make the correction there.

  • Republishing creates a new document. SQL Account assigns document numbers itself, not tofu, so republishing uses a new number and can leave a gap in your numbering sequence.

  • The original scanned document stays in tofu. SQL Account's API can't receive files, but you can open it anytime from the extraction.

  • If your self-hosted server is switched off, or loses its internet connection or port forward, tofu shows a connection problem. Check your own environment first; it's usually not a tofu issue.

  • Withholding tax isn't read from SQL Account yet.

Did this answer your question?