Table Level Overrides

We've discussed overrides for sending to QBO using " qbo_send" and deciding what data received should be written back into our FileMaker solution using "skip," but perhaps your solution's table structure is different from LedgerLink's in such a profound way that you cannot simply remap the LedgerLink table occurrences to your tables? That is the job of table level overrides.

When we integrated our Karbon framework with LedgerLink, we needed to address the fact that our Karbon Customers, Invoices, Sales Receipts etc., have completely different data models than the simplistic ones in LedgerLink. That is, we could not simply remap the qbo_Customer table occurrence to our Karbon Customer.

Configure Saving To FM( {Entity ; Record })

The sync engine in LedgerLink will eventually run the "Configure Saving to FM ( {Entity ; Record } ) script. If you look at our Karbon version of LedgerLink, zg_LedgerLink, you'll see that we've added overrides to this script to redirect the saving process to a handler script which will eventually call scripts in Karbon_kontroller. The Karbon_kontroller scripts will receive the QBO JSON, transform it and use APIs to write the data into Karbon tables.

Handler Script for Saving QBO data to FileMaker

Let's look at the "Handle Customer Update" script in the Karbon Overrides folder in zg_LedgerLink.

As you can see, it takes the QBO Customer Record and hands it off to the "Handle Changed or New QBO Customer ( {QBO Customer} ) in karbon_kontroller. From there the data is transformed and sent to the Customer API to get written to the correct tables in Karbon_kontacts. The handler script receives back any errors, so that the transaction is processed correctly.

Your handler script will be similar. However, the script that the handler calls will be specific to the data model in your solution.

Configure Sending Data From FM {Entity; FmId }

The reverse process to receiving data from QBO is to gather data in FileMaker to send to QBO. How to configure that is the job of Configure Sending Data From FM { Entity ; FmId } script.

Like when receiving, we need to gather Customer data from various tables in Karbon, and could not use the table occurrence mapping. So, we added an override to call a handler for Sending Customer data to QBO, also referred to as a "push."

The "Handle Customer Push" script, like the "Handle Customer Update" script, redirects the process to karbon_kontroller and the Customer data is gathered from FileMaker and transformed to the proper JSON for QBO.

When you override the default Saving or Sending routines in LedgerLink, you take responsibility for what needs to happen in those processes. For Saving that includes parsing the received JSON and setting all the fields. For sending to QBO that includes receiving back the qbo_id and setting it and clearing the qbo_send field. All these processes need to be transactions, of course. Look to Karbon for examples of many table-level overrides.

Still need help? Contact Us Contact Us