Depending on your end user's use case, you may need to deploy the Agent in different ways to satisfy the scenario you're working in. This guide will describe some do's and don'ts when deploying the Agent to your users. We'll predominantly use QuickBooks as our example application, but these principles apply to any on-premise application unless specified in another relevant guide.
Within the Autofy platform, the Agent performs a unique and specific role. The purpose of the Agent is to enable connectivity to locally installed on-premise applications, like QuickBooks Desktop. When you send an API request to Autofy, it determines if the call is destined for an on-premise customer, and then routes the call to the appropriate Agent.
This means the Agent needs to be installed on your end user's machine. Here are some system requirements to keep in mind when deploying the Agent.
- Space required: ~20MB
- Supports Windows 8.1 +
- Installs within a Windows user as an .exe (cannot run as a service)
- Requires connection to the internet
You'll notice that the Agent runs as an .exe and not a Windows service. The reason for this is that QuickBooks Desktop does not allow services to connect to it. For highest availability to respond to API requests, we recommend that the Agent is installed on a server with persistent access to the internet and logged in to the Agent's Windows user.
Under the hood, the Agent is connecting to the QuickBooks application, which houses the QuickBooks SDK. This means that the Agent should be installed on the same Windows user as QuickBooks. If you install the Agent on a machine that only houses .QBW files, it won't be able to connect. The QuickBooks application must also reside on the same machine and Windows user.
When a request comes in, Autofy will connect to QuickBooks using whatever QuickBooks user that's currently logged into QuickBooks. If QuickBooks isn't running, Autofy will connect using the QuickBooks user that was chosen when the security certificate was accepted during the connection process.
Autofy will provide you with a downloadable, branded Agent that you can distribute to your users from your own environments. Any time you want to update your users' Agents, you can either manually push new executables to them, or request that the Autofy auto-updater is enabled for your application. Auto-updating Agents will check for new versions from Autofy automatically, and prompt the user to install and relaunch.
The most common use case for the Agent is:
- Your customers each have 1 company file
- They have a server that's responsible for running QuickBooks and storing company data
In this standard scenario, your setup will look like this, again using QuickBooks as an example:
Let's review some common setup scenarios.
|Someone is working in their company file when an API call is sent.||Yes, as long as the record the API is trying to update (PATCH) isn't locked for editing.|
|Someone is working in their company file on their workstation, but another user is working in the same company file too (multi-user mode).||Yes, as long as the record the API is trying to update (PATCH) isn't locked for editing.|
|An API call is getting processed when another API call is sent to the same company file.||No. Only one call can be processed at a time per QuickBooks application.|
Some environments have many company files (.QBW) resident on a server along with an install of QuickBooks Desktop. This setup should also include an install of the Agent, so it can connect to those files and process API calls. Organizations with this setup typically want to be able to process API calls with all the company files on the server, and Autofy supports this.
Let's review some common setup scenarios.
|A user is logged into the server and is working in Company A. Meanwhile, an API call comes in for Company A.||Yes. This will behave the same way as the single company scenario above.|
|A user is logged into the server and is working in Company A, but an API call comes in for another Company on the same server.||No. QuickBooks only allows one connection per integrated app at a time, so this call would fail, and you would get an error response.|
|An API call is getting processed for company A when another API call is sent to another company on the same server.||No. QuickBooks only allows one connection per integrated app at a time, so this call would fail, and you would get an error response.|
|An API call was just processed for company A with a successful response, and then another API call is sent to another company file on the same server.||Yes. When you receive a response from Autofy, it means that the connection to QuickBooks is finished, and you can send another API call to the same Agent, even if it's for a different Company.|
|There are multiple server users that all interact with the same companies, each with their own Agent.||Not recommended. Only one Agent is needed per QuickBooks application. As long as an Agent is connected to QuickBooks and logged into Windows, Autofy has sufficient access to the data.|
The rule of thumb for this scenario is: Wait for a response from the Autofy API before sending an API request to the same Agent.
If you have questions about this guide, or have a unique scenario in mind, please reach us at [email protected].
Updated almost 3 years ago