Scripts 👷‍♂️

Routing scripts

Scripts are used for making routing decisions when using the "routing script" routing strategy for a routing profile. For each message where a routing decision is being made, a script can be run to select the SMSC to where the message will be sent.

Scripts are managed in the Routing > Scripts section of the SSG Admin Portal.

Each script has a name, description, version number, script code, and routing profile it is associated with. Only one version of a script can be active and used by a routing profile for making routing decisions.

Script editor

The script editor can be used to:

  • Create new scripts and versions of scripts
  • Delete a script version or script
  • Enable/disable a script for use
  • Set the routing profile the script is used with (affects all services using that routing profile)
  • Name the script and give it a description
  • Set a version of a script as the active version to be used
  • Edit script code

Script versions

You can have multiple versions of a script and select one of those version to be the active version that it used with the selected routing profile. This allows you to work on a new version of a script without affecting the live version, and to have a history of versions of the script to refer back to.

Routing profile

To use a script with a routing profile, set the routing strategy of the routing profile in the Routing section to "routing script". Any script that is associated with that routing profile will then be used for making routing decisions for SMS traffic using a service that is associated with that routing profile.

Create a new routing script

These steps will show you how to create a routing script and apply it to a routing profile. Once applies to a routing provide, the script will be used to make routing decisions for customers using services that are associated with that routing profile.

In the Routing > Scripts section, click the New script button. This will create version 1 of a new script with the name "_New script".

Click the Edit button in the upper panel to:

  • change the script name
  • enter a description
  • select the routing profile to which the script applies.


If your routing profile is not listed, you first need to change the routing strategy for the routing profile to "routing script" in the Routing section.

After making these changes, click the Save button.

Click the Edit button in the lower panel to edit your script. Making this script version the "active" version of the script by using the Active version switch. After you have finished making your changes, click the Save button.

Review your script. When you are ready to enable it for use with SMS traffic being handled by the selected routing profile, click the Edit button in the upper panel, select Enabled, and then click the Save button.

Writing script code

See the Script code section.