Best Practices

Check out our growing list of best practices to help you implement the best integration for you and your users.

Lists Are Your Friends

Always try to sync list data (like Items and Customers) before syncing transactions. While the behavior of this might vary slightly between accounting apps, you'll always be safest by syncing lists first. This is because transactions almost always reference list data, and when that data is missing, you could get errors or weird behavior.

Decide When It's Best To Call Autofy

Even though Autofy supports real time access to accounting data, each accounting app can have different response times for requests. For this reason, it's best to develop your integration so that your user doesn't have to wait for your app to finish synchronous calls to Autofy. Instead, try to make these requests in the background, or tie them to specific actions in your app that won't interrupt your user's work.

That isn't to say you can't implement use cases that are more real time in nature. For instance, you may need to push a transaction to the accounting app the very moment your user takes an action - this is ok, and Autofy works great in this case. However, loading data from an accounting app to load a page on your site would be considered a riskier user experience.

Create Detailed Logs

Many developers already know this, but it's always worth reinforcing: capture good logs! This is crucial not only to understand errors when they occur, but can aid in making your end user experience great. Pay particular attention to logging details about what actions you're taking with Autofy, as well as what your requests contain. For instance, one important detail that helps us see issues is the requestID of your API request. This helps cut down on time needed to diagnose issues if they come up.

Store Important Data

We recommend that your application store certain system level details of the data you exchange. In particular:

  • endpointID: As described here, this is at string that identifies the company file you're interacting with in Autofy. You'll use this to make Data calls on our platform.
  • userID: This is a value you'll use to provision endpointIDs, if your customer has more than one company they want you to sync with.
  • agentToken: The Agent token identifies the Agent, and logs it into the Autofy platform. You'll hand this to your end user for them to enter into the Agent upon initial set up.
  • ID: The ID of any record you exchange with Autofy should be stored on your end, so you can reference it in future calls, like GET or PATCH.
  • requestID: As mentioned above, this will help Autofy identify the logging details of your request in case there's an issue.

Familiarize Yourself With Accounting Workflows

Simply getting data in or out of an accounting app is, at the end of the day, pretty basic (at least when you use Autofy). But sometimes more advanced workflows are needed by your users, like posting an Invoice and then checking on its details later.

Let's use that example to explore a little bit further. Say your app needs to push invoices into QuickBooks. To make this successful, it's helpful to know that QuickBooks requires that two list entities exist before it will accept a new Invoice: Customer and Item. So your integration flow will want to look something like this:

  • Check to see if the Customer exists using a GET request with the name parameter populated. In our QuickBooks example this works well, because QuickBooks has unique names for Customers.
  • Check to see if the Items on the Line Items exist using a GET request, again with the name parameter populated.
  • If either don't exist yet, run POST calls to add them
  • Call POST once again with your Invoice

As you can see, you can avoid simple errors by adding a few small steps to your integration.


What’s Next