QuickBooks Integrations from Five?

Do you have any examples of using Five to post entries to QuickBooks Web version using their API’s?

Thanks…

Hi Ron,

We will prepare an example for you on this, and will give you the steps shortly.

Hi Jo-Anne,

Any progress on this yet? I have a QuickBooks integration project coming up, and am wondering if I can do this in Five.

Hi @RMittelman

Here is a quick example of a function that creates an account in a Sandbox Company inside QuickBooks:

function QuickBooksIntegration(five, context, result) {
   //Capturing the name of the account from the app
    const name = context.Name;


    const bearerToken = 'MyBearerTokenHere'
    
    const url = 'https://sandbox-quickbooks.api.intuit.com/v3/company/9341452063613570/account?minorversion=40&Accept=application/json'

    // we send posts and get requests through five.httpClient();
    const client = five.httpClient();
     // The content type is taken from the documentation of QuickBooks
            client.setContent(`{
        "Name": "${name}", 
        "AccountType": "Accounts Receivable"
        }`)

    client.setContentType("application/json");


    client.addHeader('Authorization', `Bearer ${bearerToken}`);
    
    let results = client.post(url)

    five.log(JSON.stringify(results))

    return five.success(result);
}

From the function, you can see that the post request was sent through five.httpClient() which allows us to send requests to APIs such as Get, Put, etc, you can use the link below to understand how you can use the httpClient to communicate with your API

HTTPClient Object | Five | Low-Code For Real Developers

This function is attached to a ‘Do Complete’ event of a process inside Five. It works in a way that it expects the name of the account to be specified and then sends a post request to QuickBooks to create that account. You can see from the screenshot below that a successful call was made:

Thanks for your input on this, Pranoy. This project seems to have resurrected itself, and the customer is now interested in proceeding. If possible, I would appreciate input on how this can be achieved in Five, given these basic requirements:

1: There will be a one-time setup process, where the application will reach out to QuickBooks and obtain a list of GL accounts. The user will choose the proper account for each type of allocation, and these will be stored in a parameter table in our database.

1: Customer will receive a CSV file including a credit card batch number and a list of allocations which will include a category and the allocation amount. There should be the correct number of details to total the amount of the batch total, which the credit card processor has already posted to the customer’s QuickBooks account.

3: The new process will read this CSV file, obtain the proper GL account from the table mentioned in #1, then for each item, post to QuickBooks.

4: The process will also keep track of the batch numbers processed from the CSV file, so we don’t post the same batch more than once.

Basically that is the idea. I need to know the proper way of doing this in Five. There is a possibility I can market this new application to several customers of the company that is providing the CSV file, as their customers all use QuickBooks, and when they process these allocations, it takes several hours of manual entry.

It’s not clear if we are able to market this, whether each individual customer needs to have their own Five database/application, or whether we can create a single application for all customers.

I hope you can provide some guidance on this project. Thanks…

Any further info on this topic? Please?

Hi @RMittelman,

Here’s how you can approach this in Five:

  1. Obtain GL Accounts from QuickBooks.
    You can create a function in Five that connects to the QuickBooks API (using the access token), fetches GL accounts, and stores them in a table. Then, create a form where users map each category to the appropriate GL account.

  2. Upload CSV
    Five supports file uploads (display type: _DocumentUploader). You can create a process to upload the CSV file, then use a function to read and parse its content, store the records in a table, and validate that the allocation totals match the batch amount.

  3. Post to QuickBooks
    Use five.httpClient() in Five to send API requests to QuickBooks. You can also log the responses and show the user which records were successfully posted.

  4. Prevent Duplication
    Create a table e.g. ProcessedBatch. Before posting, check if the batch number already exists. If it does, skip it to avoid duplicates.

One app or many for multi-customer, it depends on your customer needs:

  • If all customers use the same CSV format and logic, you can manage everything in a single app using a CustomerKey to keep their data separated.
  • If different customers need custom logic or file formats, it might be easier to have separate apps per customer.

If you’re planning to market this, can starts with a single app as it is easier to maintain.