Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Action Scripts allow you to write 'mini-programs' that actually chanage the way extend your PBX handles calls's functionality. In fact all of the Call Routing built into within your Noojee 's PBX is done via Route Step Action Scripts, so you have the same level of power and control as the Noojee Developers do.

BE WARNED: Action Scripts are extremely powerful and can easily cause your WHOLE PBX TO CRASH.

...

This page is only meant to be a mini-guide. Full documentation of Routing Action Scripts is on the main Noojee Wiki at 04.1.10 Route Step Action Scripts.

What is a script

Essentially a Action Script is a small piece of code written in Groovy (a java scripting language) that Java (NOT Javascript) that can be used to control how a call is routed. Once you have created a Route Script it becomes part of the PBX's set of Step 'Actions' and can be used in any Call Route. Not only does the Route Script allow you to define the routing logic, but you extend your Noojee PBX.

There are currently five (5) types of Action Scripts:

  • Route Step
  • Disposition Action
  • Screen Layouts Action
  • Utility
  • System Startup Action

Each Action Script type allows you to enhance a different aspect of your Noojee PBX.

Why use Action Scripts?

Action Scripts let you extend the core functionality of your Noojee PBX and perhaps more importantly let you connect your Noojee PBX with third party systems.

If you are looking at integration with third party systems you should also look at Noojee's Zapier integration. Zapier allows your Noojee PBX to integrate with over 700 other applications (e.g. Salesforce, Netsuite, Google Docs etc) with any programming.

You might want to validate an account no. captured via an IVR, lookup a customers outstanding balance, send a payment to a Credit Card gateway. The ability of Action Scripts is on limited by your imagination.

Route Steps

Creating your own Route Step Action Scripts allows you to add control to how a call is routed. I might want to request a user to enter a PIN and then use an Action Script to query an external DB to validate that PIN.

A Route Step also you can also provide a mini-UI which is displayed when your Route Script Step is used in a Call Route Step. The purpose of the mini-UI is to allow the user to select one or more parameters which are passed to your Route Script Step at run time.For example you may create a Route that requires the caller to enter a PIN code. As part of your Route Script you can create the UI that allows the Adminsitrator to enter the PIN code that the caller needs to enter

Disposition Actions

Custom DAs can let you add advanced control logic around how a lead is processed. You might need to consult an external DB to see if a lead should be called again based on data entered by an agent.

Note: Noojee's Zapier integration allows you to trigger external actions as the result of a lead being dispositioned without having to right an Action Script.

Screen Layout Actions

Allow you to extend the Javascript you right in a Screen Layout to call into server side Java code. This can be necessary if you need to securely access a third party system and don't want access tokens exposed to Javascript. It also allows to take advantage of Java's more powerful programming constructs (not to mention the better error handling and compile errors rather than runtime errors).

Utility

A utility Action is a Java Class that can be used by any other Action type. This is really just a place to put common code.

System Startup Action

These actions are called whenever your PBX is restarted and allow you to do any startup processes such as scheduling recurring events.

Versions

To make your life easier Noojee PBX supports the concept of having multiple version of a given Route Scripts only one of which is designated as the 'Active' script. This allows you to start working on a script without affecting how your PBX is operating until you are ready to deploy the new version of you Script. 

...