Versions Compared

Key

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

The Automation Editor section allows the user to create and edit automation scripts.

There are a variety of options available in the editor, which will be discussed below.

The common functions list represents the commands that Galooli currently supports. The followings are the commands and their explanations:

...

Table of Contents
stylenone

Asset Iteration

Implements a loop that iterates on all the units by using the {MAIN-LIST} and {ACTIVE-ID} keywords. An action can be done to each unit by using the {ACTIVE-ID} keyword (for example await Galooli. Log({ACTIVE-ID}) inside the for each loop)

  • {MAIN-LIST} - The main list of ids (usually the unit ids) of all objects that the script is about to execute

  • {ACTIVE-ID} - The current id (one of the values from {MAIN-LIST}).

  • Accessing the unit's data - {DATA:unique_id} - By using this keyword, the user can retrieve a value of one of the current unit's properties.

    For example, if the user uses the keyword {DATA:unit_name}, the value returned will be the name of the unit.

    Code Block
    languagec#
    foreach (string {ACTIVE-ID} in {MAIN-LIST})
    {
    
    }

Send SMS

The user can send a text message to a number (or a list of them separated with ‘,’ or ‘;’, without spaces).
Sending SMS through My Automations will be done through the service provider defined for each organization.

Code Block
languagec#
await Galooli.SendSMS(/*Numbers to send to seperated with ';' or ','*/, /*Message to send*/);

Send Email

The user can send an email to a recipient (or a list of them separated with ‘,’ or ‘;’, without spaces)

...

Code Block
languagec#
await SendEmail(“some.one@example.com”, “Test”,”Test”, false);

Set State

The user can save a value to a variable for future executions. Note that the TTL of each variable is 1 hour, so the user can only use variables that were created in previous executions from the last hour.

...

State variables that are "global" may be used in multiple runs of the same script. In order to accomplish this, save a variable as the "Set State" function as follows:

Code Block
languagec#
bool success = await Galooli.SetState(“SomeKey”, “SomeValue”, isGlobal: true);

Get State

The user can retrieve a value of a variable saved in a previous execution

...

Code Block
languagec#
string value = await Galooli.GetState(“SomeKey”, true);

Delete State

The user can delete previously saved state variables

...

Code Block
languagec#
bool success = await Galooli.DeleteState(“SomeKey”, true);

Log Message

The user can log a message in runtime – usually for debugging purposes. Can be viewed in the execution logs. Note that the length of the log line limited to a maximum of 1000 characters in the code.

Code Block
languagec#
await Galooli.Log(/*Message*/);

Send Unit Command

The user can send a command to a specified unit. The requests available are:

...

Code Block
languagec#
await Galooli.UnitCommand(/*Unit id*/, /*Command*/);

Set Value

This method is used to set the value of the unit. The values that can be set are information fields (below "Unit" or "Additional Information").

...