Related Blog Posts

A business process will often have many steps. In Workbooks you will implement a series of small 'Processes' each of which combines to implement a full end-to-end solution. Keeping the steps small makes things much more maintainable.

Workbooks Processes come in a variety of forms, either Scheduled, On Change, Web, Integration, User-invoked ('Button Processes') or Test. All styles of process invoke Workbooks Scripts to carry out their work.

Scheduled Processes

The Scheduler within Workbooks allows you to define how frequently each different Process should be run, this can vary from every few minutes to monthly and be restricted to certain hours of the day or days of the week. For example you might schedule a process to check an external email server for new emails and import these into Workbooks to create new Cases: the 'Email to Case' script within the Script Library can be used to do exactly this.

You can use the 'Run Now' button to initiate a Scheduled Process at the next possible opportunity. To avoid complication, Workbooks restricts you to running only one Scheduled Process at a time; any others which would otherwise run at the same time are queued until the first one finishes. Workbooks will not run a Scheduled Process any more frequently than the schedule but will attempt to keep close to the requested schedule.

If a script fails in Workbooks, this can often be bad for your business if a process that normally happens in the background stops functioning and your System Administrator is unavailable to rectify the issue. To try and mitigate this problem, you can set a flag on a Scheduled Process to minimise any issues. There are two options:

  • Run again – A script can fail unexpectedly for a number of reasons. Sometimes you can simply run the script again and everything will operate normally. This option is designed to handle an automatic re-run of a script and will come into play if the exit code is anything other than a 0, 1 or 2.
  • Disabled automatically – If a script fails e.g. returns an exit code of 2, then it will become disabled until a System Administrator re-enables the process again manually. You can set who is notified on the event of a failure by changing the “Notify User” picklist.

Make sure that this is a 'real' user with a 'real' email address, otherwise a process might fail and no-one is informed so users presume the process is running as normal.

On Change Processes

On Change Processes run in the background after the modification or deletion of specified record types. The trigger to invoke the process is called a Listener; you can specify which record type(s) the process 'listens' to in the Listeners section on the process. These type of processes are useful if the automation only needs to be performed on change of a particular record type rather than on a constant scheduled basis. The synchronisation of Meetings with Google Calendar is a good example of this. Rather than have the process running on a schedule constantly looking for updates when nothing has changed, choosing to invoke the process on change of a Meeting means that the process only needs to run - and hence carry out the synchronisation - when required. 

Web Processes

Web processes can be used to implement web services or web pages externally or within Iframes on the Workbooks desktop. A web process is often used as an interface on a website for users to update your database without having access to Workbooks itself. An example of this would be a Contact Us form. The web process would appear on your website in the shape of a web form, then once the user enters their details on the form and hits send, a new sales lead record on your database would be created. Web processes can have all sorts of applications and are used to faciliate a significant portion of 3rd party integrations. 

Integration Processes

Processes can be invoked from both the User Preference Panel and System Configuration Panel, these are called Integration Processes and are designed to give control both the user and database wide preferences for 3rd party integrations. Similar to how a Web Process works, a web page can be displayed within either panel as an interface to control your integration. 

User-invoked Processes

A Process Button can be added to your records, which, when clicked, initiates a specified Process. For example, you might add a button to a Case record that when pressed closes the Case and automatically sends an email to the Primary Contact using a relevant email template. You can also add a Process on Save, in which a Process is run everytime the Record is saved. A simple example demonstrates how you might implement a Process Button to delete all line items from an Order.

A Process Button can run as the current user or as another user that you specify when configuring the Process. This allows users that wouldn't normally have access to a particular part of Workbooks to still use any automated processes that you may have in place. For example, you may wish to create a Case off the back of an Order. A user doesn't need to be granted capabilities to the Cases feature to be able to use this Process Button as it can be configured to run as a System Administrator who has the capability to use all of the areas in Workbooks.

Process on a Report

It is possible to perform a Bulk Action on a Report by running a Process Engine Script. This allows the automation of common tasks on a group of Records, or extract and process data retrieved from a Report. This can be run on an existing or new Report.

To enable a process to be invoked from a report, open the relevant Report in edit mode and open the Automation tab. Click Add Process, give the process a name and select the Script that you want to run.

Once you've set up your process you'll see the Bulk Actions button on the Report. Selecting this will enable you to invoke the process similar to a User-Invoked Process).

An example of this might be create a script which creates Invoices for selected Orders. You could then create a Report which shows these Orders, add the Process to the Report and then run the Process.

Test Processes

If you use the Test button on a script, a Test Process will be created under the Test Processes tab. A Test Process gives you basic functionality to invoke a script and view the logs. 

Running a Process

When a Process is run it is permitted to continue until it uses too much time, memory, or processor time. Set the Maximum Runtime for the process when you create it to something sensible: if a scheduled process loops continuously and doesn't finish no other scheduled process will start until it stops; a process button could appear to "hang" if the underlying process does not complete in a timely manner.