Sync
Keep orders, products, stock and customers always up to date in a Google sheet, in BigQuery or in a Postgres database of yours.
Sync copies the store's records out of Mobiari and keeps the copy current on its own: first everything that exists, then every change, a few seconds after it happens. It is for reports, BI, reconciliation and joining the store's data with other systems.
Before you start: sync is a view of the Grow → Automations screen, which shows for people with View automations. Seeing the view needs View integrations; creating, pausing or deleting a connection needs Configure integrations.
Where to send it
In Grow → Automations → Sync, click New connection and, under Copy to where?, choose the destination:
| Destination | How the data lands |
|---|---|
| Google Sheets | A spreadsheet in your Google Drive, with a tab per record type and a row per record. |
| BigQuery | A dataset of yours in Google Cloud, with a view per record type, ready for Looker Studio, Metabase and the like. |
| Postgres | A Postgres database of yours, with a table per record type. |
Each connection shows in the list and opens in a side panel. Once connected, tick under Record types copied the record types (orders, payments, shipments, NF-e, returns, subscriptions, products, variants, stock, purchase orders, supplier invoices, payables, customers, deals and bookings) and click Save choice. Under What is copied, each type starts by copying the history (the list shows Copying), then shows how many records were copied and when the last time was.
Every change counts, whether it comes from the admin, the storefront, an integration (ERP, marketplace) or the assistant.
Google Sheets
- Choose Google Sheets, fill in Connection name and click Sign in with Google.
- Sign in with your Google account and allow access. Mobiari creates a spreadsheet called Mobiari · store name in your Drive and can only see and change that spreadsheet, none of your other files.
- Back in Mobiari, open the connection and choose what to sync.
Each record type becomes a tab (Pedido, Produto, Cliente...), with a column per field. Money shows in reais and dates in the store's timezone. A record deleted in the store keeps its row, with the date in the Excluído em (deleted at) column. You can sort and filter the sheet freely: Mobiari finds each row by the Id in the first column.
Use Open the spreadsheet on the connection's panel to go straight to it.
Edits in the sheet do not come back
The sheet receives the store's data, but what you change in it does not change Mobiari and may be overwritten the next time that record changes. To add notes or calculations, use other columns to the right or another tab.
If you remove Mobiari's access in your Google account, or the spreadsheet is deleted, the record types start showing an error. Click Sign in to Google again on the connection's panel.
BigQuery
Mobiari writes to your dataset with its own account, so you do not create or keep any key:
- Choose BigQuery and copy Mobiari's account e-mail.
- In BigQuery, open the dataset the data should go to, click Share, then Add principal, paste the e-mail and choose the BigQuery Data Editor role.
- Back in Mobiari, enter the Project and the Dataset and click Connect. Mobiari checks the access right away.
For each record type Mobiari creates two things in the dataset:
mobiari_<type>, a view with each record as it is now (for examplemobiari_orderfor orders). This is the one you query.mobiari_<type>_changes, a table with one row per change, deletions included, partitioned by day. It keeps the history.
Money is in cents (columns ending in _cents) and dates are in UTC. When a record type gains new fields, Mobiari adds the columns.
Postgres
Choose Postgres and enter the Database address (the connection URL) of a user with access to that database only, the Schema and the Connection name. The database must accept connections from the internet and the connection is always encrypted. The URL is stored encrypted and never shown again.
Mobiari creates a table per record type (mobiari_order, mobiari_product...) with a column per field, plus _mobiari_synced_at and _mobiari_deleted_at.
Pause and delete
In the connection panel's menu, Pause stops syncing and Resume carries on where it stopped. Delete connection stops for good and forgets the access. What was already sent stays at the destination: the spreadsheet in your Drive, the tables in BigQuery or in the database.
If something goes wrong
- A record type shows an error: Mobiari tries again on its own every minute. The other types carry on.
- "A conexão com o Google expirou ou foi desfeita" (the Google connection expired or was removed): click Sign in to Google again.
- "Sem acesso ao dataset" (no access to the dataset): check that Mobiari's e-mail has the BigQuery Data Editor role on the right dataset.
- "Dataset não encontrado" (dataset not found): check the project ID and the dataset name, exactly as they appear in BigQuery.
Next steps
- Automations: act on its own when a record changes.
- Webhooks: receive the store's events in another system.