Skip to main content

Automation Agent OLD - Knowledgebase / Automation Agent / Miscellaneous - Cavallo Technical Support

Automation Agent OLD

Authors list
Overview

Automation Agent is a SalesPad service that creates configurable actions that can be run on a schedule. In this document you will learn how to set up and run Automation Agent, as well as the differences in functionality when Automation Agent is installed.

Note: Automation Agent is abbreviated as AA throughout this document.

 

Setting up Automation Agent

To set up AA you need:

  • SQL credentials with access to the SQL master database
  • SQL credentials to the server you will be using (these can be the same as the above credentials)
  • A license code and email
  • The Remote Library installed (The order of installation does not matter. This can be installed before or after AA.).

AA can be set up on its own database, which means it will have less of an impact on the production database. Still, testing should be done using a test database before using AA on a live database. When you first open AA, it will display a welcome screen and walk you through setup. Select Get Started unless you have already installed AA. Then, you can select Skip Set Up and continue to the Login screen.

On the next screen, you will select the SQL server you would like to connect to. This is the server in which Automation Agent will set up its tables. Connections do not have to be to the same server that SalesPad Desktop is installed on. 691800284.png?access_token=sncmeg-dtdonyqgtc-295ae16b9316c3e2cd58911369fcb24236ce1e48

822917257.png?access_token=sncmed-kfnuvenbko-3a0a27a97dd7c7978ac91bfe508e18f53cc70639

Next you will setup a database. This can be either a new database, as shown above, or you can connect to any database on the server(s) that you previously selected. AA will then prompt you set up an admin user account for AA. At the login screen, you can use the admin account that you just set up, or you can add or edit the connection, as shown on the following screenshot.
1959699568.png?access_token=sncmef-zbsznfkpet-61890865127c4299e8eff6c69e7f9b3add61c2be

On this screen, you can set the connection name and select the server from the list of servers it can find, or if you know the name of your server, you can type it into the box labeled “Server.” The user account that you operate under has to have access to two databases; the SQL master database, and the company database set up in the previous step.

You will now be redirected to the licensing page. At this point, you will need the activation code provided by SalesPad and the email associated with that code. Once you have entered the activation code, you will be done with setup and AA will launch.

Running Automation Agent

When you open Automation Agent, your screen should look like the following screenshot. AA will not initially be running as a service; it will be an application.

575431134.png?access_token=sncmeh-pzotqmpfay-564b2ed1aa423b931e94ea12b24c942c627c70e7

You will notice when closing AA that clicking the X button will simply dock AA and not actually close the application. To close AA, you must open the Main Menu dropdown and select Exit.

559363969.png?access_token=sncmeg-bfvtcwxiwr-cd897dbc885e0c0de4fc71666db5172b55ae8298

Clicking Job Search will open a tab below the ribbon that will auto search all of your saved jobs.

1740553524.png?access_token=sncmef-xrccuyxvfq-e483919eb904947829bed8c920cd866e8ab41428

Creating a Job in Automation Agent

Jobs in AA contain steps, schedules, and a run history. On the Job screen, you can edit a job's name, enable or disable it, edit the steps, edit its schedules, and view its history.

1754802699.png?access_token=sncmel-ctmolnxvxa-d7905f6d97b6698eb0d436eef01b75482fa72705

The Job Step Editor looks different for every Job Step Type (see below). Each job step requires a name and command type to run. The sequence, in general, can be left as 0. However, if one job needs to be run before another, the sequence can be set to any positive or negative value. The steps will run first in sequence order and then by Step ID. Job Steps can be individually toggled by enabling or disabling them. If the job is disabled, this field will not matter as no job steps will run on a disabled job.

1224646372.png?access_token=sncmed-frnzdnegdc-981747e698f19aa757c74cd46d3bf4fae8a59b03

When a Command Type is selected, the corresponding field labels appear. These fields are different for each Command Type, and if the command type is changed, all the data on the form is lost. Currently there are seven different Command Types in core: Forward Sales Batch, Forward Sales Doc ID, Invoice Sales Batch, Remove Sales Batch Holds, Run Script, Update Batch Entered, and Email. Every command type other than Email requires a SalesPad Remote URL. This can be found in SalesPad Desktop when you start the web service.

1838225605.png?access_token=sncmej-pexnckjycn-2ba2259027351899dec045dca1958f5d85192865

Generally, the Remote Library looks as follows when you start the service, and you will need the address found here for every job step. This address indicates the location of the host settings.

1153674534.png?access_token=sncmei-uhkmoifrva-70ec75226099053556959ff38ba2ac429902bd31

The Schedule Editor requires a name and a Frequency Type (1). The Frequency Type determines which fields are editable, making it easier to maintain the schedule. Most Frequency Types require the Daily Interval (2), Within the Day (3) and Date Limitations (4) fields to be filled. Please note that the Run Every field must have a Time Type (5) specified in order for it to work.

607437847.png?access_token=sncmee-xaimpvuegd-0b31450912441b2bdc14511db8be2734bf417453

Installing Automation Agent as a Service

To install AA as a service, launch AA and click Job Processor.

571406841.png?access_token=sncmel-zlanpjacqz-55bd4c73c85943bfb0c1cca9c7b4918b75e6fa00

Click the Install Service button.

303903104.png?access_token=sncmej-rpriqfhydd-9c724a930443bc0d9853f85de52c2397b1f16de4

Note: If AA is already installed as a service, this button will be labeled Reconfigure Service which will open an installation window with the option to select Automatic or Manual.

1657615622.png?access_token=sncmen-iejvpbunun-f9033e227b5cce44541e04153d384fded6a7434f

To reconfigure the AA service while it is already installed, click Reconfigure Service. This will take you back through the service installation process.

Uninstalling Automation Agent as a Service

If AA is installed, the Uninstall Service button to the right of the Install/Reconfigure Service button should be available.

292280031.png?access_token=sncmek-vwnogwnlmj-4d059957b6d7dfb5c214c25ecc9527e08a181578

To uninstall, click the Uninstall Service button. Once the service has been uninstalled, the screen will refresh. If an error occurs during this process, there will be a popup window explaining why it failed.

Starting/Stopping Automation Agent as a Service

Make sure that the service is installed before trying to start or stop the service. When the service is installed, the Start and Stop buttons will take longer to complete their operations. If anything goes wrong during starting or stopping, you will be notified with a small popup window.

Note: The grid that normally contains the schedules and what is currently going on with the service is empty when the service is installed. This is because the service is detached from the application when it is installed.

AA can also be started or stopped from the Services application in Windows. However, error reporting is less descriptive in Services than in the AA program. If anything does go wrong, check the Automation Agent Service Logs to see the error in more detail, as noted below.

1949016657.png?access_token=sncmek-veghfhlyfi-9f9de3dfea91e9d25f62f961e8a38e85b3e7892e

Automation Agent Service Logs

AA normally logs to the Job History Table when it is installed as a service. The logs can be checked on a job’s History tab. However, AA also logs extra information about starting, stopping, and any errors that occur during the execution of a job in the Windows logs. If it happens to have an unhandled exception, it will be logged to the Windows Logs\Application, and will most likely be an error level log. The AA service will also create a log called Service.SalesPad.AutomationAgent.Log. This log will contain start and stop information, along with start and completion of job steps logged.

392077722.png?access_token=sncmeo-hlvrqpyebc-74ec445295899bd20f55e7f51fbbd0e236a6a46b

Helpful Unhelpful