QuickBooks through Make
CertaCal works with QuickBooks Online through Make (make.com), an automation service. You connect your own QuickBooks Online company in Make, and a Make scenario does the QuickBooks side:
- When a job closes, CertaCal sends the visit's invoice (or estimate, or sales receipt) to your scenario: the customer, and one line per scale with its serial and certificate number, or the service agreement's or quote's lines. Each line names the QuickBooks product/service it bills on.
- The scenario finds or creates the customer in QuickBooks, creates the invoice, and tells CertaCal its QuickBooks number and total.
- Optionally, a second scenario tells CertaCal when an invoice is paid, so each job, the customer's page and Office › Money show paid, unpaid or overdue.
- An accepted quote can go to QuickBooks as an estimate the same way.
QuickBooks doesn't email anything: you review each invoice in QuickBooks and send it from there, as before.
What you need
- A Make account. The free plan is enough to try it; a busy company will want a paid plan, because each invoice uses several Make operations (about one per invoice line, plus five).
- Your QuickBooks Online sign-in.
- In CertaCal: Settings › Integrations.
- The starter scenario: certacal-quickbooks-make.json. Save it to your computer (right-click › Save link as).
1. Make a Make account
- Go to make.com and click Get started free. Sign up with your work email.
- When asked where your data should be kept, pick the region nearest you (for example US). Note your Make address, for example
us1.make.com. - You land on your Make Organization dashboard.
2. Connect QuickBooks Online in Make
- In Make, open Connections in the left menu and click Add.
- Search for QuickBooks and pick it.
- Name the connection, for example QuickBooks: <your company>, and click Save.
- QuickBooks' sign-in opens. Sign in, pick your company, and click Connect.
The connection appears in the list. Make keeps the QuickBooks sign-in; CertaCal never sees it.
3. Get what Make needs from CertaCal
You need two things from CertaCal: an API key, so Make can tell CertaCal what it made, and your company's write-back address.
- In CertaCal, open Settings › Integrations.
- Under API keys, type the name Make, pick Read and write, and click Make key.
- Copy the key that appears (it starts
cck_). It's shown only once: paste it straight into Make in step 4 below, and don't email it or save it in a document. If it's lost, switch it off and make a new one. - At the top, under QuickBooks Online (through Make), note the address after Make writes back to, for example
https://yourcompany.certacal.net/api/v1/quickbooks/documents/.
4. Build the invoice scenario
The starter scenario has the two CertaCal steps already set up: the webhook that receives each invoice, and the call that writes the result back. You add the QuickBooks steps between them.
Import the starter scenario
- In Make, open Scenarios and click Create a new scenario.
- Click the … (more) button at the bottom and pick Import Blueprint. Choose the
certacal-quickbooks-make.jsonfile you saved, and click Save. - Click the first step, CertaCal: invoice ready. Click Create a webhook, name it CertaCal invoices, and click Save. Make shows the webhook's address, such as
https://hook.us1.make.com/abc123…. Click Copy address to clipboard.
Tell CertaCal to send invoices to Make
- In CertaCal, Settings › Integrations › Webhooks: name it Make invoices, paste the address into Address to call, tick A closed job's invoice is ready for QuickBooks, and click Add webhook. (A signing secret is shown; Make doesn't need it, so you can close it.)
- Under QuickBooks Online (through Make), pick what to make (An invoice, An estimate or A sales receipt), and type your QuickBooks product/service names (see Products and services below).
- Switch When a job closes on.
Show Make what an invoice looks like
- In Make, click the webhook step and then Redetermine data structure. Make waits for a call.
- In CertaCal, under Send a closed job now, type the number of a recent closed job and click Send to QuickBooks.
- Make shows Successfully determined. Each later step can now pick CertaCal's fields, all under
data:data › customer,data › lines,data › date,data › memoand so on (see What CertaCal sends below). Below,customer.display_namemeansdata › customer › display_namefrom the webhook step.
Add the QuickBooks steps
Add these between the two CertaCal steps (hover over the link between them and click the +, or drag the write-back step to the right to make room). For each QuickBooks step, pick the QuickBooks connection from step 2.
- QuickBooks › Search for customers. Search by Query:
DisplayName = '{{customer.display_name}}'(mapdisplay_namefrom the webhook). Limit1. Tick Continue the execution of the route even if the module finds no results. - Flow control › Router. It splits the scenario in two routes, run one after the other.
- On the first route, click the link to set a filter: Label
New customer, condition Id (from Search for customers) Does not exist. Add QuickBooks › Create a customer: Display namecustomer.display_name, Emailcustomer.email, and the Billing address fields fromcustomer.billing_address(line1,line2,city,state,postal_code,country). After it, add Tools › Set variable: namecustomer_id, value Id from Create a customer. - On the second route (no filter):
- Click CertaCal: write back:
- Click Save (bottom left), then switch the scenario On (Immediately as data arrives).
1. Tools › Get variable: customer_id.
2. Flow control › Iterator: Array = lines from the webhook.
3. QuickBooks › Search for items: Query Name = '{{item}}' (map item from the Iterator). Limit 1.
4. Flow control › Array aggregator: Source module = the Iterator; Target structure type = Create an invoice › Line items (pick it after adding the next step, then come back). Map: Item = Id from Search for items; Description = description; Quantity = quantity; Unit price = {{ifempty(rate; UnitPrice)}}, using UnitPrice from Search for items, so a scale line takes your QuickBooks price.
5. QuickBooks › Create an invoice (or Create an estimate, or Create a sales receipt, to match CertaCal's Make setting): Customer = ifempty(quickbooks_id; ifempty(Id; customer_id)), built in Make's mapping panel: the ifempty function, then data › customer › quickbooks_id from the webhook, then Id from Search for customers, then customer_id from Get variable (click each from the panel; don't type the names); Invoice date = date; Line items = the aggregator's array; Customer memo = memo; Private note = private_note; Bill email = bill_email (or the customer's email when it's empty).
6. Drag the CertaCal: write back step onto the end of this route.
• URL: your write-back address from step 3.
• Headers › Authorization: replace PASTE-YOUR-CERTACAL-KEY with your key, leaving Api-Key in front.
• Request content: replace each MAP: … with the value from Create an invoice: Id, Doc number, Total amount, Balance, and, for customer_quickbooks_id, the customer Id you mapped into the invoice. Keep the quote marks around each value.
Products and services
Each line in lines has an item: the QuickBooks product/service it bills on. Make finds it by name, so it must match QuickBooks exactly.
- Each scale (Settings › Integrations › QuickBooks): the product/service for a calibration, for example Scale calibration. Blank means Calibration. A scale line has no price (
rateis empty): QuickBooks' price for the product/service is used, which is why the aggregator mapsifempty(rate; UnitPrice). - A different product/service for some scale types: a truck scale can bill on Truck scale calibration, for example.
- Service agreements and quotes: Service, Labor, Truck charge, Travel labor, Mileage, Per diem, Materials and your three agreement lines. A blank box sends CertaCal's own name (shown in grey). These lines carry CertaCal's price in
rateandamount.
5. Test it
- In CertaCal, close a real job (or use Send a closed job now with a recent one).
- In Make, open the scenario's History: the run should be green. Click it to see each step's input and output.
- In QuickBooks, open Sales › Invoices: the invoice is there, dated the visit day, with one line per scale.
- In CertaCal, the job's row in Settings › Integrations › Recent shows Invoice 1001, $…, and the job shows a QuickBooks chip.
Try it first with QuickBooks' sample company (sign in to developer.intuit.com and open the sandbox), or with a customer you can void afterwards.
Estimates for accepted quotes (optional)
- In Make, open the invoice scenario, click … › Clone, and name the copy CertaCal estimates.
- On the webhook step, Create a webhook (a new one, CertaCal estimates) and copy its address.
- Replace Create an invoice with Create an estimate; add Expiration date =
expires. - In the write-back step, change
"job": {{1.data.job}}to"quote": {{1.data.quote}}, and dropbalance. - In CertaCal, add a webhook with the new address and tick An accepted quote's estimate is ready for QuickBooks, and leave Accepted quotes on under QuickBooks.
Paid status back to CertaCal (optional)
- Make a new scenario. First step: QuickBooks › Watch payments.
- Flow control › Iterator over the payment's Line array; each line's Linked transactions names the invoice it paid.
- QuickBooks › Get an invoice: the Id of the linked invoice.
- HTTP › Make a request: POST to your write-back address with the same Authorization header, and the body
{"quickbooks_id": "{{Id}}", "type": "invoice", "balance": "{{Balance}}", "due_date": "{{Due date}}"}from Get an invoice. - Save and switch it on.
When an invoice is voided or deleted in QuickBooks, send "status": "void" or "status": "deleted" the same way, and the job shows it.
Locations as sub-customers (optional)
With Bill locations as sub-customers on, each invoice also has a location with display_name, fallback_name (used when another customer already has that name), quickbooks_id and bill_with_parent. In the scenario, search for the location first, create it as a sub-customer (Parent = the customer's Id, Bill with parent as sent) when it's missing, bill the invoice to it, and write its Id back as location_quickbooks_id. When the setting is off, location is empty and nothing changes.
What CertaCal sends
Each call is a JSON body with event (invoice.ready or estimate.ready) and data:
| Field | What it is |
|---|---|
type | invoice, estimate or receipt: what to make. |
job / quote | The CertaCal job or quote it's for. Send it back when writing back. |
reference, private_note | CertaCal job 1234 and the location: put it in the private note to find the job later. |
date, expires | The visit day (or the quote's acceptance) and a quote's valid-until date. |
customer | id, display_name, quickbooks_id (empty the first time), email, billing_address. |
location | Only with sub-customers on (see above). |
bill_email | The service agreement's accounting contact, when there is one. |
memo | For the customer memo: the visit date, any quote or agreement reference, and a note that each certificate can be checked online. |
lines | Each with item (QuickBooks product/service name), description, quantity, rate and amount (empty for a scale line, priced by QuickBooks), and key (CertaCal's name for the line: calibration, service, labor…). |
total | The total, or empty while any line is priced by QuickBooks. |
You can see the invoice CertaCal sends for any closed job at https://<your company>.certacal.net/api/v1/jobs/<job number>/invoice/ (with the API key), and the whole API at /api/v1/docs/.
When it doesn't work
| What you see | What to do |
|---|---|
| CertaCal's Recent says No Make scenario is listening | No active webhook ticks A closed job's invoice is ready for QuickBooks. Add it (step 4) and click Send again. |
| Recent says Sent to Make, waiting for QuickBooks, and the Attention page says invoices never came back | Make didn't finish. Open the scenario's History in Make: a red step says why. Fix it, then click Send again in CertaCal. |
| The webhook's Recent calls in CertaCal show Answered 410 or 404 | The Make webhook was deleted or the scenario is off. Switch it on, or make a new webhook and update the address in CertaCal. |
| Make: Invalid Reference: Item, or QuickBooks says an item is missing | A product/service name doesn't match QuickBooks. See Products and services. |
| Make: Duplicate Name Exists | A customer of that name exists but the search didn't find it (a different spelling, or it's inactive). Make it active, or fix the name in CertaCal or QuickBooks. |
| Make: the write-back step answers 401 | The API key is wrong or switched off. Make a new Read and write key and paste it into the Authorization header. |
| Make: the write-back step answers 403 | The key is Read only. Make a Read and write key. |
| Make: the write-back step answers 400 | A value isn't what CertaCal expects, for example a total with a currency sign. The answer says which field. |
| QuickBooks asks to reconnect | In Make, Connections › Reauthorize. |
| Make stopped the scenario after errors | Fix the cause, switch the scenario back on, and in Make's Incomplete executions retry the waiting runs, or click Send again in CertaCal. |
CertaCal retries a call to Make for several hours if Make doesn't answer. Send again (or Send a closed job now) sends a job's invoice again; if the first one did reach QuickBooks, void the duplicate there.