Skip to main content

SalesGent connection (administrator notes)

The switch​

Settings → Apps → SalesGent connection. Off by default, and needs Sales. Off, the screen leaves the menu, its routes refuse, the nightly pull skips the company and the assistant's SalesGent tools are withdrawn. What was pulled stays, and the connection comes back when it is switched on again.

Who can use it​

Two permissions, held by Administrator only:

  • salesgent_sync.read: see the connection and the pulls.
  • salesgent_sync.manage: connect, test, pull now and disconnect.

Settings​

Under Integrations on All settings:

  • Pull every night (on): the 01:00 pull, in the company's own timezone. Sync now works with it off.
  • Pause between requests (500 milliseconds, 0 to 5000): the least a pull waits between two requests to SalesGent. Requests go one at a time, and after a slow answer the pull waits as long as SalesGent took (at most 30 seconds).

The first full sync​

Until every list has been read once, pulls follow one another: each reads for at most 90 minutes, then hands over to the next, which starts at once and skips the lists already read. Only then does the nightly pull take over, reading what changed. If SalesGent is down and the chain stops, the next night's pull, or Sync now, picks it up where it was.

What it keeps​

The address and user name are on the connection. The password is a secret of the connection in the company's vault: written once, never shown, deleted on Disconnect. Every connect, change and disconnect is in the audit history, with the password recorded only as changed or kept.

The nightly rehearsal​

After every complete pull, the pulled copy is converted and imported into a fresh rehearsal company, a practice copy of the move named <company> — rehearsal YYYY-MM-DD. The live company is never written to. The two newest rehearsals are kept and older ones are archived.

A rehearsal sends nothing outside: no email to customers, no reminders, no webhooks, no payments or bank feeds, no e-invoices, no storefront. Staff notifications inside the app still show.

What it needs from you​

The books are not in SalesGent, so the rebuild needs a few files that you upload once. Until the required ones are in, each night's rebuild is skipped and says what is missing. There is no screen for this yet: upload with the API (/api/v1/salesgent-sync/rehearsal/inputs, needs salesgent_sync.manage).

WhatNeededUpload as
QuickBooks' Account List, exported to CSVyesquickbooks_accounts
QuickBooks' Trial Balance at the switch-over, exported to CSVyesquickbooks_trial_balance
The switch-over date every document posts onyesoptions (post_on)
The account map, as your accountant edited itnoaccount_map
Your payment terms import filenopayment_terms
Your price lists import filenoprice_lists

A new upload replaces the file of its kind. The answers show each file's name, size and date, never its content.

What each rebuild records​

Each rebuild lists every file it imported, in the go-live order, with how many rows it held, how many were imported, and the rows refused, grouped by reason. Customers and suppliers waiting for approval are approved by the system, in the rehearsal only. Read it at /api/v1/salesgent-sync/rehearsal/rebuilds.

The morning comparison​

Once everything is imported, each rebuild compares the rehearsal with what SalesGent itself said in the same pulled copy, so each morning tells you whether the move would land the same numbers. It is the reconcile step of the rebuild, read at the same address.

AreaWhat is compared
Customer balancestotal owed by customers, and each customer more than a cent apart, by their SalesGent number
Open documentshow many invoices and bills are still owed, and how much
Stocktotal on hand, and each product whose quantity differs, by SKU
Payments by monthhow many payments were received against invoices each month, and how much
Supplier balancestotal owed to suppliers

Each area shows SalesGent's figure, the rehearsal's, the difference (rehearsal less SalesGent) and match or differs. Amounts match within a cent; counts and quantities must match exactly. The detail lists at most 50 rows per area, largest difference first, with SalesGent numbers and amounts only, never names. An area SalesGent's copy does not hold, or whose app the company does not run, says not compared and why.

Some differences are expected, and are worth knowing before the switch-over: stock SalesGent holds below nothing is not loaded (count it), and a customer whose payments SalesGent did not list comes across owing the whole invoice.

A comparison that cannot run is recorded with its reason; the rehearsal is still built and the rebuild still finishes. The manual check in the switch-over runbook (scripts/reconcile_salesgent.py) is still the sign-off: it compares every document, not only totals, against the live company.

After the switch-over​

When SalesGent is no longer used, disconnect it. That deletes the password; the pulled copy stays as the record of what was moved.