What is automation?
Automation allows an application to execute code when an event occurs inside the client. These events occur when an action takes place such as when a dialog is opened, or a person is created. While automation code is usually defined by customer requirements, consultants often create routines that assist with common tasks. Automation code can perform just about any task imaginable, but generally involve validating, transforming, and/or moving data. These types of routines are commonly discussed in the developer forums. Internal automation APIs are very useful for managing predetermined routines based on customers’ requirements and providing user interaction within the application. They can make complex multiple-step tasks easier by programmatically automating the mundane details letting the user focus on the task at hand.Terminology
A trigger, as defined in Settings and maintenance, is either a CRMScript or a macro. However, scripts and macros don’t have to be triggers. Confused? Let’s look at the process in general terms first.- Event: the thing that happens
- Trigger: condition or filter
- Handler: response logic
- Hook scripts: alternative to triggers and runs every time a particular screen in Service is loaded (beforeSetFromCgi, afterSetFromCgi, beforePrint)
- Extra menu: triggers a script or macro from a Service menu option (or performs custom navigation)
- Button script: assigned to a custom button in Service and runs when clicked (bLogic action = doScript)
Script language options by platform
There are several scripting options available for each platform. The table details which automation languages are supported by each platform.(Onsite only)JavaScript is supported as Jscript (MSScriptControl) for the Windows client and inside SoScriptControl, injected by custom controls, and direct references for the Web client.C# and VB.NET are supported as .cs and .vb files, or as compiled assemblies, in a specified directory.
Service
SuperOffice Service leverages its own scripting engine and language, known as CRMScript. Primarily used to automate workflows around customer service scenarios involving tickets, mailings, and templates. However, it has been extended to include classes and methods that mirror NetServer web service APIs.CRM Web (onsite)
SuperOffice CRM is slightly more complicated than SuperOffice Service. The onsite SuperOffice Web client relies exclusively on client-side JavasScript support. SuperOffice tests the Web client against all major browsers and versions to ensure a fully functional client no matter what the browser policy in an organization.Onsite installations can include and run integration JavaScript to support customer needs, but it is up to the organization to ensure it works in their environment.
Windows client
The Windows client has the most complete automation engine of all the SuperOffice products. It is, for example, the only client that out of the box exposes events that can invoke script routines when users open and close dialogs. This presents an opportunity to either eliminate or augment other integrations.- It hosts a scripting environment made possible by the MSScriptControl, a COM component that’s built-in and made available on every Windows operating system.
- It can load and execute both vbScript and JScript code. The scripting environment does enable some interaction with users by showing message boxes or displaying input boxes.