fmQBO Getting Connected

GETTING STARTED AND CONNECTED

In this section we are going to cover how to connect your solution to Quickbooks Online. If you want to get a sense of how fmQBO works before you start working with your own file, you can try  using the example file qboInvoicer.fmp12, first. Many of the steps are the same.

Summary of the Process

First, you will need to get a license, and have access to a QuickBooks Online account.  If you don’t have an account you can get a SandBox account.  Intuit makes them available for free, when you  sign up for Intuit Developer Account. Next, we will get fmQBODeveloper.fmp12 connected to your QuickBooks Online account. We can use fmQBODeveloper to test your connection, and even generate code that you can paste into your solution to make the integration process easier.  Finally we will copy some code into your solution that will connect to the Quickbooks API.

Starting with fmQBODeveloper.fmp12

fmQBODeveloper is the best place to start off. You can test connections, construct requests and tests them against the QuickBooks Online API. Once your done you can use it to generate working code for your own files.  Here is how you do it.

  1. Place fmQBO.fmp12 and fmQBDeveloper.fmp12 next to your own solution file or files. Make a backup of your own solution files first. fmQBO.fmp12 will become a part of your solution. fmQBODeveloper.fmp12 is only used to help your integration.
  2. Open fmQBDeveloper.fmp12. Use the buttons on the home screen to either go buy a license or request a demo license, unless of course you already have one.
  3. Go to the “Settings” screen. It’s the last option under the Main Menu in the upper left. Enter your license there. Make sure you also check the box for “Use Sandbox” if you will be connecting to a sandbox account.
  4. Click “Test Connection”. A browser window will open and you will be asked to authorize fmQBO to connect to your QuickBooks Account. If you are connecting to a Sandbox account, you may see a red warning at the top of the screen. It will take to browser windows opening to complete the connection.
  5. Next select “Requests” from the Main Menu, and create a new Request.  The simplest thing to test is Company Info.  Choose “CompanyInfo” from the entity dropdown. Then choose “query” from the actions menu. Click the “Test Request” button.  If everything works correctly you will see the Query Results in the lower part of the Screen

Connecting Your Own File

Make sure you completed the steps in the section above. Once you have done that continue on from here.  As part of this process you will be copying code into your solution.  fmQBODeveloper can generate this code and place it on your clipboard. All you have to do is paste into your file. If you don’t have FileMaker Advanced, you should get it. It will be very hard to complete this integration with out it. Contact is if you need FileMaker Pro Advanced.

  1. Create an External File Reference from your solution to fmQBO. The name of the External File Reference should be fmQBO.
  2. Open up fmQBODeveloper.fmp12.  On the Request screen you were working with in the above section you will see a column on the right titled “Code Generators”. Click the first button “Code for your File”. The resulting PopOver contains two buttons.
  3. Click the first button “Custom Functions”. Your clipboard will now have the custom functions you need ready to paste into your file. Go Paste them into your file.
  4. Come back to fmQBODeveloper.fmp12 click the second button on that Popover. You will now have all the Scripts you need to paste into your file on your clipboard.  Go and do just that. Paste them in.
  5. In the folder you just pasted into your solution, there is a script called “fmQBO Config (edit)”. Open it
  6. Follow the instructions in that script. It will ask you to put your email and license string into Set Variable script steps. It will also ask you to indicate if you are using a Sandbox account.

Testing the Connection in your own File

Once you have completed the steps above, you are ready to test in your own file.

  1. Return to fmQBODeveloper.fmp12 and go Back to the Request you worked with above.  It should be a Query for CompanyInfo.
  2. In the right “Code Generators” column, you will see a button called “Request Script Steps”. Its the fourth one from the top. Click it.
  3. Click the “Copy to Clipboard” button. You will now have a series of script steps that will perform the Query for CompanyInfo for you.
  4. Switch to your File and make a new Script.  Paste the script step into that new script. At the end of that script place a debugger mark, so the script debugger will stop there. Close and Save the script.
  5. Run the Script with the Debugger on. When you get to the bottom the variable $companyInfoJSON should contain a response from QuickBooks online. It should be in JSON format and it should have an error on it. It should contain JSON that has information about the company that QuickBooks Account is for.  You can see an exampleof what that looks like here.

What to do Next

At this point you should have successful connection to Quickbooks from your file. If you don’t and need some help figuring out whats going on, checkout the support options. (link?)

Once you have successful connection, you can set about building script to pass the data back and forth from QuickBooks Online API and your file.  fmQBODeveloper can help by writing lost of the boiler plate code for and pasting it on your clipboard. Check out the section on strategies and concepts for more information on how to do this.

Still need help? Contact Us Contact Us